From: Alex Deucher Date: Fri, 7 Jun 2013 18:07:10 +0000 (-0400) Subject: radeonsi: emit PA_SC_RASTER_CONFIG[_1] on cik X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=234d81e6b26457a94aae37633c1adc89498bdb4e;p=mesa.git radeonsi: emit PA_SC_RASTER_CONFIG[_1] on cik Use the golden values for each asic. Todo: update Kabini and Kaveri. Signed-off-by: Alex Deucher --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 4ef73ec4b37..58e5a569399 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2937,23 +2937,40 @@ void si_init_config(struct r600_context *rctx) si_pm4_set_reg(pm4, R_02882C_PA_SU_PRIM_FILTER_CNTL, 0); - switch (rctx->screen->family) { - case CHIP_TAHITI: - case CHIP_PITCAIRN: - si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x2a00126a); - break; - case CHIP_VERDE: - si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x0000124a); - break; - case CHIP_OLAND: - si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000082); - break; - case CHIP_HAINAN: - si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000); - break; - default: - si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000); - break; + if (rctx->chip_class >= CIK) { + switch (rctx->screen->family) { + case CHIP_BONAIRE: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x16000012); + si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x00000000); + break; + case CHIP_KAVERI: + /* XXX todo */ + case CHIP_KABINI: + /* XXX todo */ + default: + 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 { + switch (rctx->screen->family) { + case CHIP_TAHITI: + case CHIP_PITCAIRN: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x2a00126a); + break; + case CHIP_VERDE: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x0000124a); + break; + case CHIP_OLAND: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000082); + break; + case CHIP_HAINAN: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000); + break; + default: + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x00000000); + break; + } } si_pm4_set_state(rctx, init, pm4);