summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-27 22:26:10 +0100
committerEmil Velikov <[email protected]>2017-05-18 17:57:51 +0100
commitb7d7458b9ae963670aca1f7d8f4733a3c3a974e9 (patch)
tree6aa554f650cac93c43355fc0f05b9ff9c2c5f953
parente39c07dbdf41285cb7c8e79d1eec7ff836d533ca (diff)
radeonsi/gfx9: add support for Raven
Cc: 17.1 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit 7622181cade48d3b389024b6ce3e4e177073964e)
-rw-r--r--include/pci_ids/radeonsi_pci_ids.h2
-rw-r--r--src/amd/common/amd_family.h1
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c2
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c7
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c3
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c4
6 files changed, 17 insertions, 2 deletions
diff --git a/include/pci_ids/radeonsi_pci_ids.h b/include/pci_ids/radeonsi_pci_ids.h
index a20a936ef38..50f638f5823 100644
--- a/include/pci_ids/radeonsi_pci_ids.h
+++ b/include/pci_ids/radeonsi_pci_ids.h
@@ -224,3 +224,5 @@ CHIPSET(0x6867, VEGA10_, VEGA10)
CHIPSET(0x6868, VEGA10_, VEGA10)
CHIPSET(0x687F, VEGA10_, VEGA10)
CHIPSET(0x686C, VEGA10_, VEGA10)
+
+CHIPSET(0x15DD, RAVEN_, RAVEN)
diff --git a/src/amd/common/amd_family.h b/src/amd/common/amd_family.h
index 8a6dad6f9a1..c62d0aa527a 100644
--- a/src/amd/common/amd_family.h
+++ b/src/amd/common/amd_family.h
@@ -93,6 +93,7 @@ enum radeon_family {
CHIP_POLARIS11,
CHIP_POLARIS12,
CHIP_VEGA10,
+ CHIP_RAVEN,
CHIP_LAST,
};
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index ce84139a2f6..3b490404d39 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -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 HAVE_LLVM >= 0x0309 ? "polaris11" : "carrizo";
case CHIP_VEGA10:
+ case CHIP_RAVEN:
return "gfx900";
default:
return "";
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index f0e24c29cb8..b1724272284 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -759,6 +759,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:
@@ -897,7 +898,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
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;
@@ -911,7 +913,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);
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 3e1f3d69864..a98f5c77a20 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4568,6 +4568,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);
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index 44e0f628891..70319db80dc 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -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;