[Mesa-dev] [PATCH 5/5] radeonsi: initialize ac_gpu_info::name when using SI_FORCE_FAMILY

Marek Olšák maraeo at gmail.com
Sun Sep 23 16:57:55 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

so that it's not NULL when loading radeonsi and a GCN GPU is not
present in the system.
---
 src/gallium/drivers/radeonsi/si_pipe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 0b38feb..0955c9f 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -704,20 +704,21 @@ static void si_handle_env_var_force_family(struct si_screen *sscreen)
 	const char *family = debug_get_option("SI_FORCE_FAMILY", NULL);
 	unsigned i;
 
 	if (!family)
 		return;
 
 	for (i = CHIP_TAHITI; i < CHIP_LAST; i++) {
 		if (!strcmp(family, ac_get_llvm_processor_name(i))) {
 			/* Override family and chip_class. */
 			sscreen->info.family = i;
+			sscreen->info.name = "GCN-NOOP";
 
 			if (i >= CHIP_VEGA10)
 				sscreen->info.chip_class = GFX9;
 			else if (i >= CHIP_TONGA)
 				sscreen->info.chip_class = VI;
 			else if (i >= CHIP_BONAIRE)
 				sscreen->info.chip_class = CIK;
 			else
 				sscreen->info.chip_class = SI;
 
-- 
2.7.4



More information about the mesa-dev mailing list