[11/12] drm/i915: Disable CRT port after pipe on PCH platforms
diff mbox

Message ID 1430835458-11187-12-git-send-email-ville.syrjala@linux.intel.com
State New
Headers show

Commit Message

Ville Syrjälä May 5, 2015, 2:17 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Follow the BSpec sequence for the CRT port as well on PCH platforms,
ie. disable the pipe before the port.

Didn't bother looking at DDI in detail yet, so leave that one be even
though the CRT is a PCH port there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_crt.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Jesse Barnes May 21, 2015, 7:26 p.m. UTC | #1
On 05/05/2015 07:17 AM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Follow the BSpec sequence for the CRT port as well on PCH platforms,
> ie. disable the pipe before the port.
> 
> Didn't bother looking at DDI in detail yet, so leave that one be even
> though the CRT is a PCH port there.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_crt.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index 93bb515..521af2c 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -207,6 +207,14 @@ static void intel_disable_crt(struct intel_encoder *encoder)
>  	intel_crt_set_dpms(encoder, DRM_MODE_DPMS_OFF);
>  }
>  
> +static void pch_disable_crt(struct intel_encoder *encoder)
> +{
> +}
> +
> +static void pch_post_disable_crt(struct intel_encoder *encoder)
> +{
> +	intel_disable_crt(encoder);
> +}
>  
>  static void hsw_crt_post_disable(struct intel_encoder *encoder)
>  {
> @@ -888,7 +896,12 @@ void intel_crt_init(struct drm_device *dev)
>  		crt->adpa_reg = ADPA;
>  
>  	crt->base.compute_config = intel_crt_compute_config;
> -	crt->base.disable = intel_disable_crt;
> +	if (HAS_PCH_SPLIT(dev) && !HAS_DDI(dev)) {
> +		crt->base.disable = pch_disable_crt;
> +		crt->base.post_disable = pch_post_disable_crt;
> +	} else {
> +		crt->base.disable = intel_disable_crt;
> +	}
>  	crt->base.enable = intel_enable_crt;
>  	if (I915_HAS_HOTPLUG(dev))
>  		crt->base.hpd_pin = HPD_CRT;
> 

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 93bb515..521af2c 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -207,6 +207,14 @@  static void intel_disable_crt(struct intel_encoder *encoder)
 	intel_crt_set_dpms(encoder, DRM_MODE_DPMS_OFF);
 }
 
+static void pch_disable_crt(struct intel_encoder *encoder)
+{
+}
+
+static void pch_post_disable_crt(struct intel_encoder *encoder)
+{
+	intel_disable_crt(encoder);
+}
 
 static void hsw_crt_post_disable(struct intel_encoder *encoder)
 {
@@ -888,7 +896,12 @@  void intel_crt_init(struct drm_device *dev)
 		crt->adpa_reg = ADPA;
 
 	crt->base.compute_config = intel_crt_compute_config;
-	crt->base.disable = intel_disable_crt;
+	if (HAS_PCH_SPLIT(dev) && !HAS_DDI(dev)) {
+		crt->base.disable = pch_disable_crt;
+		crt->base.post_disable = pch_post_disable_crt;
+	} else {
+		crt->base.disable = intel_disable_crt;
+	}
 	crt->base.enable = intel_enable_crt;
 	if (I915_HAS_HOTPLUG(dev))
 		crt->base.hpd_pin = HPD_CRT;