On 12/12/25 07:40, Donet Tom wrote:
> The SDMA engine has a hardware limitation of 4 MB maximum transfer
> size per operation.

That is not correct. This is only true on ancient HW.

What problems are you seeing here?

> AMDGPU_GTT_MAX_TRANSFER_SIZE was hardcoded to
> 512 pages, which worked correctly on systems with 4K pages but fails
> on systems with larger page sizes.
> 
> This patch divides the max transfer size / AMDGPU_GPU_PAGES_IN_CPU_PAGE
> to match with non-4K page size systems.

That is actually a bad idea. The value was meant to match the PMD size.

Regards,
Christian.

> 
> Signed-off-by: Donet Tom <[email protected]>
> Signed-off-by: Ritesh Harjani (IBM) <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index 0be2728aa872..9d038feb25b0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@ -37,7 +37,7 @@
>  #define AMDGPU_PL_MMIO_REMAP (TTM_PL_PRIV + 5)
>  #define __AMDGPU_PL_NUM      (TTM_PL_PRIV + 6)
>  
> -#define AMDGPU_GTT_MAX_TRANSFER_SIZE 512
> +#define AMDGPU_GTT_MAX_TRANSFER_SIZE (512 / AMDGPU_GPU_PAGES_IN_CPU_PAGE)
>  #define AMDGPU_GTT_NUM_TRANSFER_WINDOWS      2
>  
>  extern const struct attribute_group amdgpu_vram_mgr_attr_group;

Reply via email to