diff mbox

drm/exynos: fix display power call issue.

Message ID 1348484866-6487-1-git-send-email-inki.dae@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Inki Dae Sept. 24, 2012, 11:07 a.m. UTC
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>
---
 drivers/gpu/drm/exynos/exynos_drm_connector.h |    2 ++
 drivers/gpu/drm/exynos/exynos_drm_encoder.c   |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.h b/drivers/gpu/drm/exynos/exynos_drm_connector.h
index 40a55c2..22f6cc4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_connector.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_connector.h
@@ -31,6 +31,8 @@ 
 struct drm_connector *exynos_drm_connector_create(struct drm_device *dev,
 						   struct drm_encoder *encoder);
 
+struct drm_encoder *exynos_drm_best_encoder(struct drm_connector *connector);
+
 void exynos_drm_display_power(struct drm_connector *connector, int mode);
 
 #endif
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index b8bbff0..60add3b 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)
 	struct drm_connector *connector;
 
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-		if (connector->encoder == encoder) {
+		if (exynos_drm_best_encoder(connector) == encoder) {
 			DRM_DEBUG_KMS("connector[%d] dpms[%d]\n",
 					connector->base.id, mode);