On Sat, 2025-09-06 at 15:39 +0200, Michał Grzelak wrote:
> On Wed, 27 Aug 2025 09:08:09 +0300, Jouni Högander wrote:
> > Currently return value of drm_dpcd_readb is not checked when
> > reading sink
> > Panel Replay Selective Update capabilities.
> > 
> > Fix this and switch to drm_dpcd_read_byte.
> > 
> > Signed-off-by: Jouni Högander <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 8b4cdf9b30db..f2b9a733637a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -494,12 +494,14 @@ static u8 intel_dp_get_su_capability(struct
> > intel_dp *intel_dp)
> >  {
> >     u8 su_capability = 0;
> >  
> > -   if (intel_dp->psr.sink_panel_replay_su_support)
> > -           drm_dp_dpcd_readb(&intel_dp->aux,
> > -                             DP_PANEL_REPLAY_CAP_CAPABILITY,
> > -                             &su_capability);
> > -   else
> > +   if (intel_dp->psr.sink_panel_replay_su_support) {
> > +           if (drm_dp_dpcd_read_byte(&intel_dp->aux,
> > +                                    
> > DP_PANEL_REPLAY_CAP_CAPABILITY,
> > +                                     &su_capability) < 0)
> > +                   return 0;
> > +   } else {
> >             su_capability = intel_dp->psr_dpcd[1];
> > +   }
> >  
> >     return su_capability;
> >  }
> 
> Reviewed-by: Michał Grzelak <[email protected]>

Thank you Michal and Mika for your reviews. This is now pushed to drm-
intel-next.

BR,

Jouni Högander


Reply via email to