[Mesa-dev] [PATCH 05/16] ac: sort raster configs

Marek Olšák maraeo at gmail.com
Wed May 2 04:00:29 UTC 2018


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

---
 src/amd/common/ac_gpu_info.c | 66 +++++++++++++++---------------------
 1 file changed, 27 insertions(+), 39 deletions(-)

diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 3ba7b4b717a..fd49dbefd58 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -559,85 +559,73 @@ ac_get_gs_table_depth(enum chip_class chip_class, enum radeon_family family)
 		unreachable("Unknown GPU");
 	}
 }
 
 void
 ac_get_raster_config(struct radeon_info *info,
 		     uint32_t *raster_config_p,
 		     uint32_t *raster_config_1_p)
 {
 	unsigned raster_config, raster_config_1;
+
 	switch (info->family) {
-	case CHIP_TAHITI:
-	case CHIP_PITCAIRN:
-		raster_config = 0x2a00126a;
+	/* 1 SE / 1 RB */
+	case CHIP_HAINAN:
+	case CHIP_KABINI:
+	case CHIP_MULLINS:
+	case CHIP_STONEY:
+		raster_config = 0x00000000;
 		raster_config_1 = 0x00000000;
 		break;
+	/* 1 SE / 4 RBs */
 	case CHIP_VERDE:
 		raster_config = 0x0000124a;
 		raster_config_1 = 0x00000000;
 		break;
+	/* 1 SE / 2 RBs (Oland is special) */
 	case CHIP_OLAND:
 		raster_config = 0x00000082;
 		raster_config_1 = 0x00000000;
 		break;
-	case CHIP_HAINAN:
-		raster_config = 0x00000000;
+	/* 1 SE / 2 RBs */
+	case CHIP_KAVERI:
+	case CHIP_ICELAND:
+	case CHIP_CARRIZO:
+		raster_config = 0x00000002;
 		raster_config_1 = 0x00000000;
 		break;
+	/* 2 SEs / 4 RBs */
 	case CHIP_BONAIRE:
+	case CHIP_POLARIS11:
+	case CHIP_POLARIS12:
 		raster_config = 0x16000012;
 		raster_config_1 = 0x00000000;
 		break;
-	case CHIP_HAWAII:
-		raster_config = 0x3a00161a;
-		raster_config_1 = 0x0000002e;
-		break;
-	case CHIP_FIJI:
-		raster_config = 0x3a00161a;
-		raster_config_1 = 0x0000002e;
+	/* 2 SEs / 8 RBs */
+	case CHIP_TAHITI:
+	case CHIP_PITCAIRN:
+		raster_config = 0x2a00126a;
+		raster_config_1 = 0x00000000;
 		break;
+	/* 4 SEs / 8 RBs */
+	case CHIP_TONGA:
 	case CHIP_POLARIS10:
 		raster_config = 0x16000012;
 		raster_config_1 = 0x0000002a;
 		break;
-	case CHIP_POLARIS11:
-	case CHIP_POLARIS12:
-		raster_config = 0x16000012;
-		raster_config_1 = 0x00000000;
-		break;
+	/* 4 SEs / 16 RBs */
+	case CHIP_HAWAII:
+	case CHIP_FIJI:
 	case CHIP_VEGAM:
 		raster_config = 0x3a00161a;
 		raster_config_1 = 0x0000002e;
 		break;
-	case CHIP_TONGA:
-		raster_config = 0x16000012;
-		raster_config_1 = 0x0000002a;
-		break;
-	case CHIP_ICELAND:
-		raster_config = 0x00000002;
-		raster_config_1 = 0x00000000;
-		break;
-	case CHIP_CARRIZO:
-		raster_config = 0x00000002;
-		raster_config_1 = 0x00000000;
-		break;
-	case CHIP_KAVERI:
-		raster_config = 0x00000002;
-		raster_config_1 = 0x00000000;
-		break;
-	case CHIP_KABINI:
-	case CHIP_MULLINS:
-	case CHIP_STONEY:
-		raster_config = 0x00000000;
-		raster_config_1 = 0x00000000;
-		break;
 	default:
 		fprintf(stderr,
 			"ac: Unknown GPU, using 0 for raster_config\n");
 		raster_config = 0x00000000;
 		raster_config_1 = 0x00000000;
 		break;
 	}
 
 	/* Fiji: Old kernels have incorrect tiling config. This decreases
 	 * RB performance by 25%. (it disables 1 RB in the second packer)
-- 
2.17.0



More information about the mesa-dev mailing list