hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
....@@ -1121,6 +1121,15 @@
11211121 "See modparam exp_hw_support\n");
11221122 return -ENODEV;
11231123 }
1124
+ /* differentiate between P10 and P11 asics with the same DID */
1125
+ if (pdev->device == 0x67FF &&
1126
+ (pdev->revision == 0xE3 ||
1127
+ pdev->revision == 0xE7 ||
1128
+ pdev->revision == 0xF3 ||
1129
+ pdev->revision == 0xF7)) {
1130
+ flags &= ~AMD_ASIC_MASK;
1131
+ flags |= CHIP_POLARIS10;
1132
+ }
11241133
11251134 /* Due to hardware bugs, S/G Display on raven requires a 1:1 IOMMU mapping,
11261135 * however, SME requires an indirect IOMMU mapping because the encryption
....@@ -1190,12 +1199,12 @@
11901199 ddev->pdev = pdev;
11911200 pci_set_drvdata(pdev, ddev);
11921201
1193
- ret = amdgpu_driver_load_kms(adev, ent->driver_data);
1202
+ ret = amdgpu_driver_load_kms(adev, flags);
11941203 if (ret)
11951204 goto err_pci;
11961205
11971206 retry_init:
1198
- ret = drm_dev_register(ddev, ent->driver_data);
1207
+ ret = drm_dev_register(ddev, flags);
11991208 if (ret == -EAGAIN && ++retry <= 3) {
12001209 DRM_INFO("retry init %d\n", retry);
12011210 /* Don't request EX mode too frequently which is attacking */