{
struct drm_crtc *crtc;
struct drm_crtc_state *cstate;
+ struct drm_crtc_state *old_crtc_state;
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
struct skl_ddb_values *results = &intel_state->wm_results;
struct skl_pipe_wm *pipe_wm;
* should allow skl_update_pipe_wm() to return failure in cases where
* no suitable watermark values can be found.
*/
- for_each_new_crtc_in_state(state, crtc, cstate, i) {
+ for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, cstate, i) {
struct intel_crtc_state *intel_cstate =
to_intel_crtc_state(cstate);
const struct skl_pipe_wm *old_pipe_wm =
- &to_intel_crtc_state(crtc->state)->wm.skl.optimal;
+ &to_intel_crtc_state(old_crtc_state)->wm.skl.optimal;
pipe_wm = &intel_cstate->wm.skl.optimal;
ret = skl_update_pipe_wm(cstate, old_pipe_wm, pipe_wm, &changed);