[Mesa-stable] [Mesa-dev] [PATCH] radeonsi: enable optimal raster config setting for fiji (v2)

Marek Olšák maraeo at gmail.com
Mon Nov 16 02:32:25 PST 2015


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Nov 13, 2015 at 10:53 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
> Requires proper kernel tiling configurarion so check the tiling
> config registers.
>
> v2: send the right version of the patch
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/radeonsi/si_state.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 1b5ea35..f8168d3 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -3286,6 +3286,7 @@ si_write_harvested_raster_configs(struct si_context *sctx,
>
>  static void si_init_config(struct si_context *sctx)
>  {
> +       struct si_screen *sscreen = sctx->screen;
>         unsigned num_rb = MIN2(sctx->screen->b.info.r600_num_backends, 16);
>         unsigned rb_mask = sctx->screen->b.info.si_backend_enabled_mask;
>         unsigned raster_config, raster_config_1;
> @@ -3356,9 +3357,14 @@ static void si_init_config(struct si_context *sctx)
>                 raster_config_1 = 0x0000002e;
>                 break;
>         case CHIP_FIJI:
> -               /* Fiji should be same as Hawaii, but that causes corruption in some cases */
> -               raster_config = 0x16000012; /* 0x3a00161a */
> -               raster_config_1 = 0x0000002a; /* 0x0000002e */
> +               if (sscreen->b.info.cik_macrotile_mode_array[0] == 0x000000e8) {
> +                       /* old kernels with old tiling config */
> +                       raster_config = 0x16000012;
> +                       raster_config_1 = 0x0000002a;
> +               } else {
> +                       raster_config = 0x3a00161a;
> +                       raster_config_1 = 0x0000002e;
> +               }
>                 break;
>         case CHIP_TONGA:
>                 raster_config = 0x16000012;
> --
> 1.8.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list