Skip to content

Commit

Permalink
drm/xe: Suspend/resume user access only during system s/r
Browse files Browse the repository at this point in the history
Enable/Disable user access only during system suspend/resume.
This should not happen during runtime s/r

v2: rebased

Reviewed-by: Arun R Murthy <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Signed-off-by: Vinod Govindapillai <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit a64e7e5)
Signed-off-by: Rodrigo Vivi <[email protected]>
  • Loading branch information
ideak authored and rodrigovivi committed Sep 4, 2024
1 parent 269a3f6 commit 880b398
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/gpu/drm/xe/display/xe_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true);
if (has_display(xe)) {
drm_kms_helper_poll_disable(&xe->drm);
intel_display_driver_disable_user_access(xe);
if (!runtime)
intel_display_driver_disable_user_access(xe);
}

if (!runtime)
Expand All @@ -330,7 +331,7 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)

intel_hpd_cancel_work(xe);

if (has_display(xe))
if (!runtime && has_display(xe))
intel_display_driver_suspend_access(xe);

intel_encoder_suspend_all(&xe->display);
Expand Down Expand Up @@ -374,7 +375,7 @@ void xe_display_pm_resume(struct xe_device *xe, bool runtime)
intel_display_driver_init_hw(xe);
intel_hpd_init(xe);

if (has_display(xe))
if (!runtime && has_display(xe))
intel_display_driver_resume_access(xe);

/* MST sideband requires HPD interrupts enabled */
Expand All @@ -384,7 +385,8 @@ void xe_display_pm_resume(struct xe_device *xe, bool runtime)

if (has_display(xe)) {
drm_kms_helper_poll_enable(&xe->drm);
intel_display_driver_enable_user_access(xe);
if (!runtime)
intel_display_driver_enable_user_access(xe);
}
intel_hpd_poll_disable(xe);

Expand Down

0 comments on commit 880b398

Please sign in to comment.