diff mbox series

drm/i915/display: Use int type for entry_setup_frames

Message ID 20231116090512.480373-1-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Use int type for entry_setup_frames | expand

Commit Message

Mika Kahola Nov. 16, 2023, 9:05 a.m. UTC
entry_setup_frames variable is defined as u8. However, the
function call intel_psr_entry_setup_frames() can return
negative error code. There is a type mismatch here, so let's
switch to use int here as well.

Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier")

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Govindapillai Nov. 22, 2023, 1:53 p.m. UTC | #1
On Thu, 2023-11-16 at 11:05 +0200, Mika Kahola wrote:
> entry_setup_frames variable is defined as u8. However, the
> function call intel_psr_entry_setup_frames() can return
> negative error code. There is a type mismatch here, so let's
> switch to use int here as well.
> 
> Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame
> earlier")
> 
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 8d180132a74b..204da50e3f28 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1319,7 +1319,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
>  {
>         struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
>         const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
> -       u8 entry_setup_frames;
> +       int entry_setup_frames;
>  
>         /*
>          * Current PSR panels don't work reliably with VRR enabled
Mika Kahola Nov. 23, 2023, 7:07 a.m. UTC | #2
> -----Original Message-----
> From: Govindapillai, Vinod <vinod.govindapillai@intel.com>
> Sent: Wednesday, November 22, 2023 3:53 PM
> To: Kahola, Mika <mika.kahola@intel.com>; intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Use int type for entry_setup_frames
> 
> On Thu, 2023-11-16 at 11:05 +0200, Mika Kahola wrote:
> > entry_setup_frames variable is defined as u8. However, the function
> > call intel_psr_entry_setup_frames() can return negative error code.
> > There is a type mismatch here, so let's switch to use int here as
> > well.
> >
> > Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet
> > to be transmitted one frame
> > earlier")
> >
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>

The patch is now merged. Thanks for the review!

-Mika-
> 
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 8d180132a74b..204da50e3f28 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1319,7 +1319,7 @@ static bool _psr_compute_config(struct intel_dp
> > *intel_dp,
> >  {
> >         struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> >         const struct drm_display_mode *adjusted_mode =
> > &crtc_state->hw.adjusted_mode;
> > -       u8 entry_setup_frames;
> > +       int entry_setup_frames;
> >
> >         /*
> >          * Current PSR panels don't work reliably with VRR enabled
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 8d180132a74b..204da50e3f28 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1319,7 +1319,7 @@  static bool _psr_compute_config(struct intel_dp *intel_dp,
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 	const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
-	u8 entry_setup_frames;
+	int entry_setup_frames;
 
 	/*
 	 * Current PSR panels don't work reliably with VRR enabled