drm/i915: Use explicit old crtc state in skl_compute_wm()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Nov 2018 17:23:28 +0000 (19:23 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Dec 2018 18:13:22 +0000 (20:13 +0200)
commit099a132bfb65b76f318390d66a090afbaa31518d
treea87cfc6dcaaebcaae5303c4178b8613f897d2cfd
parenta889580c087a9cf91fddb3832ece284174214183
drm/i915: Use explicit old crtc state in skl_compute_wm()

skl_compute_wm() wants to compare the old and new watermarks. Currently
it gets at the old watermarks via crtc->state, which is confusing since
it can point at either the old or the new state depending on where
in the sequence we are. In this case it is correct since we have not yet
swapped the states, but let's make it super clear what this is doing
by using the explicit old state.

Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181113172330.26069-1-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/intel_pm.c