Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: Plumb the full atomic state into skl_ddb_add_affected_planes()

skl_ddb_add_affected_planes() needs the full atomic state. Instead
of digging that out from dubious sources plumb it in explicitly.

The wm counterpart (skl_wm_add_affected_planes()) already does
things in the proper way.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240528184945.24083-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

+9 -10
+9 -10
drivers/gpu/drm/i915/display/skl_watermark.c
··· 2429 2429 } 2430 2430 2431 2431 static int 2432 - skl_ddb_add_affected_planes(const struct intel_crtc_state *old_crtc_state, 2433 - struct intel_crtc_state *new_crtc_state) 2432 + skl_ddb_add_affected_planes(struct intel_atomic_state *state, 2433 + struct intel_crtc *crtc) 2434 2434 { 2435 - struct intel_atomic_state *state = to_intel_atomic_state(new_crtc_state->uapi.state); 2436 - struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc); 2437 - struct drm_i915_private *i915 = to_i915(crtc->base.dev); 2435 + struct drm_i915_private *i915 = to_i915(state->base.dev); 2436 + const struct intel_crtc_state *old_crtc_state = 2437 + intel_atomic_get_old_crtc_state(state, crtc); 2438 + struct intel_crtc_state *new_crtc_state = 2439 + intel_atomic_get_new_crtc_state(state, crtc); 2438 2440 struct intel_plane *plane; 2439 2441 2440 2442 for_each_intel_plane_on_crtc(&i915->drm, crtc, plane) { ··· 2491 2489 struct drm_i915_private *i915 = to_i915(state->base.dev); 2492 2490 const struct intel_dbuf_state *old_dbuf_state; 2493 2491 struct intel_dbuf_state *new_dbuf_state = NULL; 2494 - const struct intel_crtc_state *old_crtc_state; 2495 2492 struct intel_crtc_state *new_crtc_state; 2496 2493 struct intel_crtc *crtc; 2497 2494 int ret, i; ··· 2578 2577 return ret; 2579 2578 } 2580 2579 2581 - for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state, 2582 - new_crtc_state, i) { 2580 + for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) { 2583 2581 ret = skl_crtc_allocate_plane_ddb(state, crtc); 2584 2582 if (ret) 2585 2583 return ret; 2586 2584 2587 - ret = skl_ddb_add_affected_planes(old_crtc_state, 2588 - new_crtc_state); 2585 + ret = skl_ddb_add_affected_planes(state, crtc); 2589 2586 if (ret) 2590 2587 return ret; 2591 2588 }