diff mbox series

drm/i915/psr: Do not re-activate PSR if there was a PSR aux error

Message ID 20220916110804.233449-1-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/psr: Do not re-activate PSR if there was a PSR aux error | expand

Commit Message

Hogander, Jouni Sept. 16, 2022, 11:08 a.m. UTC
If there is a PSR aux error sink is marked as not reliable
and PSR is permantently disabled.

Current code is activating PSR again even there was PSR aux error.
Fix this by skipping intel_psr_activate when PSR aux error is
detected.

Cc: Mika Kahola <mika.kahola@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>

Reported-by: Charlton Lin <charlton.lin@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Gwan-gyeong Mun Sept. 16, 2022, 11:43 a.m. UTC | #1
Looks good to me.

Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>

On 9/16/22 2:08 PM, Jouni Högander wrote:
> If there is a PSR aux error sink is marked as not reliable
> and PSR is permantently disabled.
> 
> Current code is activating PSR again even there was PSR aux error.
> Fix this by skipping intel_psr_activate when PSR aux error is
> detected.
> 
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> 
> Reported-by: Charlton Lin <charlton.lin@intel.com>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9def8d9fade6..42390203ad19 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2153,8 +2153,10 @@ static void intel_psr_work(struct work_struct *work)
>   	if (!intel_dp->psr.enabled)
>   		goto unlock;
>   
> -	if (READ_ONCE(intel_dp->psr.irq_aux_error))
> +	if (READ_ONCE(intel_dp->psr.irq_aux_error)) {
>   		intel_psr_handle_irq(intel_dp);
> +		goto unlock;
> +	}
>   
>   	/*
>   	 * We have to make sure PSR is ready for re-enable
Souza, Jose Sept. 16, 2022, 1:22 p.m. UTC | #2
On Fri, 2022-09-16 at 14:08 +0300, Jouni Högander wrote:
> If there is a PSR aux error sink is marked as not reliable
> and PSR is permantently disabled.
> 
> Current code is activating PSR again even there was PSR aux error.
> Fix this by skipping intel_psr_activate when PSR aux error is
> detected.
> 
> Cc: Mika Kahola <mika.kahola@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> 
> Reported-by: Charlton Lin <charlton.lin@intel.com>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9def8d9fade6..42390203ad19 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2153,8 +2153,10 @@ static void intel_psr_work(struct work_struct *work)
>  	if (!intel_dp->psr.enabled)
>  		goto unlock;
>  
> -	if (READ_ONCE(intel_dp->psr.irq_aux_error))
> +	if (READ_ONCE(intel_dp->psr.irq_aux_error)) {
>  		intel_psr_handle_irq(intel_dp);
> +		goto unlock;
> +	}

Already handled.
__psr_wait_for_idle_locked
		if (!intel_dp->psr.enabled)
			return false;

>  
>  	/*
>  	 * We have to make sure PSR is ready for re-enable
Hogander, Jouni Sept. 16, 2022, 2 p.m. UTC | #3
On Fri, 2022-09-16 at 13:22 +0000, Souza, Jose wrote:
> On Fri, 2022-09-16 at 14:08 +0300, Jouni Högander wrote:
> > If there is a PSR aux error sink is marked as not reliable
> > and PSR is permantently disabled.
> > 
> > Current code is activating PSR again even there was PSR aux error.
> > Fix this by skipping intel_psr_activate when PSR aux error is
> > detected.
> > 
> > Cc: Mika Kahola <mika.kahola@intel.com>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > 
> > Reported-by: Charlton Lin <charlton.lin@intel.com>
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 9def8d9fade6..42390203ad19 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2153,8 +2153,10 @@ static void intel_psr_work(struct
> > work_struct *work)
> >         if (!intel_dp->psr.enabled)
> >                 goto unlock;
> >  
> > -       if (READ_ONCE(intel_dp->psr.irq_aux_error))
> > +       if (READ_ONCE(intel_dp->psr.irq_aux_error)) {
> >                 intel_psr_handle_irq(intel_dp);
> > +               goto unlock;
> > +       }
> 
> Already handled.
> __psr_wait_for_idle_locked
>                 if (!intel_dp->psr.enabled)
>                         return false;

Ah, yes that is correct. Thank you for pointing this out. So this patch
is not needed.

> 
> >  
> >         /*
> >          * We have to make sure PSR is ready for re-enable
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 9def8d9fade6..42390203ad19 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2153,8 +2153,10 @@  static void intel_psr_work(struct work_struct *work)
 	if (!intel_dp->psr.enabled)
 		goto unlock;
 
-	if (READ_ONCE(intel_dp->psr.irq_aux_error))
+	if (READ_ONCE(intel_dp->psr.irq_aux_error)) {
 		intel_psr_handle_irq(intel_dp);
+		goto unlock;
+	}
 
 	/*
 	 * We have to make sure PSR is ready for re-enable