And only verify cursor allocation when cursor plane is active.

Signed-off-by: Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 46e3e8296251..34c4a558a56b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -13369,7 +13369,7 @@ static void verify_wm_state(struct intel_crtc *crtc,
         * allocation. In that case since the ddb allocation will be updated
         * once the plane becomes visible, we can skip this check
         */
-       if (1) {
+       if (CURCNTR(pipe) & MCURSOR_MODE) {
                struct skl_plane_wm *hw_plane_wm, *sw_plane_wm;
 
                hw_plane_wm = &hw->wm.planes[PLANE_CURSOR];
@@ -13665,10 +13665,11 @@ intel_modeset_verify_crtc(struct intel_crtc *crtc,
                          struct intel_crtc_state *old_crtc_state,
                          struct intel_crtc_state *new_crtc_state)
 {
+       verify_wm_state(crtc, new_crtc_state);
+
        if (!needs_modeset(new_crtc_state) && !new_crtc_state->update_pipe)
                return;
 
-       verify_wm_state(crtc, new_crtc_state);
        verify_connector_state(state, crtc);
        verify_crtc_state(crtc, old_crtc_state, new_crtc_state);
        verify_shared_dpll_state(crtc, old_crtc_state, new_crtc_state);
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to