CHROMIUM: drm/exynos: Remove panel_ops->commit
authorDaniel Kurtz <djkurtz@chromium.org>
Fri, 12 Apr 2013 06:47:37 +0000 (14:47 +0800)
committerChromeBot <chrome-bot@google.com>
Fri, 19 Apr 2013 03:56:09 +0000 (20:56 -0700)
The explicit panel_ops->commit() functions are really just doing what
DPMS(On) should be doing.  In fact, hdmi_commit literally gets called
twice in the mode_set path: once in DPMS(On) and again in the explicitly
by exynos_drm_encoder_commit().

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium:189108
TEST=Sanity check LCD display
TEST=Sanity check HDMI attached monitor at Boot
TEST=Sanity check HDMI attached monitor hotplug 2 times
TEST=run_remote_tests.sh --board=daisy --remote=${IP} power_Resume/control$

Change-Id: I07ce63255d5d209b127babd24213f70e42131185
Reviewed-on: https://gerrit.chromium.org/gerrit/47755
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
drivers/gpu/drm/exynos/exynos_dp_core.c
drivers/gpu/drm/exynos/exynos_drm_display.h
drivers/gpu/drm/exynos/exynos_drm_encoder.c
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/exynos/exynos_hdmi.c

index 1cf5289..73d32c8 100644 (file)
@@ -977,13 +977,6 @@ static void exynos_dp_train_link(struct exynos_dp_device *dp)
        exynos_dp_init_video(dp);
 }
 
-static void exynos_dp_commit(void *ctx)
-{
-       struct exynos_dp_device *dp = ctx;
-
-       exynos_dp_config_video(dp);
-}
-
 static int exynos_dp_power_off(struct exynos_dp_device *dp)
 {
        if (!dp->enabled)
@@ -1023,7 +1016,7 @@ static int exynos_dp_power_on(struct exynos_dp_device *dp)
                schedule_work(&dp->hotplug_work);
 
        exynos_dp_train_link(dp);
-       exynos_dp_commit(dp);
+       exynos_dp_config_video(dp);
 
        dp->enabled = true;
        return 0;
@@ -1095,7 +1088,6 @@ static struct exynos_panel_ops dp_panel_ops = {
        .is_connected = exynos_dp_is_connected,
        .check_timing = exynos_dp_check_timing,
        .dpms = exynos_dp_dpms,
-       .commit = exynos_dp_commit,
 };
 
 static int __devinit exynos_dp_probe(struct platform_device *pdev)
index fac7410..dc0a987 100644 (file)
@@ -23,10 +23,9 @@ struct exynos_drm_overlay;
  * @is_connected: Returns true if the panel is connected
  * @get_edid: Returns an edid with mode data from the panel
  * @check_timing: Returns 0 if the given timing is valid for the panel
- * @dpms: Sets the panel's power to mode
+ * @dpms: Sets the panel's power to mode and enables/disables video output
  * @mode_fixup: Copies and optionally alters mode to adjusted_mode
  * @mode_set: Sets the panel to output mode
- * @commit: Commits changes to the panel from mode_set
  * @get_max_res: Returns the maximum resolution in width/height
  */
 struct exynos_panel_ops {
@@ -39,7 +38,6 @@ struct exynos_panel_ops {
                                struct drm_display_mode *mode,
                                struct drm_display_mode *adjusted_mode);
        void (*mode_set)(void *ctx, struct drm_display_mode *mode);
-       void (*commit)(void *ctx);
        void (*get_max_res)(void *ctx, unsigned int *width,
                                unsigned int *height);
 };
index ff70ef7..7573c41 100644 (file)
@@ -115,15 +115,10 @@ static void exynos_drm_encoder_prepare(struct drm_encoder *encoder)
 
 static void exynos_drm_encoder_commit(struct drm_encoder *encoder)
 {
-       struct exynos_drm_display *display = exynos_drm_get_display(encoder);
-
        DRM_DEBUG_KMS("[ENCODER:%d:%s]\n", DRM_BASE_ID(encoder),
                        drm_get_encoder_name(encoder));
 
        exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
-
-       if (display->panel_ops->commit)
-               display->panel_ops->commit(display->panel_ctx);
 }
 
 static struct drm_crtc *
index 2162561..04cd8be 100644 (file)
@@ -171,22 +171,11 @@ static int vidi_display_power(void *ctx, int mode)
        return 0;
 }
 
-static void vidi_commit(void *ctx)
-{
-       struct vidi_context *vidi_ctx = ctx;
-
-       DRM_DEBUG_KMS("[CRTC:%d]\n", DRM_BASE_ID(vidi_ctx->crtc));
-
-       if (vidi_ctx->suspended)
-               return;
-}
-
 static struct exynos_panel_ops vidi_panel_ops = {
        .is_connected = vidi_display_is_connected,
        .get_edid = vidi_get_edid,
        .check_timing = vidi_check_timing,
        .power = vidi_display_power,
-       .commit = vidi_commit,
 };
 
 static int vidi_dpms(void *ctx, int mode)
index 87ffe80..0f7121e 100644 (file)
@@ -1892,18 +1892,6 @@ static void hdmi_mode_set(void *ctx, struct drm_display_mode *mode)
                hdmi_v14_mode_set(hdata, mode);
 }
 
-static void hdmi_commit(void *ctx)
-{
-       struct hdmi_context *hdata = ctx;
-
-       DRM_DEBUG_KMS("is_hdmi_powered_on: %u\n", hdata->is_hdmi_powered_on);
-
-       if (!hdata->is_hdmi_powered_on)
-               return;
-
-       hdmi_conf_apply(hdata);
-}
-
 static int hdmiphy_update_bits(struct i2c_client *client, u8 *reg_cache,
                               u8 reg, u8 mask, u8 val)
 {
@@ -2012,7 +2000,7 @@ static void hdmi_resource_poweron(struct hdmi_context *hdata)
        hdmi_conf_init(hdata);
        if (!hdata->is_soc_exynos5)
                hdmi_audio_init(hdata);
-       hdmi_commit(hdata);
+       hdmi_conf_apply(hdata);
 }
 
 static void hdmi_resource_poweroff(struct hdmi_context *hdata)
@@ -2090,7 +2078,6 @@ static struct exynos_panel_ops hdmi_ops = {
        /* manager */
        .mode_fixup     = hdmi_mode_fixup,
        .mode_set       = hdmi_mode_set,
-       .commit         = hdmi_commit,
 };
 
 /*