Skip to content

Commit dcb6c1d

Browse files
ideaklucasdemarchi
authored andcommitted
drm/xe/display: Separate the d3cold and non-d3cold runtime PM handling
For clarity separate the d3cold and non-d3cold runtime PM handling. The only change in behavior is disabling polling later during runtime resume. This shouldn't make a difference, since the poll disabling is handled from a work, which could run at any point wrt. the runtime resume handler. The work will also require a runtime PM reference, syncing it with the resume handler. Cc: Rodrigo Vivi <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit a4de6be) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 25f2ff5 commit dcb6c1d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

drivers/gpu/drm/xe/display/xe_display.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
342342
intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
343343

344344
intel_dmc_suspend(xe);
345+
346+
if (runtime && has_display(xe))
347+
intel_hpd_poll_enable(xe);
345348
}
346349

347350
void xe_display_pm_suspend(struct xe_device *xe)
@@ -354,8 +357,10 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
354357
if (!xe->info.probe_display)
355358
return;
356359

357-
if (xe->d3cold.allowed)
360+
if (xe->d3cold.allowed) {
358361
__xe_display_pm_suspend(xe, true);
362+
return;
363+
}
359364

360365
intel_hpd_poll_enable(xe);
361366
}
@@ -405,9 +410,11 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
405410
intel_display_driver_resume(xe);
406411
drm_kms_helper_poll_enable(&xe->drm);
407412
intel_display_driver_enable_user_access(xe);
408-
intel_hpd_poll_disable(xe);
409413
}
410414

415+
if (has_display(xe))
416+
intel_hpd_poll_disable(xe);
417+
411418
intel_opregion_resume(display);
412419

413420
intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false);
@@ -425,10 +432,12 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
425432
if (!xe->info.probe_display)
426433
return;
427434

428-
intel_hpd_poll_disable(xe);
429-
430-
if (xe->d3cold.allowed)
435+
if (xe->d3cold.allowed) {
431436
__xe_display_pm_resume(xe, true);
437+
return;
438+
}
439+
440+
intel_hpd_poll_disable(xe);
432441
}
433442

434443

0 commit comments

Comments
 (0)