aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Roper <[email protected]>2023-06-14 13:52:02 -0700
committerRodrigo Vivi <[email protected]>2023-12-21 11:35:07 -0500
commitc0ab10ee2ee6a2c423f95154e0842a1b19a4c13b (patch)
tree4244403ee5a0d64456a32c9157a42f8f8b79d673
parent98b6d092341128f753cff64b1bceda69c718b6af (diff)
drm/xe: Enable PCI device earlier
Newer Intel platforms require that inspect the contents of the GMD_ID registers very early in the driver initialization process to determine the IP version (and proper init sequences), of the platform. Move the general PCI device setup and enablement slightly earlier, before we start trying to peek at the GMD_ID registers. Reviewed-by: Gustavo Sousa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matt Roper <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 749826548b4a..e130ffe3ab55 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -627,10 +627,20 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
xe_pm_assert_unbounded_bridge(xe);
subplatform_desc = find_subplatform(xe, desc);
- err = xe_info_init(xe, desc, subplatform_desc);
+ pci_set_drvdata(pdev, xe);
+ err = pci_enable_device(pdev);
if (err)
goto err_drm_put;
+ pci_set_master(pdev);
+
+ if (pci_enable_msi(pdev) < 0)
+ drm_dbg(&xe->drm, "can't enable MSI");
+
+ err = xe_info_init(xe, desc, subplatform_desc);
+ if (err)
+ goto err_pci_disable;
+
drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) dma_m_s:%d tc:%d",
desc->platform_name,
subplatform_desc ? subplatform_desc->name : "",
@@ -650,16 +660,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
xe_step_name(xe->info.step.display),
xe_step_name(xe->info.step.basedie));
- pci_set_drvdata(pdev, xe);
- err = pci_enable_device(pdev);
- if (err)
- goto err_drm_put;
-
- pci_set_master(pdev);
-
- if (pci_enable_msi(pdev) < 0)
- drm_dbg(&xe->drm, "can't enable MSI");
-
err = xe_device_probe(xe);
if (err)
goto err_pci_disable;