summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2019-07-16 22:04:57 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2020-03-16 14:25:23 +0000
commit2dd730784e632056c75a0fd62b33206b5fc01602 (patch)
treeb7f0c363a0b00a3203356efc3b9c6ed77b900f11 /src
parent655b3c55b9a6233091d4dc5d2e80a0373aa3e2d6 (diff)
Use the device_id straight from gpu_info
This way we can remove the PciInfo and Chipset from the AMDGPUInfoRec. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_drv.h2
-rw-r--r--src/amdgpu_kms.c10
2 files changed, 1 insertions, 11 deletions
diff --git a/src/amdgpu_drv.h b/src/amdgpu_drv.h
index 0ae171f..aae8603 100644
--- a/src/amdgpu_drv.h
+++ b/src/amdgpu_drv.h
@@ -248,8 +248,6 @@ extern DevScreenPrivateKeyRec amdgpu_device_private_key;
typedef struct {
EntityInfoPtr pEnt;
- struct pci_device *PciInfo;
- int Chipset;
uint32_t family;
struct gbm_device *gbm;
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 15b8327..f0831d2 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1421,20 +1421,13 @@ static Bool AMDGPUPreInitChipType_KMS(ScrnInfoPtr pScrn,
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
- info->Chipset = info->PciInfo->device_id;
pScrn->chipset = (char*)amdgpu_get_marketing_name(pAMDGPUEnt->pDev);
if (!pScrn->chipset)
pScrn->chipset = "Unknown AMD Radeon GPU";
- if (info->Chipset < 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Chipset \"%s\" is not recognized\n",
- pScrn->chipset);
- return FALSE;
- }
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Chipset: \"%s\" (ChipID = 0x%04x)\n",
- pScrn->chipset, info->Chipset);
+ pScrn->chipset, gpu_info->asic_id);
info->family = gpu_info->family_id;
@@ -1576,7 +1569,6 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn, int flags)
xf86SetPrimInitDone(pScrn->entityList[0]);
}
- info->PciInfo = xf86GetPciInfoForEntity(info->pEnt->index);
pScrn->monitor = pScrn->confScreen->monitor;
if (!AMDGPUPreInitVisual(pScrn))