Mesa (10.6): radeonsi: properly set the raster_config for KV
Emil Velikov
evelikov at kemper.freedesktop.org
Thu Aug 20 12:52:56 UTC 2015
Module: Mesa
Branch: 10.6
Commit: 20bb0a771dded700ba1b213256bf47dfedbdfd77
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=20bb0a771dded700ba1b213256bf47dfedbdfd77
Author: Alex Deucher <alexander.deucher at amd.com>
Date: Wed Jun 10 11:39:30 2015 -0400
radeonsi: properly set the raster_config for KV
This enables the second RB on asics that support it which
should boost performance.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit 649975e7162cc4ee0586ee76d24321cd7250581f)
---
src/gallium/drivers/radeonsi/si_state.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 4d38a32..fb6dba2 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3023,6 +3023,7 @@ si_write_harvested_raster_configs(struct si_context *sctx,
void si_init_config(struct si_context *sctx)
{
+ unsigned num_rb = sctx->screen->b.info.r600_num_backends;
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
if (pm4 == NULL)
@@ -3071,14 +3072,17 @@ void si_init_config(struct si_context *sctx)
si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x0000002e);
break;
case CHIP_KAVERI:
- /* XXX todo */
+ if (num_rb > 1)
+ si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000002);
+ else
+ si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000);
+ si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x00000000);
+ break;
case CHIP_KABINI:
- /* XXX todo */
case CHIP_MULLINS:
- /* XXX todo */
default:
- si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0);
- si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0);
+ si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000);
+ si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x00000000);
break;
}
} else {
More information about the mesa-commit
mailing list