diff mbox

drm/i915: Also disable PSR on Sink when disabling it on Source.

Message ID 000C66961D35964B9714611E548C10AD0C31F54A@BGSMSX104.gar.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

sonika.jindal@intel.com Nov. 24, 2015, 4:40 a.m. UTC
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>

-----Original Message-----
From: Vivi, Rodrigo 
Sent: Tuesday, November 24, 2015 3:50 AM
To: intel-gfx@lists.freedesktop.org
Cc: Vivi, Rodrigo; Jindal, Sonika
Subject: [PATCH] drm/i915: Also disable PSR on Sink when disabling it on Source.

It is not a bad idea to disable the PSR feature on Sink when we are disabling on the Source.

v2: Move dpcd write inside mutex protected area as suggested by Sonika.

Cc: Sonika Jindal <sonika.jindal@intel.com>
Suggested-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.4.3

Comments

Daniel Vetter Nov. 24, 2015, 12:34 p.m. UTC | #1
On Tue, Nov 24, 2015 at 04:40:08AM +0000, Jindal, Sonika wrote:
> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
> 
> -----Original Message-----
> From: Vivi, Rodrigo 
> Sent: Tuesday, November 24, 2015 3:50 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Vivi, Rodrigo; Jindal, Sonika
> Subject: [PATCH] drm/i915: Also disable PSR on Sink when disabling it on Source.
> 
> It is not a bad idea to disable the PSR feature on Sink when we are disabling on the Source.
> 
> v2: Move dpcd write inside mutex protected area as suggested by Sonika.
> 
> Cc: Sonika Jindal <sonika.jindal@intel.com>
> Suggested-by: Sonika Jindal <sonika.jindal@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_psr.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 2b2f84d..3bbb270 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -518,11 +518,15 @@ void intel_psr_disable(struct intel_dp *intel_dp)
>  		return;
>  	}
>  
> +	/* Disable PSR on Source */
>  	if (HAS_DDI(dev))
>  		hsw_psr_disable(intel_dp);
>  	else
>  		vlv_psr_disable(intel_dp);
>  
> +	/* Disable PSR on Sink */
> +	drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0);
> +
>  	dev_priv->psr.enabled = NULL;
>  	mutex_unlock(&dev_priv->psr.lock);
>  
> --
> 2.4.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 2b2f84d..3bbb270 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -518,11 +518,15 @@  void intel_psr_disable(struct intel_dp *intel_dp)
 		return;
 	}
 
+	/* Disable PSR on Source */
 	if (HAS_DDI(dev))
 		hsw_psr_disable(intel_dp);
 	else
 		vlv_psr_disable(intel_dp);
 
+	/* Disable PSR on Sink */
+	drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0);
+
 	dev_priv->psr.enabled = NULL;
 	mutex_unlock(&dev_priv->psr.lock);