radeonsi: emit PA_SC_RASTER_CONFIG[_1] on cik
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Jun 2013 18:07:10 +0000 (14:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Jun 2013 19:16:53 +0000 (15:16 -0400)
Use the golden values for each asic.

Todo: update Kabini and Kaveri.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 4ef73ec4b37aa5c870116564071711cdbc5b93aa..58e5a56939943f2c4bae6f21d8bb29a93cfd118c 100644 (file)
@@ -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);