radeonsi/gfx9: add GFX9 and VEGA10 enums
authorMarek Olšák <marek.olsak@amd.com>
Sat, 15 Oct 2016 11:57:59 +0000 (13:57 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/amd_family.h
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index b09bbb89a3f9f9210fbf31980c9b3c071ee8f51d..8a6dad6f9a188c52f99f70dfad8fed3d1bc719a2 100644 (file)
@@ -92,6 +92,7 @@ enum radeon_family {
     CHIP_POLARIS10,
     CHIP_POLARIS11,
     CHIP_POLARIS12,
+    CHIP_VEGA10,
     CHIP_LAST,
 };
 
@@ -104,9 +105,10 @@ enum chip_class {
     R700,
     EVERGREEN,
     CAYMAN,
-    SI,
-    CIK,
-    VI,
+    SI,  /* GFX6 */
+    CIK, /* GFX7 */
+    VI,  /* GFX8 */
+    GFX9,
 };
 
 #endif
index b3b925e09c6c194e61148b7068ce2ee07c9cb7f6..7ec570314120817143dc0c5fb1eac7af5db4d67f 100644 (file)
@@ -779,6 +779,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
        case CHIP_POLARIS11: return "AMD POLARIS11";
        case CHIP_POLARIS12: return "AMD POLARIS12";
        case CHIP_STONEY: return "AMD STONEY";
+       case CHIP_VEGA10: return "AMD VEGA10";
        default: return "AMD unknown";
        }
 }
index 277fa28641655fbedfe5fcd8cfad8d4157293843..c66203e0add2b7e3a9189d9a8a722c3cc4b93596 100644 (file)
@@ -751,7 +751,9 @@ static void si_handle_env_var_force_family(struct si_screen *sscreen)
                        /* Override family and chip_class. */
                        sscreen->b.family = sscreen->b.info.family = i;
 
-                       if (i >= CHIP_TONGA)
+                       if (i >= CHIP_VEGA10)
+                               sscreen->b.chip_class = sscreen->b.info.chip_class = GFX9;
+                       else if (i >= CHIP_TONGA)
                                sscreen->b.chip_class = sscreen->b.info.chip_class = VI;
                        else if (i >= CHIP_BONAIRE)
                                sscreen->b.chip_class = sscreen->b.info.chip_class = CIK;
index 37e01403113e7b75d4edb24b167102bfba6902ac..25f08ef0acd9e52b120ce4dd37d280188f713008 100644 (file)
@@ -219,7 +219,9 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
       goto fail;
    }
 
-   if (ws->info.family >= CHIP_TONGA)
+   if (ws->info.family >= CHIP_VEGA10)
+      ws->info.chip_class = GFX9;
+   else if (ws->info.family >= CHIP_TONGA)
       ws->info.chip_class = VI;
    else if (ws->info.family >= CHIP_BONAIRE)
       ws->info.chip_class = CIK;
@@ -303,6 +305,9 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
    case CHIP_POLARIS12:
       ws->family = FAMILY_VI;
       ws->rev_id = VI_POLARIS12_V_A0;
+   case CHIP_VEGA10:
+      ws->family = FAMILY_AI;
+      ws->rev_id = AI_VEGA10_P_A0;
       break;
    default:
       fprintf(stderr, "amdgpu: Unknown family.\n");