From 19cf5af9134292d8214bfb68f43fba26a00deb31 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 6 Sep 2012 22:15:40 +0200 Subject: [PATCH] --- yaml --- r: 329478 b: refs/heads/master c: bf49ec8c5241ca1985269ce77df08021a5dd1589 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/gpu/drm/i915/intel_display.c | 8 ++++++++ trunk/drivers/gpu/drm/i915/intel_drv.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index c1736bcdd6cd..6f867ebd7847 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fba92150aa9959b8f1fa39455315f5e8c59bb702 +refs/heads/master: bf49ec8c5241ca1985269ce77df08021a5dd1589 diff --git a/trunk/drivers/gpu/drm/i915/intel_display.c b/trunk/drivers/gpu/drm/i915/intel_display.c index d771f2f37678..ea707fcbc40a 100644 --- a/trunk/drivers/gpu/drm/i915/intel_display.c +++ b/trunk/drivers/gpu/drm/i915/intel_display.c @@ -3242,6 +3242,10 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) else ironlake_fdi_disable(crtc); + for_each_encoder_on_crtc(dev, crtc, encoder) + if (encoder->pre_enable) + encoder->pre_enable(encoder); + /* Enable panel fitting for LVDS */ if (dev_priv->pch_pf_size && (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) || HAS_eDP)) { @@ -3311,6 +3315,10 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) I915_WRITE(PF_CTL(pipe), 0); I915_WRITE(PF_WIN_SZ(pipe), 0); + for_each_encoder_on_crtc(dev, crtc, encoder) + if (encoder->post_disable) + encoder->post_disable(encoder); + ironlake_fdi_disable(crtc); /* This is a horrible layering violation; we should be doing this in diff --git a/trunk/drivers/gpu/drm/i915/intel_drv.h b/trunk/drivers/gpu/drm/i915/intel_drv.h index 4f2b2d6a2489..351fd7179cd7 100644 --- a/trunk/drivers/gpu/drm/i915/intel_drv.h +++ b/trunk/drivers/gpu/drm/i915/intel_drv.h @@ -152,8 +152,10 @@ struct intel_encoder { bool cloneable; bool connectors_active; void (*hot_plug)(struct intel_encoder *); + void (*pre_enable)(struct intel_encoder *); void (*enable)(struct intel_encoder *); void (*disable)(struct intel_encoder *); + void (*post_disable)(struct intel_encoder *); /* Read out the current hw state of this connector, returning true if * the encoder is active. If the encoder is enabled it also set the pipe * it is connected to in the pipe parameter. */