public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
Date: Wed, 15 Nov 2017 17:12:15 -0800	[thread overview]
Message-ID: <20171116011215.sbtm7253e4thytem@intel.com> (raw)
In-Reply-To: <20171115105036.1094-3-chris@chris-wilson.co.uk>

On Wed, Nov 15, 2017 at 10:50:35AM +0000, Chris Wilson wrote:
> clang spots
> 
> drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>         if (INTEL_GEN(dev_priv) >= 10)
> 
> but fortunately for us we skip the function unless on a gen10+ device.
> However, to keep the function generic in case we do want to re-enable it
> for gen9 again, initialise trans_min to 0.

Based on this comment:  /* Transition WM are not recommended by HW team for GEN9 */

I believe the function should be called cnl_compute_transition_wm

plus:

-  uint16_t trans_min, trans_y_tile_min;
+  u16 trans_min = 4, trans_y_tile_min;

-  if (INTEL_GEN(dev_priv) >= 10)
-  	trans_min = 4;

Also Wa for CNL A0 can be removed... We never put our hands in on A0...

But in case you want to go with the quick fix:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

up to you.

> 
> References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition WM")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 8c69ec9eb6ee..5d8babfaec30 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4649,6 +4649,7 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
>  	if (!dev_priv->ipc_enabled)
>  		goto exit;
>  
> +	trans_min = 0;
>  	if (INTEL_GEN(dev_priv) >= 10)
>  		trans_min = 4;
>  
> -- 
> 2.15.0
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-11-16 13:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 10:50 Trivial compiler squelching Chris Wilson
2017-11-15 10:50 ` [PATCH 1/3] drm/i915: Initialise entry in intel_ppat_get() for older compilers Chris Wilson
2017-11-15 12:50   ` Ville Syrjälä
2017-11-15 13:17   ` [PATCH v2] " Chris Wilson
2017-11-15 13:24     ` Ville Syrjälä
2017-11-17 13:32     ` Wang, Zhi A
2017-11-20  9:54       ` Joonas Lahtinen
2017-11-20 10:02         ` Wang, Zhi A
2017-11-15 10:50 ` [PATCH 2/3] drm/i915/: Initialise trans_min for skl_compute_transition_wm() Chris Wilson
2017-11-15 10:54   ` Chris Wilson
2017-11-16  1:12   ` Rodrigo Vivi [this message]
2018-01-22 19:13     ` Chris Wilson
2018-02-19 20:41       ` Chris Wilson
2017-11-15 10:50 ` [PATCH 3/3] drm/i915/crt: Silence compiler warning for uninitialised status Chris Wilson
2017-11-15 12:48   ` Ville Syrjälä
2017-11-15 11:14 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Initialise entry in intel_ppat_get() for older compilers Patchwork
2017-11-15 12:08 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-15 13:34 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Initialise entry in intel_ppat_get() for older compilers (rev2) Patchwork
2017-11-15 14:27 ` ✓ Fi.CI.IGT: " 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=20171116011215.sbtm7253e4thytem@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox