radeonsi: add support for Polaris (v2)
authorSonny Jiang <sonny.jiang@amd.com>
Wed, 4 Nov 2015 21:13:07 +0000 (16:13 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2016 03:07:32 +0000 (23:07 -0400)
v2: Polaris chips should be defined after Stoney

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> (v1)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v1)
Signed-off-by: Leo Liu <leo.liu@amd.com> (v2 diff)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v2 diff)
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index eed9d83ee4989a30a26b2ed13df1eb449ffd6cb3..720fc06ece209be4996af78bf74437d33162330c 100644 (file)
@@ -467,6 +467,8 @@ 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_POLARIS10: return "AMD POLARIS10";
+       case CHIP_POLARIS11: return "AMD POLARIS11";
        case CHIP_STONEY: return "AMD STONEY";
        default: return "AMD unknown";
        }
@@ -597,6 +599,13 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
 #else
        case CHIP_FIJI: return "fiji";
        case CHIP_STONEY: return "stoney";
+#endif
+#if HAVE_LLVM <= 0x0308
+       case CHIP_POLARIS10: return "tonga";
+       case CHIP_POLARIS11: return "tonga";
+#else
+       case CHIP_POLARIS10: return "polaris10";
+       case CHIP_POLARIS11: return "polaris11";
 #endif
        default: return "";
        }
index d35e963133e30e30163cd94cf858d172de2f7461..baecca7238344f39289e11fd590aa5defcbd9b4c 100644 (file)
@@ -124,6 +124,8 @@ enum radeon_family {
     CHIP_CARRIZO,
     CHIP_FIJI,
     CHIP_STONEY,
+    CHIP_POLARIS10,
+    CHIP_POLARIS11,
     CHIP_LAST,
 };
 
index dd1103eed062423f0b96e98f7e5a805965e63a7f..ed84dc224ff8a07bdcb25b04c6d51ffdc566354c 100644 (file)
@@ -598,6 +598,8 @@ static bool si_init_gs_info(struct si_screen *sscreen)
        case CHIP_HAWAII:
        case CHIP_TONGA:
        case CHIP_FIJI:
+       case CHIP_POLARIS10:
+       case CHIP_POLARIS11:
                sscreen->gs_table_depth = 32;
                return true;
        default:
index 1245f56c08ac37ea80c96b89f254607a66b96054..a2b0da90ec9e080451cb678943ac6fceb6fdd388 100644 (file)
@@ -3946,6 +3946,14 @@ static void si_init_config(struct si_context *sctx)
                        raster_config_1 = 0x0000002e;
                }
                break;
+       case CHIP_POLARIS10:
+               raster_config = 0x16000012;
+               raster_config_1 = 0x0000002a;
+               break;
+       case CHIP_POLARIS11:
+               raster_config = 0x16000012;
+               raster_config_1 = 0x00000000;
+               break;
        case CHIP_TONGA:
                raster_config = 0x16000012;
                raster_config_1 = 0x0000002a;
index 938b9c244b2df8ca24545eba570856ee3c04eaf8..87d9a6aebecb39cf7b44733bfd02abc18c50a122 100644 (file)
@@ -237,6 +237,14 @@ static boolean do_winsys_init(struct amdgpu_winsys *ws, int fd)
       ws->family = FAMILY_VI;
       ws->rev_id = VI_FIJI_P_A0;
       break;
+   case CHIP_POLARIS10:
+      ws->family = FAMILY_VI;
+      ws->rev_id = VI_POLARIS10_P_A0;
+      break;
+   case CHIP_POLARIS11:
+      ws->family = FAMILY_VI;
+      ws->rev_id = VI_POLARIS11_M_A0;
+      break;
    default:
       fprintf(stderr, "amdgpu: Unknown family.\n");
       goto fail;