[Mesa-dev] [PATCH 6/6] radeonsi: don't print AMD twice in the renderer string with the marketing name

Michel Dänzer michel at daenzer.net
Tue Aug 1 00:48:15 UTC 2017


On 01/08/17 07:43 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/drivers/radeon/r600_pipe_common.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index c58048f..e9402f8 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -1338,21 +1338,22 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen,
>  			     struct radeon_winsys *ws, unsigned flags)
>  {
>  	char family_name[32] = {}, llvm_string[32] = {}, kernel_version[128] = {};
>  	struct utsname uname_data;
>  	const char *chip_name;
>  
>  	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));
> +		snprintf(family_name, sizeof(family_name), "%s / ",
> +			 r600_get_family_name(rscreen) + 4);

Is the idea here that the string returned by r600_get_marketing_name
already contains AMD? If so, I'm afraid it's not that simple, some
entries in amdgpu.ids start directly with "Radeon" and don't contain any
vendor name. (FWIW, some contain ATI instead of AMD as well)


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list