aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2012-09-24 07:04:24 -0400
committerInki Dae <inki.dae@samsung.com>2012-10-03 21:06:01 -0400
commit58f6aad7d93f7ce009d371aa5065b70d593d3b17 (patch)
tree0d8dc7d3fdbd8d8f4fb8ba69189864c12d2c7c66 /drivers/gpu
parente2e1338900208ab36e3b86349ffdb3eba52302f8 (diff)
drm/exynos: fix display power call issue.
Changelog v3: make exynos_drm_display_power function use exynos_drm_best_encoder function instead of connector->encoder to get a valid encoder. connector->encoder could be NULL because with DRM_IOCTL_MODE_RMFB request, connector->encoder is NULL so fix this issue. Changelog v2: remove static prefix so that exynos_drm_best_encoder function could be called by other modules. Changelog v1: this patch fixes the issue that display power callback isn't called. with DRM_IOCTL_MODE_RMFB request, encoder->connector becomes NULL so display_ops->power_on() wouldn't be called so this patch makes exynos_drm_best_encoder function to be used to get a valid encoder of each connector. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_connector.c5
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_connector.h2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c
index 87cf3783efdc..da074746967c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c
@@ -199,8 +199,7 @@ static int exynos_drm_connector_mode_valid(struct drm_connector *connector,
199 return ret; 199 return ret;
200} 200}
201 201
202static struct drm_encoder *exynos_drm_best_encoder( 202struct drm_encoder *exynos_drm_best_encoder(struct drm_connector *connector)
203 struct drm_connector *connector)
204{ 203{
205 struct drm_device *dev = connector->dev; 204 struct drm_device *dev = connector->dev;
206 struct exynos_drm_connector *exynos_connector = 205 struct exynos_drm_connector *exynos_connector =
@@ -231,7 +230,7 @@ static struct drm_connector_helper_funcs exynos_connector_helper_funcs = {
231 230
232void exynos_drm_display_power(struct drm_connector *connector, int mode) 231void exynos_drm_display_power(struct drm_connector *connector, int mode)
233{ 232{
234 struct drm_encoder *encoder = connector->encoder; 233 struct drm_encoder *encoder = exynos_drm_best_encoder(connector);
235 struct exynos_drm_connector *exynos_connector; 234 struct exynos_drm_connector *exynos_connector;
236 struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder); 235 struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder);
237 struct exynos_drm_display_ops *display_ops = manager->display_ops; 236 struct exynos_drm_display_ops *display_ops = manager->display_ops;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.h b/drivers/gpu/drm/exynos/exynos_drm_connector.h
index 40a55c2de4bc..22f6cc442c3d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.h
@@ -31,6 +31,8 @@
31struct drm_connector *exynos_drm_connector_create(struct drm_device *dev, 31struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
32 struct drm_encoder *encoder); 32 struct drm_encoder *encoder);
33 33
34struct drm_encoder *exynos_drm_best_encoder(struct drm_connector *connector);
35
34void exynos_drm_display_power(struct drm_connector *connector, int mode); 36void exynos_drm_display_power(struct drm_connector *connector, int mode);
35 37
36#endif 38#endif
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 96a10c38cd72..db1f7edc53ae 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -57,7 +57,7 @@ static void exynos_drm_connector_power(struct drm_encoder *encoder, int mode)
57 struct drm_connector *connector; 57 struct drm_connector *connector;
58 58
59 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 59 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
60 if (connector->encoder == encoder) { 60 if (exynos_drm_best_encoder(connector) == encoder) {
61 DRM_DEBUG_KMS("connector[%d] dpms[%d]\n", 61 DRM_DEBUG_KMS("connector[%d] dpms[%d]\n",
62 connector->base.id, mode); 62 connector->base.id, mode);
63 63