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]
  • Loading branch information
ideak authored and vgovind2 committed Aug 23, 2024
1 parent 501d943 commit a64e7e5
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 @@ -323,7 +323,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 @@ -335,7 +336,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 @@ -381,7 +382,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 @@ -391,7 +392,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 a64e7e5

Please sign in to comment.