]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/i915/psr: Reject async flips when selective fetch is enabled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 5 Nov 2025 17:10:15 +0000 (19:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:27:39 +0000 (06:27 +0900)
commit 7c373b3bd03c77fe8f6ea206ed49375eb4d43d13 upstream.

The selective fetch code doesn't handle asycn flips correctly.
There is a nonsense check for async flips in
intel_psr2_sel_fetch_config_valid() but that only gets called
for modesets/fastsets and thus does nothing for async flips.

Currently intel_async_flip_check_hw() is very unhappy as the
selective fetch code pulls in planes that are not even async
flips capable.

Reject async flips when selective fetch is enabled, until
someone fixes this properly (ie. disable selective fetch while
async flips are being issued).

Cc: stable@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251105171015.22234-1-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
(cherry picked from commit a5f0cc8e0cd4007370af6985cb152001310cf20c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_psr.c

index 7035c1fc9033b10327be081f26715446687652c4..350a282bc4a372f5ff7d83d1da2de79bdb6f8db4 100644 (file)
@@ -5958,6 +5958,14 @@ static int intel_async_flip_check_uapi(struct intel_atomic_state *state,
                return -EINVAL;
        }
 
+       /* FIXME: selective fetch should be disabled for async flips */
+       if (new_crtc_state->enable_psr2_sel_fetch) {
+               drm_dbg_kms(display->drm,
+                           "[CRTC:%d:%s] async flip disallowed with PSR2 selective fetch\n",
+                           crtc->base.base.id, crtc->base.name);
+               return -EINVAL;
+       }
+
        for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state,
                                             new_plane_state, i) {
                if (plane->pipe != crtc->pipe)
index 179b7d27eb4c44aea8bfa5ecd1ae847667845204..624f4985ea4644779253e901957f1786749641cd 100644 (file)
@@ -1274,12 +1274,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
                return false;
        }
 
-       if (crtc_state->uapi.async_flip) {
-               drm_dbg_kms(display->drm,
-                           "PSR2 sel fetch not enabled, async flip enabled\n");
-               return false;
-       }
-
        return crtc_state->enable_psr2_sel_fetch = true;
 }