ac: add radeon_info::name

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Marek Olšák 2018-08-02 22:21:02 -04:00
parent de8d5edbc4
commit 84652721b9
3 changed files with 12 additions and 2 deletions

View file

@ -301,7 +301,11 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
info->vce_harvest_config = amdinfo->vce_harvest_config;
switch (info->pci_id) {
#define CHIPSET(pci_id, cfamily) case pci_id: info->family = CHIP_##cfamily; break;
#define CHIPSET(pci_id, cfamily) \
case pci_id: \
info->family = CHIP_##cfamily; \
info->name = #cfamily; \
break;
#include "pci_ids/radeonsi_pci_ids.h"
#undef CHIPSET

View file

@ -47,6 +47,7 @@ struct radeon_info {
uint32_t pci_func;
/* Device info. */
const char *name;
uint32_t pci_id;
enum radeon_family family;
enum chip_class chip_class;

View file

@ -182,7 +182,12 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
#include "pci_ids/r600_pci_ids.h"
#undef CHIPSET
#define CHIPSET(pci_id, cfamily) case pci_id: ws->info.family = CHIP_##cfamily; ws->gen = DRV_SI; break;
#define CHIPSET(pci_id, cfamily) \
case pci_id: \
ws->info.family = CHIP_##cfamily; \
ws->info.name = #cfamily; \
ws->gen = DRV_SI; \
break;
#include "pci_ids/radeonsi_pci_ids.h"
#undef CHIPSET