[Intel-xe] [PATCH v12 07/13] drm/xe/pci: wrap probe with mem_access

Matthew Auld matthew.auld at intel.com
Mon Jun 26 10:50:45 UTC 2023


Various display init stuff is missing mem_access.ref, so just wrap the
entire probe sequence with xe_device_mem_access_get(). It's impossible
for the device to actually be runtime suspended during probe, so this is
purely just to stop the xe_device_assert_mem_access() from incorrectly
firing. In a later patch we want to add xe_device_assert_mem_access()
for all mmio accesses.

Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Matthew Brost <matthew.brost at intel.com>
---
 drivers/gpu/drm/xe/xe_pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 2991cf5365d5..91ccdaa1193d 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -680,7 +680,9 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (pci_enable_msi(pdev) < 0)
 		drm_dbg(&xe->drm, "can't enable MSI");
 
+	xe_device_mem_access_get(xe);
 	err = xe_device_probe(xe);
+	xe_device_mem_access_put(xe);
 	if (err)
 		goto err_pci_disable;
 
-- 
2.41.0



More information about the Intel-xe mailing list