[PATCH xf86-video-amdgpu 6/7] Stop using AMDGPU(Unique)Chipsets
Michel Dänzer
michel at daenzer.net
Tue Nov 1 09:31:24 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
Use libdrm_amdgpu's amdgpu_get_marketing_name for the chipset name, or
"Unknown AMD Radeon GPU" as a fallback.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/amdgpu_kms.c | 12 ++++--------
src/amdgpu_probe.c | 11 ++++++-----
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 890add5..1f5e6f0 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -58,7 +58,6 @@
static DevScreenPrivateKeyRec amdgpu_client_private_key;
-extern SymTabRec AMDGPUChipsets[];
static Bool amdgpu_setup_kernel_mem(ScreenPtr pScreen);
const OptionInfoRec AMDGPUOptions_KMS[] = {
@@ -1160,15 +1159,12 @@ static Bool AMDGPUPreInitChipType_KMS(ScrnInfoPtr pScrn,
struct amdgpu_gpu_info *gpu_info)
{
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
+ AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(pScrn);
info->Chipset = info->PciInfo->device_id;
- pScrn->chipset =
- (char *)xf86TokenToString(AMDGPUChipsets, info->Chipset);
- if (!pScrn->chipset) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "ChipID 0x%04x is not recognized\n", info->Chipset);
- return FALSE;
- }
+ pScrn->chipset = amdgpu_get_marketing_name(pAMDGPUEnt->pDev);
+ if (!pScrn->chipset)
+ pScrn->chipset = "Unknown AMD Radeon GPU";
if (info->Chipset < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index acc0433..301e586 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -58,9 +58,6 @@
#include <xf86platformBus.h>
#endif
-#include "ati_pciids_gen.h"
-#include "amdgpu_chipset_gen.h"
-
_X_EXPORT int gAMDGPUEntityIndex = -1;
/* Return the options for supported chipset 'n'; NULL otherwise */
@@ -69,11 +66,15 @@ static const OptionInfoRec *AMDGPUAvailableOptions(int chipid, int busid)
return AMDGPUOptionsWeak();
}
+static SymTabRec AMDGPUAny[] = {
+ { 0, "All GPUs supported by the amdgpu kernel driver" },
+ { -1, NULL }
+};
+
/* Return the string name for supported chipset 'n'; NULL otherwise. */
static void AMDGPUIdentify(int flags)
{
- xf86PrintChipsets(AMDGPU_NAME,
- "Driver for AMD Radeon chipsets", AMDGPUUniqueChipsets);
+ xf86PrintChipsets(AMDGPU_NAME, "Driver for AMD Radeon", AMDGPUAny);
}
static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
--
2.10.2
More information about the amd-gfx
mailing list