On Sat, Apr 12, 2025 at 4:22 PM Rodrigo Siqueira <sique...@igalia.com> wrote:
>
> CHIP_KAVERI, CHIP_KABINI, and CHIP_MULLINS have the same buffer
> manipulation as the default option in the switch case. Remove those
> specific manipulations and rely on the default behavior for them.
>
> Signed-off-by: Rodrigo Siqueira <sique...@igalia.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> index 16b94ff5a959..4d8d68b737d1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
> @@ -3902,15 +3902,6 @@ static void gfx_v7_0_get_csb_buffer(struct 
> amdgpu_device *adev,
>                 buffer[count++] = cpu_to_le32(0x16000012);
>                 buffer[count++] = cpu_to_le32(0x00000000);
>                 break;
> -       case CHIP_KAVERI:
> -               buffer[count++] = cpu_to_le32(0x00000000); /* XXX */
> -               buffer[count++] = cpu_to_le32(0x00000000);
> -               break;
> -       case CHIP_KABINI:
> -       case CHIP_MULLINS:
> -               buffer[count++] = cpu_to_le32(0x00000000); /* XXX */
> -               buffer[count++] = cpu_to_le32(0x00000000);
> -               break;

These should be fixed rather than removed.  Actually, all of these
should be fixed up for all chips.  We should use the values calculated
by the driver similar to what we do in gfx_v8.  E.g.,
        buffer[count++] =
cpu_to_le32(adev->gfx.config.rb_config[0][0].raster_config);
        buffer[count++] =
cpu_to_le32(adev->gfx.config.rb_config[0][0].raster_config_1);

Alex

>         case CHIP_HAWAII:
>                 buffer[count++] = cpu_to_le32(0x3a00161a);
>                 buffer[count++] = cpu_to_le32(0x0000002e);
> --
> 2.49.0
>

Reply via email to