[Mesa-dev] [PATCH] R600/SI: radeonsi: Program RASTER_CONFIG for harvested GPUs v3
Michel Dänzer
michel at daenzer.net
Tue Sep 9 20:38:33 PDT 2014
On 10.09.2014 05:08, Tom Stellard wrote:
> v2:
> - Write RASTER_CONFIG for all SEs.
>
> v3:
> - Set GRBM_GFX_INDEX.INSTANCE_BROADCAST_WRITES bit.
> - Set GRBM_GFX_INFEX.SH_BROADCAST_WRITES bit when done setting
> PA_SC_RASTER_CONFIG.
> - Get num_se and num_sh_per_se from kernel.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=60879
>
> CC: "10.3 10.2" <mesa-stable at lists.freedesktop.org>
I think you should drop the 'R600/SI: ' prefix from the commit summary,
as this change isn't in the LLVM backend.
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 1d6ae86..32b93d3 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -3060,24 +3071,97 @@ void si_init_config(struct si_context *sctx)
> break;
> }
> } else {
> + unsigned raster_config = 0;
> + unsigned sh_per_se = MAX2(sctx->screen->b.info.max_sh_per_se, 1);
> + unsigned num_se = MAX2(sctx->screen->b.info.max_sh_per_se, 1);
I think num_se should use sctx->screen->b.info.max_se, not .max_sh_per_se?
Maybe it's unnecessary anyway though:
> + for (i = 0; i < num_se; i++) {
> + si_pm4_set_reg(pm4, GRBM_GFX_INDEX,
> + SE_INDEX(i) |
> + SH_BROADCAST_WRITES |
> + INSTANCE_BROADCAST_WRITES);
> + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, raster_config);
> + }
Since this uses the same raster_config value for all SEs, couldn't it
just use a single write with SE_BROADCAST_WRITES enabled in GRBM_GFX_INDEX?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list