diff mbox

[04/10] drm/i915/psr: disable aux_frame_sync on psr2 exit

Message ID 1483356663-32668-5-git-send-email-vathsala.nagaraju@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

vathsala nagaraju Jan. 2, 2017, 11:30 a.m. UTC
Screen freeze observed if AUX_FRAME_SYNC is not disabled
on psr2 exit.AUX_FRAME_SYNC needed for psr2 is enabled during
psr2 entry. It must be disabled on psr2 exit.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
Signed-off-by: Patil Deepti <deepti.patil@intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Rodrigo Vivi Jan. 5, 2017, 6 p.m. UTC | #1
makes sense


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>


On Mon, Jan 02, 2017 at 05:00:57PM +0530, vathsala nagaraju wrote:
> Screen freeze observed if AUX_FRAME_SYNC is not disabled
> on psr2 exit.AUX_FRAME_SYNC needed for psr2 is enabled during
> psr2 entry. It must be disabled on psr2 exit.
> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Jim Bride <jim.bride@linux.intel.com>
> Signed-off-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
> Signed-off-by: Patil Deepti <deepti.patil@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_psr.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index ff2ecfd..93eb0f0 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -589,6 +589,11 @@ static void hsw_psr_disable(struct intel_dp *intel_dp)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  
>  	if (dev_priv->psr.active) {
> +		if (dev_priv->psr.aux_frame_sync)
> +			drm_dp_dpcd_writeb(&intel_dp->aux,
> +					DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF,
> +					0);
> +
>  		if (dev_priv->psr.psr2_support)
>  			I915_WRITE(EDP_PSR2_CTL,
>  				I915_READ(EDP_PSR2_CTL) &
> @@ -729,6 +734,10 @@ static void intel_psr_exit(struct drm_i915_private *dev_priv)
>  		return;
>  
>  	if (HAS_DDI(dev_priv)) {
> +		if (dev_priv->psr.aux_frame_sync)
> +			drm_dp_dpcd_writeb(&intel_dp->aux,
> +					DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF,
> +					0);
>  		if (dev_priv->psr.psr2_support) {
>  			val = I915_READ(EDP_PSR2_CTL);
>  			WARN_ON(!(val & EDP_PSR2_ENABLE));
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index ff2ecfd..93eb0f0 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -589,6 +589,11 @@  static void hsw_psr_disable(struct intel_dp *intel_dp)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 
 	if (dev_priv->psr.active) {
+		if (dev_priv->psr.aux_frame_sync)
+			drm_dp_dpcd_writeb(&intel_dp->aux,
+					DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF,
+					0);
+
 		if (dev_priv->psr.psr2_support)
 			I915_WRITE(EDP_PSR2_CTL,
 				I915_READ(EDP_PSR2_CTL) &
@@ -729,6 +734,10 @@  static void intel_psr_exit(struct drm_i915_private *dev_priv)
 		return;
 
 	if (HAS_DDI(dev_priv)) {
+		if (dev_priv->psr.aux_frame_sync)
+			drm_dp_dpcd_writeb(&intel_dp->aux,
+					DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF,
+					0);
 		if (dev_priv->psr.psr2_support) {
 			val = I915_READ(EDP_PSR2_CTL);
 			WARN_ON(!(val & EDP_PSR2_ENABLE));