Commit c0ab10ee authored by Matt Roper's avatar Matt Roper Committed by Rodrigo Vivi

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: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20230614205202.3376752-5-matthew.d.roper@intel.comSigned-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 98b6d092
......@@ -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;
......
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