From e900a9ed15797ddba95ff9a9bbeef3928e8a55bc Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 12 Apr 2013 14:47:37 +0800 Subject: [PATCH] CHROMIUM: drm/exynos: Remove panel_ops->commit 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 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 Reviewed-by: Daniel Kurtz Tested-by: Daniel Kurtz --- drivers/gpu/drm/exynos/exynos_dp_core.c | 10 +--------- drivers/gpu/drm/exynos/exynos_drm_display.h | 4 +--- drivers/gpu/drm/exynos/exynos_drm_encoder.c | 5 ----- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 11 ----------- drivers/gpu/drm/exynos/exynos_hdmi.c | 15 +-------------- 5 files changed, 3 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index 1cf52897ea25..73d32c81e94f 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -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) diff --git a/drivers/gpu/drm/exynos/exynos_drm_display.h b/drivers/gpu/drm/exynos/exynos_drm_display.h index fac741004418..dc0a987524eb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_display.h +++ b/drivers/gpu/drm/exynos/exynos_drm_display.h @@ -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); }; diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index ff70ef7489d8..7573c414aa30 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c @@ -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 * diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 2162561b50e9..04cd8bea2e37 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -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) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 87ffe8088879..0f7121e66ab9 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -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, }; /* -- 2.20.1