diff options
author | Marek Olšák <[email protected]> | 2019-02-12 12:14:15 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-04-23 11:28:56 -0400 |
commit | 64d6cc982d5ccf6b396c0dec24611c5c6ef1cc7d (patch) | |
tree | a30438ca7a2d57e1b8d0535af370a493435d7e12 /src/gallium/drivers | |
parent | 9b33465481daf465cde3ff46261486ab5c6433c6 (diff) |
ac: add radeon_info::marketing_name, replacing the winsys callback
Tested-by: Dieter Nützel <[email protected]>
Acked-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe_common.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_get.c | 15 |
3 files changed, 4 insertions, 26 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index fce35b45141..bce45ea0456 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -805,13 +805,6 @@ static const char* r600_get_device_vendor(struct pipe_screen* pscreen) return "AMD"; } -static const char *r600_get_marketing_name(struct radeon_winsys *ws) -{ - if (!ws->get_chip_name) - return NULL; - return ws->get_chip_name(ws); -} - static const char *r600_get_family_name(const struct r600_common_screen *rscreen) { switch (rscreen->info.family) { @@ -1274,11 +1267,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen, ws->query_info(ws, &rscreen->info); rscreen->ws = ws; - if ((chip_name = r600_get_marketing_name(ws))) - snprintf(family_name, sizeof(family_name), "%s / ", - r600_get_family_name(rscreen) + 4); - else - chip_name = r600_get_family_name(rscreen); + chip_name = r600_get_family_name(rscreen); if (uname(&uname_data) == 0) snprintf(kernel_version, sizeof(kernel_version), diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index 4e53c992fdf..2d86c7f905b 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -683,8 +683,6 @@ struct radeon_winsys { bool (*read_registers)(struct radeon_winsys *ws, unsigned reg_offset, unsigned num_registers, uint32_t *out); - - const char* (*get_chip_name)(struct radeon_winsys *ws); }; static inline bool radeon_emitted(struct radeon_cmdbuf *cs, unsigned num_dw) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 67fbc50998b..eddb383c270 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -48,13 +48,6 @@ static const char *si_get_device_vendor(struct pipe_screen *pscreen) return "AMD"; } -static const char *si_get_marketing_name(struct radeon_winsys *ws) -{ - if (!ws->get_chip_name) - return NULL; - return ws->get_chip_name(ws); -} - static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) { struct si_screen *sscreen = (struct si_screen *)pscreen; @@ -943,14 +936,12 @@ static struct disk_cache *si_get_disk_shader_cache(struct pipe_screen *pscreen) static void si_init_renderer_string(struct si_screen *sscreen) { - struct radeon_winsys *ws = sscreen->ws; char first_name[256], second_name[32] = {}, kernel_version[128] = {}; struct utsname uname_data; - const char *marketing_name = si_get_marketing_name(ws); - - if (marketing_name) { - snprintf(first_name, sizeof(first_name), "%s", marketing_name); + if (sscreen->info.marketing_name) { + snprintf(first_name, sizeof(first_name), "%s", + sscreen->info.marketing_name); snprintf(second_name, sizeof(second_name), "%s, ", sscreen->info.name); } else { |