[PATCH 09/23] drm/exynos: Rename display_op power_on to dpms

Sean Paul seanpaul at chromium.org
Fri Oct 11 02:30:22 CEST 2013


This patch renames the display_op power_on to dpms to accurately reflect
what the function does.

The side-effect of this patch is that the new hdmi dpms callback is now
invoked twice in the dpms path. This is safe and will be dealt with when
the exynos_drm shim goes away.

Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.h     |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_encoder.c |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_fimd.c    |  8 --------
 drivers/gpu/drm/exynos/exynos_drm_hdmi.c    | 10 ++++------
 drivers/gpu/drm/exynos/exynos_drm_hdmi.h    |  3 +--
 drivers/gpu/drm/exynos/exynos_drm_vidi.c    |  8 --------
 drivers/gpu/drm/exynos/exynos_hdmi.c        |  2 +-
 7 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index cbf8fcf..be3d352 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -128,7 +128,7 @@ struct exynos_drm_overlay {
  * @get_edid: get edid modes from display driver.
  * @get_panel: get panel object from display driver.
  * @check_mode: check if mode is valid or not.
- * @power_on: display device on or off.
+ * @dpms: display device on or off.
  */
 struct exynos_drm_display_ops {
 	enum exynos_drm_output_type type;
@@ -137,7 +137,7 @@ struct exynos_drm_display_ops {
 	struct edid *(*get_edid)(void *ctx, struct drm_connector *connector);
 	void *(*get_panel)(void *ctx);
 	int (*check_mode)(void *ctx, struct drm_display_mode *mode);
-	int (*power_on)(void *ctx, int mode);
+	void (*dpms)(void *ctx, int mode);
 };
 
 /*
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index f701d3e..7206114 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -51,8 +51,8 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
 		return;
 	}
 
-	if (display_ops && display_ops->power_on)
-		display_ops->power_on(manager->ctx, mode);
+	if (display_ops && display_ops->dpms)
+		display_ops->dpms(manager->ctx, mode);
 
 	exynos_encoder->dpms = mode;
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index a8f9772..838c47d 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -168,19 +168,11 @@ static int fimd_check_mode(void *in_ctx, struct drm_display_mode *mode)
 	return 0;
 }
 
-static int fimd_display_power_on(void *in_ctx, int mode)
-{
-	/* TODO */
-
-	return 0;
-}
-
 static struct exynos_drm_display_ops fimd_display_ops = {
 	.type = EXYNOS_DISPLAY_TYPE_LCD,
 	.is_connected = fimd_display_is_connected,
 	.get_panel = fimd_get_panel,
 	.check_mode = fimd_check_mode,
-	.power_on = fimd_display_power_on,
 };
 
 static void fimd_win_mode_set(void *in_ctx, struct exynos_drm_overlay *overlay)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
index 689758d..8173e44 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
@@ -151,14 +151,12 @@ static int drm_hdmi_check_mode(void *in_ctx, struct drm_display_mode *mode)
 	return 0;
 }
 
-static int drm_hdmi_power_on(void *in_ctx, int mode)
+static void drm_hdmi_display_dpms(void *in_ctx, int mode)
 {
 	struct drm_hdmi_context *ctx = in_ctx;
 
-	if (hdmi_ops && hdmi_ops->power_on)
-		return hdmi_ops->power_on(ctx->hdmi_ctx->ctx, mode);
-
-	return 0;
+	if (hdmi_ops && hdmi_ops->dpms)
+		hdmi_ops->dpms(ctx->hdmi_ctx->ctx, mode);
 }
 
 static struct exynos_drm_display_ops drm_hdmi_display_ops = {
@@ -167,7 +165,7 @@ static struct exynos_drm_display_ops drm_hdmi_display_ops = {
 	.is_connected = drm_hdmi_is_connected,
 	.get_edid = drm_hdmi_get_edid,
 	.check_mode = drm_hdmi_check_mode,
-	.power_on = drm_hdmi_power_on,
+	.dpms = drm_hdmi_display_dpms,
 };
 
 static int drm_hdmi_enable_vblank(void *in_ctx)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
index cf7b1da..923239b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
@@ -33,14 +33,13 @@ struct exynos_hdmi_ops {
 	struct edid *(*get_edid)(void *ctx,
 			struct drm_connector *connector);
 	int (*check_mode)(void *ctx, struct drm_display_mode *mode);
-	int (*power_on)(void *ctx, int mode);
+	void (*dpms)(void *ctx, int mode);
 
 	/* manager */
 	void (*mode_set)(void *ctx, struct drm_display_mode *mode);
 	void (*get_max_resol)(void *ctx, unsigned int *width,
 				unsigned int *height);
 	void (*commit)(void *ctx);
-	void (*dpms)(void *ctx, int mode);
 };
 
 struct exynos_mixer_ops {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 1220937..35ee49b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -135,20 +135,12 @@ static int vidi_check_mode(void *in_ctx, struct drm_display_mode *mode)
 	return 0;
 }
 
-static int vidi_display_power_on(void *in_ctx, int mode)
-{
-	/* TODO */
-
-	return 0;
-}
-
 static struct exynos_drm_display_ops vidi_display_ops = {
 	.type = EXYNOS_DISPLAY_TYPE_VIDI,
 	.is_connected = vidi_display_is_connected,
 	.get_edid = vidi_get_edid,
 	.get_panel = vidi_get_panel,
 	.check_mode = vidi_check_mode,
-	.power_on = vidi_display_power_on,
 };
 
 static void vidi_dpms(void *in_ctx, int mode)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index a3fba8e..037c6fe 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1760,12 +1760,12 @@ static struct exynos_hdmi_ops hdmi_ops = {
 	.is_connected	= hdmi_is_connected,
 	.get_edid	= hdmi_get_edid,
 	.check_mode	= hdmi_check_mode,
+	.dpms		= hdmi_dpms,
 
 	/* manager */
 	.mode_set	= hdmi_mode_set,
 	.get_max_resol	= hdmi_get_max_resol,
 	.commit		= hdmi_commit,
-	.dpms		= hdmi_dpms,
 };
 
 static irqreturn_t hdmi_irq_thread(int irq, void *arg)
-- 
1.8.4



More information about the dri-devel mailing list