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>
This commit is contained in:
Emil Velikov
2019-07-16 22:04:57 +01:00
committed by Emil Velikov
parent 655b3c55b9
commit 2dd730784e
2 changed files with 1 additions and 11 deletions

View File

@@ -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;

View File

@@ -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))