Skip to content

Commit 184889d

Browse files
hogandertursulin
authored andcommitted
drm/i915/psr: Do not trigger Frame Change events from frontbuffer flush
We want to get rid of triggering "Frame Change" events from frontbuffer flush calls. We are about to move using TRANS_PUSH register for this on LunarLake and onwards. Touching TRANS_PUSH register from fronbuffer flush would be problematic as it's written by DSB as well. Fix this by using intel_psr_exit when flush or invalidate is done on LunarLake and onwards. This is not possible on AlderLake and MeteorLake due to HW bug in PSR2 disable. This patch is also fixing problems with cursor plane where cursor is disappearing or duplicate cursor is seen on the screen. v2: Commit message updated Bspec: 68927, 68934, 66624 Reported-by: Janna Martl <[email protected]> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5522 Fixes: 411ad63 ("drm/i915/psr: Use SFF_CTL on invalidate/flush for LunarLake onwards") Tested-by: Janna Martl <[email protected]> Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 46fb38c) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent fd56b9c commit 184889d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3275,7 +3275,9 @@ static void intel_psr_configure_full_frame_update(struct intel_dp *intel_dp)
32753275

32763276
static void _psr_invalidate_handle(struct intel_dp *intel_dp)
32773277
{
3278-
if (intel_dp->psr.psr2_sel_fetch_enabled) {
3278+
struct intel_display *display = to_intel_display(intel_dp);
3279+
3280+
if (DISPLAY_VER(display) < 20 && intel_dp->psr.psr2_sel_fetch_enabled) {
32793281
if (!intel_dp->psr.psr2_sel_fetch_cff_enabled) {
32803282
intel_dp->psr.psr2_sel_fetch_cff_enabled = true;
32813283
intel_psr_configure_full_frame_update(intel_dp);
@@ -3361,7 +3363,7 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)
33613363
{
33623364
struct intel_display *display = to_intel_display(intel_dp);
33633365

3364-
if (intel_dp->psr.psr2_sel_fetch_enabled) {
3366+
if (DISPLAY_VER(display) < 20 && intel_dp->psr.psr2_sel_fetch_enabled) {
33653367
if (intel_dp->psr.psr2_sel_fetch_cff_enabled) {
33663368
/* can we turn CFF off? */
33673369
if (intel_dp->psr.busy_frontbuffer_bits == 0)
@@ -3378,11 +3380,13 @@ static void _psr_flush_handle(struct intel_dp *intel_dp)
33783380
* existing SU configuration
33793381
*/
33803382
intel_psr_configure_full_frame_update(intel_dp);
3381-
}
33823383

3383-
intel_psr_force_update(intel_dp);
3384+
intel_psr_force_update(intel_dp);
3385+
} else {
3386+
intel_psr_exit(intel_dp);
3387+
}
33843388

3385-
if (!intel_dp->psr.psr2_sel_fetch_enabled && !intel_dp->psr.active &&
3389+
if ((!intel_dp->psr.psr2_sel_fetch_enabled || DISPLAY_VER(display) >= 20) &&
33863390
!intel_dp->psr.busy_frontbuffer_bits)
33873391
queue_work(display->wq.unordered, &intel_dp->psr.work);
33883392
}

0 commit comments

Comments
 (0)