radeonsi/compute: Add Sea Islands support
authorTom Stellard <thomas.stellard@amd.com>
Wed, 16 Oct 2013 17:43:08 +0000 (13:43 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 11 Nov 2013 22:21:34 +0000 (17:21 -0500)
src/gallium/drivers/radeonsi/radeonsi_compute.c

index 265dbd7ab59085cc6b5bb5b8918b10982855d1b0..49caa2c6a87aa3a5e8da7ffcad473833c1ac8866 100644 (file)
@@ -161,9 +161,18 @@ static void radeonsi_launch_grid(
                si_pm4_add_bo(pm4, buffer, RADEON_USAGE_READWRITE);
        }
 
-       /* XXX: This should be:
-        * (number of compute units) * 4 * (waves per simd) - 1 */
-       si_pm4_set_reg(pm4, R_00B82C_COMPUTE_MAX_WAVE_ID, 0x190 /* Default value */);
+       /* This register has been moved to R_00CD20_COMPUTE_MAX_WAVE_ID
+        * and is now per pipe, so it should be handled in the
+        * kernel if we want to use something other than the default value,
+        * which is now 0x22f.
+        */
+       if (rctx->b.chip_class <= SI) {
+               /* XXX: This should be:
+                * (number of compute units) * 4 * (waves per simd) - 1 */
+
+               si_pm4_set_reg(pm4, R_00B82C_COMPUTE_MAX_WAVE_ID,
+                                               0x190 /* Default value */);
+       }
 
        shader_va = r600_resource_va(ctx->screen, (void *)shader->bo);
        si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ);