All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: heminhong <heminhong@kylinos.cn>
Cc: "Ville Syrjälä" <ville.syrjala@intel.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	daniel@ffwll.ch, airlied@gmail.com,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: eliminate warnings
Date: Mon, 13 Nov 2023 15:31:56 -0500	[thread overview]
Message-ID: <ZVKHvNqDsblTfJ8A@intel.com> (raw)
In-Reply-To: <20231113033613.30339-1-heminhong@kylinos.cn>

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
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: heminhong <heminhong@kylinos.cn>
Cc: tvrtko.ursulin@linux.intel.com,
	"Ville Syrjälä" <ville.syrjala@intel.com>,
	animesh.manna@intel.com, linux-kernel@vger.kernel.org,
	uma.shankar@intel.com, dri-devel@lists.freedesktop.org,
	ankit.k.nautiyal@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: eliminate warnings
Date: Mon, 13 Nov 2023 15:31:56 -0500	[thread overview]
Message-ID: <ZVKHvNqDsblTfJ8A@intel.com> (raw)
In-Reply-To: <20231113033613.30339-1-heminhong@kylinos.cn>

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
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: heminhong <heminhong@kylinos.cn>
Cc: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	tvrtko.ursulin@linux.intel.com, airlied@gmail.com,
	daniel@ffwll.ch, ville.syrjala@linux.intel.com,
	animesh.manna@intel.com, uma.shankar@intel.com,
	ankit.k.nautiyal@intel.com, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Ville Syrjälä" <ville.syrjala@intel.com>
Subject: Re: [PATCH] drm/i915: eliminate warnings
Date: Mon, 13 Nov 2023 15:31:56 -0500	[thread overview]
Message-ID: <ZVKHvNqDsblTfJ8A@intel.com> (raw)
In-Reply-To: <20231113033613.30339-1-heminhong@kylinos.cn>

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
> 

  parent reply	other threads:[~2023-11-13 20:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  3:36 [Intel-gfx] [PATCH] drm/i915: eliminate warnings heminhong
2023-11-13  3:36 ` heminhong
2023-11-13  3:36 ` heminhong
2023-11-13 19:06 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2023-11-13 20:31 ` Rodrigo Vivi [this message]
2023-11-13 20:31   ` [PATCH] " Rodrigo Vivi
2023-11-13 20:31   ` Rodrigo Vivi
2023-11-14  2:43 ` [Intel-gfx] [PATCH v2] drm/i915: correct the input parameter on _intel_dsb_commit() heminhong
2023-11-14  2:43   ` heminhong
2023-11-14  2:43   ` heminhong
2023-11-29 17:26   ` [Intel-gfx] " Jani Nikula
2023-11-29 17:26     ` Jani Nikula
2023-11-29 17:26     ` Jani Nikula
2023-11-17 19:31 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: eliminate warnings (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZVKHvNqDsblTfJ8A@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heminhong@kylinos.cn \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ville.syrjala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.