Skip to content

Commit a4de6be

Browse files
committed
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]
1 parent 46bcb0a commit a4de6be

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
@@ -341,6 +341,9 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
341341
intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
342342

343343
intel_dmc_suspend(xe);
344+
345+
if (runtime && has_display(xe))
346+
intel_hpd_poll_enable(xe);
344347
}
345348

346349
void xe_display_pm_suspend(struct xe_device *xe)
@@ -383,8 +386,10 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
383386
if (!xe->info.probe_display)
384387
return;
385388

386-
if (xe->d3cold.allowed)
389+
if (xe->d3cold.allowed) {
387390
__xe_display_pm_suspend(xe, true);
391+
return;
392+
}
388393

389394
intel_hpd_poll_enable(xe);
390395
}
@@ -447,9 +452,11 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
447452
intel_display_driver_resume(xe);
448453
drm_kms_helper_poll_enable(&xe->drm);
449454
intel_display_driver_enable_user_access(xe);
450-
intel_hpd_poll_disable(xe);
451455
}
452456

457+
if (has_display(xe))
458+
intel_hpd_poll_disable(xe);
459+
453460
intel_opregion_resume(display);
454461

455462
intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false);
@@ -467,10 +474,12 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
467474
if (!xe->info.probe_display)
468475
return;
469476

470-
intel_hpd_poll_disable(xe);
471-
472-
if (xe->d3cold.allowed)
477+
if (xe->d3cold.allowed) {
473478
__xe_display_pm_resume(xe, true);
479+
return;
480+
}
481+
482+
intel_hpd_poll_disable(xe);
474483
}
475484

476485

0 commit comments

Comments
 (0)