Skip to content

Commit 7c373b3

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915/psr: Reject async flips when selective fetch is enabled
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 a5f0cc8) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent ac3fd01 commit 7c373b3

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5964,6 +5964,14 @@ static int intel_async_flip_check_uapi(struct intel_atomic_state *state,
59645964
return -EINVAL;
59655965
}
59665966

5967+
/* FIXME: selective fetch should be disabled for async flips */
5968+
if (new_crtc_state->enable_psr2_sel_fetch) {
5969+
drm_dbg_kms(display->drm,
5970+
"[CRTC:%d:%s] async flip disallowed with PSR2 selective fetch\n",
5971+
crtc->base.base.id, crtc->base.name);
5972+
return -EINVAL;
5973+
}
5974+
59675975
for_each_oldnew_intel_plane_in_state(state, plane, old_plane_state,
59685976
new_plane_state, i) {
59695977
if (plane->pipe != crtc->pipe)

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,12 +1256,6 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
12561256
return false;
12571257
}
12581258

1259-
if (crtc_state->uapi.async_flip) {
1260-
drm_dbg_kms(display->drm,
1261-
"PSR2 sel fetch not enabled, async flip enabled\n");
1262-
return false;
1263-
}
1264-
12651259
return crtc_state->enable_psr2_sel_fetch = true;
12661260
}
12671261

0 commit comments

Comments
 (0)