Commit 5349bb76 authored by Ohad Sharabi's avatar Ohad Sharabi Committed by Rodrigo Vivi

drm/xe: do not register to PM if GuC is disabled

When working without GuC (i.e. working with execlists), the flow
attempts to perform suspend operation which is failing due to a
lack of support without GuC.

If PM ops are not supported without GuC we may as well avoid PM
registration rather than returning errors from various PM flows.
Signed-off-by: default avatarOhad Sharabi <osharabi@habana.ai>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 1464f56b
......@@ -641,10 +641,6 @@ int xe_gt_suspend(struct xe_gt *gt)
{
int err;
/* For now suspend/resume is only allowed with GuC */
if (!xe_device_uc_enabled(gt_to_xe(gt)))
return -ENODEV;
xe_gt_sanitize(gt);
xe_device_mem_access_get(gt_to_xe(gt));
......
......@@ -156,6 +156,10 @@ void xe_pm_init(struct xe_device *xe)
{
struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
/* For now suspend/resume is only allowed with GuC */
if (!xe_device_uc_enabled(xe))
return;
drmm_mutex_init(&xe->drm, &xe->d3cold.lock);
xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment