dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: eliminate warnings
@ 2023-11-13  3:36 heminhong
  2023-11-13 20:31 ` Rodrigo Vivi
  2023-11-14  2:43 ` [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit() heminhong
  0 siblings, 2 replies; 4+ messages in thread
From: heminhong @ 2023-11-13  3:36 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin,
	airlied, daniel, ville.syrjala, animesh.manna, uma.shankar,
	ankit.k.nautiyal
  Cc: intel-gfx, linux-kernel, dri-devel, heminhong

Current, the dewake_scanline variable is defined as unsigned int,
an unsigned int variable that is always greater than or equal to 0.
when _intel_dsb_commit function is called by intel_dsb_commit function,
the dewake_scanline variable may have an int value.
So the dewake_scanline variable is necessary to defined as an int.

Signed-off-by: heminhong <heminhong@kylinos.cn>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 78b6fe24dcd8..7fd6280c54a7 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
 }
 
 static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
-			      unsigned int dewake_scanline)
+			      int dewake_scanline)
 {
 	struct intel_crtc *crtc = dsb->crtc;
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: eliminate warnings
  2023-11-13  3:36 [PATCH] drm/i915: eliminate warnings heminhong
@ 2023-11-13 20:31 ` Rodrigo Vivi
  2023-11-14  2:43 ` [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit() heminhong
  1 sibling, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2023-11-13 20:31 UTC (permalink / raw)
  To: heminhong
  Cc: tvrtko.ursulin, Ville Syrjälä, animesh.manna,
	linux-kernel, uma.shankar, dri-devel, ankit.k.nautiyal, intel-gfx

On Mon, Nov 13, 2023 at 11:36:13AM +0800, heminhong wrote:
> Current, the dewake_scanline variable is defined as unsigned int,
> an unsigned int variable that is always greater than or equal to 0.
> when _intel_dsb_commit function is called by intel_dsb_commit function,
> the dewake_scanline variable may have an int value.
> So the dewake_scanline variable is necessary to defined as an int.

A good catch. But this patch deserves a better commit subject since
it is not just fixing 'warnings' but the behavior of this function
accounts on the -1 that is explicitly given as input in some cases.

> 
> Signed-off-by: heminhong <heminhong@kylinos.cn>

also perhaps:
Fixes: f83b94d23770 ("drm/i915/dsb: Use DEwake to combat PkgC latency")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>

?

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 78b6fe24dcd8..7fd6280c54a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
>  }
>  
>  static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> -			      unsigned int dewake_scanline)
> +			      int dewake_scanline)
>  {
>  	struct intel_crtc *crtc = dsb->crtc;
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit()
  2023-11-13  3:36 [PATCH] drm/i915: eliminate warnings heminhong
  2023-11-13 20:31 ` Rodrigo Vivi
@ 2023-11-14  2:43 ` heminhong
  2023-11-29 17:26   ` Jani Nikula
  1 sibling, 1 reply; 4+ messages in thread
From: heminhong @ 2023-11-14  2:43 UTC (permalink / raw)
  To: heminhong
  Cc: tvrtko.ursulin, kernel test robot, animesh.manna, linux-kernel,
	dri-devel, Uma Shankar, rodrigo.vivi, ankit.k.nautiyal, intel-gfx

Current, the dewake_scanline variable is defined as unsigned int,
an unsigned int variable that is always greater than or equal to 0.
when _intel_dsb_commit function is called by intel_dsb_commit function,
the dewake_scanline variable may have an int value.
So the dewake_scanline variable is necessary to defined as an int.

Fixes: f83b94d23770 ("drm/i915/dsb: Use DEwake to combat PkgC latency")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310052201.AnVbpgPr-lkp@intel.com/
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>

Signed-off-by: heminhong <heminhong@kylinos.cn>
---
 drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 78b6fe24dcd8..7fd6280c54a7 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
 }
 
 static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
-			      unsigned int dewake_scanline)
+			      int dewake_scanline)
 {
 	struct intel_crtc *crtc = dsb->crtc;
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit()
  2023-11-14  2:43 ` [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit() heminhong
@ 2023-11-29 17:26   ` Jani Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2023-11-29 17:26 UTC (permalink / raw)
  To: heminhong, heminhong
  Cc: tvrtko.ursulin, kernel test robot, animesh.manna, linux-kernel,
	dri-devel, Uma Shankar, rodrigo.vivi, ankit.k.nautiyal, intel-gfx

On Tue, 14 Nov 2023, heminhong <heminhong@kylinos.cn> wrote:
> Current, the dewake_scanline variable is defined as unsigned int,
> an unsigned int variable that is always greater than or equal to 0.
> when _intel_dsb_commit function is called by intel_dsb_commit function,
> the dewake_scanline variable may have an int value.
> So the dewake_scanline variable is necessary to defined as an int.
>
> Fixes: f83b94d23770 ("drm/i915/dsb: Use DEwake to combat PkgC latency")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202310052201.AnVbpgPr-lkp@intel.com/
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Uma Shankar <uma.shankar@intel.com>
>
> Signed-off-by: heminhong <heminhong@kylinos.cn>

Pushed to drm-intel-next, thanks for the patch.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 78b6fe24dcd8..7fd6280c54a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
>  }
>  
>  static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> -			      unsigned int dewake_scanline)
> +			      int dewake_scanline)
>  {
>  	struct intel_crtc *crtc = dsb->crtc;
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-29 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13  3:36 [PATCH] drm/i915: eliminate warnings heminhong
2023-11-13 20:31 ` Rodrigo Vivi
2023-11-14  2:43 ` [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit() heminhong
2023-11-29 17:26   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).