ac: sort raster configs
authorMarek Olšák <marek.olsak@amd.com>
Tue, 1 May 2018 17:44:21 +0000 (13:44 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 May 2018 22:26:32 +0000 (18:26 -0400)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_gpu_info.c

index 0fc71e8bf3a303fa7ba924e0b52d97134b55467a..1725bb0486aabfb8bc6ffd86c1f0190f47fdd6be 100644 (file)
@@ -566,71 +566,59 @@ ac_get_raster_config(struct radeon_info *info,
                     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");