radeonsi: add support for Stoney asics (v3)
authorSamuel Li <samuel.li@amd.com>
Fri, 21 Aug 2015 19:35:46 +0000 (15:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Oct 2015 21:53:14 +0000 (17:53 -0400)
v2 (agd): rebase on mesa master, split pci ids to
separate commit
v3 (agd): use carrizo for llvm processor name for
llvm 3.7 and older

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Samuel Li <samuel.li@amd.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/winsys/amdgpu/drm/amdgpu_id.h
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index 7ac94caad9ffc0180620f63043cfe276ebf02dc1..4ce0c6a1994239c701d6d59ec6a62fa9ecd4e3b9 100644 (file)
@@ -416,6 +416,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
        case CHIP_ICELAND: return "AMD ICELAND";
        case CHIP_CARRIZO: return "AMD CARRIZO";
        case CHIP_FIJI: return "AMD FIJI";
+       case CHIP_STONEY: return "AMD STONEY";
        default: return "AMD unknown";
        }
 }
@@ -540,6 +541,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
        case CHIP_ICELAND: return "iceland";
        case CHIP_CARRIZO: return "carrizo";
        case CHIP_FIJI: return "fiji";
+#if HAVE_LLVM <= 0x0307
+       case CHIP_STONEY: return "carrizo";
+#else
+       case CHIP_STONEY: return "stoney";
+#endif
        default: return "";
        }
 }
index b91e1adf41d00367632dabd1960aec6c40be6e9c..5f13c1ebc268ed6643e8828c7607e0931cb8862a 100644 (file)
@@ -137,6 +137,7 @@ enum radeon_family {
     CHIP_ICELAND,
     CHIP_CARRIZO,
     CHIP_FIJI,
+    CHIP_STONEY,
     CHIP_LAST,
 };
 
index 243bdc6e6d7ccb329bcd3753c5eca91603c12017..a71ff4926ab51cb3e54941578671d047948e3a06 100644 (file)
@@ -3336,6 +3336,7 @@ static void si_init_config(struct si_context *sctx)
                break;
        case CHIP_KABINI:
        case CHIP_MULLINS:
+       case CHIP_STONEY:
                raster_config = 0x00000000;
                raster_config_1 = 0x00000000;
                break;
index 8882c418e12aa754bb1be6b547bfe5db768af792..90fe0cd50f1834d84c4b237bba98e5a7423dada1 100644 (file)
@@ -151,11 +151,15 @@ enum {
 
 /* CZ specific rev IDs */
 enum {
-       CZ_CARRIZO_A0      = 0x01,
+       CARRIZO_A0   = 0x01,
+    STONEY_A0    = 0x61,
        CZ_UNKNOWN      = 0xFF
 };
 
 #define ASICREV_IS_CARRIZO(eChipRev) \
-       (eChipRev >= CARRIZO_A0)
+       ((eChipRev >= CARRIZO_A0) && (eChipRev < STONEY_A0))
+
+#define ASICREV_IS_STONEY(eChipRev) \
+       ((eChipRev >= STONEY_A0) && (eChipRev < CZ_UNKNOWN))
 
 #endif /* AMDGPU_ID_H */
index c8772490e749b57bed9a65191ab0ee5d2cfc250a..32cd9d9aa5002400508e8faec3664d6afb21ee6e 100644 (file)
@@ -226,7 +226,11 @@ static boolean do_winsys_init(struct amdgpu_winsys *ws)
       break;
    case CHIP_CARRIZO:
       ws->family = FAMILY_CZ;
-      ws->rev_id = CZ_CARRIZO_A0;
+      ws->rev_id = CARRIZO_A0;
+      break;
+   case CHIP_STONEY:
+      ws->family = FAMILY_CZ;
+      ws->rev_id = STONEY_A0;
       break;
    case CHIP_FIJI:
       ws->family = FAMILY_VI;