public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
@ 2017-11-07 18:27 Chris Wilson
  2017-11-07 18:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2017-11-07 18:27 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

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.

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 b75c4cf074ff..40da5001be28 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4652,6 +4652,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

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

end of thread, other threads:[~2017-11-09 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 18:27 [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm() Chris Wilson
2017-11-07 18:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
2017-11-08 20:00   ` Ville Syrjälä
2017-11-09  3:49     ` Mahesh Kumar
2017-11-09 14:16       ` Mahesh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox