diff options
author | Chris Wilson <[email protected]> | 2017-11-15 10:50:35 +0000 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2018-02-19 20:38:52 +0000 |
commit | be3fa66857051e2943960a06f8046e8445cdfe6e (patch) | |
tree | 4c9bde3d02ef554946e23fdd26ade642eaad3f0a | |
parent | ed2f3532321083cf40e4da4e36234880e0136136 (diff) |
drm/i915/: Initialise trans_min for skl_compute_transition_wm()
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 <[email protected]>
Cc: Mahesh Kumar <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Rodrigo Vivi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 158d00fdf549..a88f0f213604 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4713,6 +4713,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; |