radeonsi/gfx9: add support for Raven
authorMarek Olšák <marek.olsak@amd.com>
Mon, 27 Feb 2017 21:26:10 +0000 (22:26 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 15 May 2017 11:00:26 +0000 (13:00 +0200)
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
include/pci_ids/radeonsi_pci_ids.h
src/amd/common/amd_family.h
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index a20a936ef38504a868d81d07b1a493b9aea70df2..50f638f582348a5c202d528505c24578c4479e86 100644 (file)
@@ -224,3 +224,5 @@ CHIPSET(0x6867, VEGA10_, VEGA10)
 CHIPSET(0x6868, VEGA10_, VEGA10)
 CHIPSET(0x687F, VEGA10_, VEGA10)
 CHIPSET(0x686C, VEGA10_, VEGA10)
+
+CHIPSET(0x15DD, RAVEN_, RAVEN)
index 8a6dad6f9a188c52f99f70dfad8fed3d1bc719a2..c62d0aa527a449eef43bf18b4cc6154e0d8971e2 100644 (file)
@@ -93,6 +93,7 @@ enum radeon_family {
     CHIP_POLARIS11,
     CHIP_POLARIS12,
     CHIP_VEGA10,
+    CHIP_RAVEN,
     CHIP_LAST,
 };
 
index 19b83412f3b91e595de628e2f8c9fc86ed8e12e3..f958807a1c543f053c882b8bac4dcbfead02f160 100644 (file)
@@ -833,6 +833,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
        case CHIP_POLARIS12: return "AMD POLARIS12";
        case CHIP_STONEY: return "AMD STONEY";
        case CHIP_VEGA10: return "AMD VEGA10";
+       case CHIP_RAVEN: return "AMD RAVEN";
        default: return "AMD unknown";
        }
 }
@@ -1006,6 +1007,7 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
        case CHIP_POLARIS12: /* same as polaris11 */
                return "polaris11";
        case CHIP_VEGA10:
+       case CHIP_RAVEN:
                return "gfx900";
        default:
                return "";
index 78e01360b8a59cf3b74af99e3f1ec1d96cbb005c..0c85fdee3c7a02b92b94beed79de18b846ce5ff5 100644 (file)
@@ -750,6 +750,7 @@ static bool si_init_gs_info(struct si_screen *sscreen)
        case CHIP_POLARIS11:
        case CHIP_POLARIS12:
        case CHIP_VEGA10:
+       case CHIP_RAVEN:
                sscreen->gs_table_depth = 32;
                return true;
        default:
@@ -886,7 +887,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
        sscreen->has_ds_bpermute = sscreen->b.chip_class >= VI;
        sscreen->has_msaa_sample_loc_bug = (sscreen->b.family >= CHIP_POLARIS10 &&
                                            sscreen->b.family <= CHIP_POLARIS12) ||
-                                          sscreen->b.family == CHIP_VEGA10;
+                                          sscreen->b.family == CHIP_VEGA10 ||
+                                          sscreen->b.family == CHIP_RAVEN;
 
        sscreen->b.has_cp_dma = true;
        sscreen->b.has_streamout = true;
@@ -900,7 +902,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
 
                sscreen->b.rbplus_allowed =
                        !(sscreen->b.debug_flags & DBG_NO_RB_PLUS) &&
-                       sscreen->b.family == CHIP_STONEY;
+                       (sscreen->b.family == CHIP_STONEY ||
+                        sscreen->b.family == CHIP_RAVEN);
        }
 
        (void) mtx_init(&sscreen->shader_parts_mutex, mtx_plain);
index 130ffa0e23b38ddfac9e881814cc15a10375dd23..363f32170a9b0ca5eb3aabe1984b7ceae7d5eb82 100644 (file)
@@ -4538,6 +4538,9 @@ static void si_init_config(struct si_context *sctx)
                case CHIP_VEGA10:
                        pc_lines = 4096;
                        break;
+               case CHIP_RAVEN:
+                       pc_lines = 1024;
+                       break;
                default:
                        assert(0);
                }
index 44e0f628891e94c7bb8ed3952d811f549ddefebf..70319db80dc55bf7eb614eb9d504cbcff97b446e 100644 (file)
@@ -315,6 +315,10 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
       ws->family = FAMILY_AI;
       ws->rev_id = AI_VEGA10_P_A0;
       break;
+   case CHIP_RAVEN:
+      ws->family = FAMILY_RV;
+      ws->rev_id = RAVEN_A0;
+      break;
    default:
       fprintf(stderr, "amdgpu: Unknown family.\n");
       goto fail;