Skip to content

Commit 1d4624c

Browse files
committed
drm/amdgpu: handle polaris10/11 overlap asics (v2)
Some special polaris 10 chips overlap with the polaris11 DID range. Handle this properly in the driver. v2: use local flags for other function calls. Acked-by: Luben Tuikov <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 81d0bcf commit 1d4624c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,15 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
20392039
"See modparam exp_hw_support\n");
20402040
return -ENODEV;
20412041
}
2042+
/* differentiate between P10 and P11 asics with the same DID */
2043+
if (pdev->device == 0x67FF &&
2044+
(pdev->revision == 0xE3 ||
2045+
pdev->revision == 0xE7 ||
2046+
pdev->revision == 0xF3 ||
2047+
pdev->revision == 0xF7)) {
2048+
flags &= ~AMD_ASIC_MASK;
2049+
flags |= CHIP_POLARIS10;
2050+
}
20422051

20432052
/* Due to hardware bugs, S/G Display on raven requires a 1:1 IOMMU mapping,
20442053
* however, SME requires an indirect IOMMU mapping because the encryption
@@ -2108,12 +2117,12 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
21082117

21092118
pci_set_drvdata(pdev, ddev);
21102119

2111-
ret = amdgpu_driver_load_kms(adev, ent->driver_data);
2120+
ret = amdgpu_driver_load_kms(adev, flags);
21122121
if (ret)
21132122
goto err_pci;
21142123

21152124
retry_init:
2116-
ret = drm_dev_register(ddev, ent->driver_data);
2125+
ret = drm_dev_register(ddev, flags);
21172126
if (ret == -EAGAIN && ++retry <= 3) {
21182127
DRM_INFO("retry init %d\n", retry);
21192128
/* Don't request EX mode too frequently which is attacking */

0 commit comments

Comments
 (0)