[PATCH] drm/amdkfd: remove gfx 12 trap handler page size cap

Belanger, David David.Belanger at amd.com
Tue Nov 5 18:50:04 UTC 2024


[Public]

Reviewed-by: David Belanger <david.belanger at amd.com>

> -----Original Message-----
> From: Kim, Jonathan <Jonathan.Kim at amd.com>
> Sent: Tuesday, November 5, 2024 1:46 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Belanger, David <David.Belanger at amd.com>; Kim, Jonathan
> <Jonathan.Kim at amd.com>
> Subject: [PATCH] drm/amdkfd: remove gfx 12 trap handler page size cap
>
> GFX 12 does not require a page size cap for the trap handler because it does not
> require a CWSR work around like GFX 11 did.
>
> v2: set default cap
>
> Signed-off-by: Jonathan Kim <jonathan.kim at amd.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 348925254bff..956198da7859 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -534,7 +534,8 @@ static void kfd_cwsr_init(struct kfd_dev *kfd)
>                       kfd->cwsr_isa = cwsr_trap_gfx11_hex;
>                       kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx11_hex);
>               } else {
> -                     BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_hex) >
> PAGE_SIZE);
> +                     BUILD_BUG_ON(sizeof(cwsr_trap_gfx12_hex)
> +                                          > KFD_CWSR_TMA_OFFSET);
>                       kfd->cwsr_isa = cwsr_trap_gfx12_hex;
>                       kfd->cwsr_isa_size = sizeof(cwsr_trap_gfx12_hex);
>               }
> --
> 2.34.1



More information about the amd-gfx mailing list