Skip to content

Commit

Permalink
drm/exynos: hdmi: fix power order issue
Browse files Browse the repository at this point in the history
This patch resolves page fault issue of Mixer when disabled.

The SFRs of VP and Mixer are updated by Vertical Sync of Timing
generator which is a part of HDMI so the sequence to disable TV
Subsystem should be as following:
	VP -> Mixer -> HDMI

For this, this patch disables Mixer and VP (if used) prior to
disabling HDMI.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Inki Dae committed Jun 24, 2014
1 parent a497c3b commit 245f98f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2090,6 +2090,11 @@ static void hdmi_poweroff(struct exynos_drm_display *display)

static void hdmi_dpms(struct exynos_drm_display *display, int mode)
{
struct hdmi_context *hdata = display->ctx;
struct drm_encoder *encoder = hdata->encoder;
struct drm_crtc *crtc = encoder->crtc;
struct drm_crtc_helper_funcs *funcs = NULL;

DRM_DEBUG_KMS("mode %d\n", mode);

switch (mode) {
Expand All @@ -2099,6 +2104,20 @@ static void hdmi_dpms(struct exynos_drm_display *display, int mode)
case DRM_MODE_DPMS_STANDBY:
case DRM_MODE_DPMS_SUSPEND:
case DRM_MODE_DPMS_OFF:
/*
* The SFRs of VP and Mixer are updated by Vertical Sync of
* Timing generator which is a part of HDMI so the sequence
* to disable TV Subsystem should be as following,
* VP -> Mixer -> HDMI
*
* Below codes will try to disable Mixer and VP(if used)
* prior to disabling HDMI.
*/
if (crtc)
funcs = crtc->helper_private;
if (funcs && funcs->dpms)
(*funcs->dpms)(crtc, mode);

hdmi_poweroff(display);
break;
default:
Expand Down

0 comments on commit 245f98f

Please sign in to comment.