[Intel-xe] [CI 7/7] HAX
Matthew Auld
matthew.auld at intel.com
Tue May 16 17:32:58 UTC 2023
Just for lockdep.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 5 +++--
drivers/gpu/drm/xe/xe_pci.c | 5 +++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 01ef88bf099d..d45cd1617cca 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -163,6 +163,7 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy)
destroy_workqueue(xe->ordered_wq);
ttm_device_fini(&xe->ttm);
+ mutex_destroy(&xe->mem_access.lock);
}
struct xe_device *xe_device_create(struct pci_dev *pdev,
@@ -208,6 +209,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq", 0);
+ mutex_init(&xe->mem_access.lock);
+
err = xe_display_create(xe);
if (WARN_ON(err))
goto err_put;
@@ -216,8 +219,6 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
if (err)
goto err_put;
- drmm_mutex_init(&xe->drm, &xe->mem_access.lock);
-
return xe;
err_put:
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index e789a50a1310..c311199b09e6 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -684,6 +684,11 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return err;
}
+
+ mutex_lock(&xe->mem_access.lock);
+ xe_pm_runtime_resume(xe);
+ mutex_unlock(&xe->mem_access.lock);
+
xe_pm_runtime_init(xe);
return 0;
--
2.40.1
More information about the Intel-xe
mailing list