[PATCH 2/2] drm/amdgpu: Put page tables to GTT memory for APUs.

Christian König christian.koenig at amd.com
Tue Aug 22 11:50:57 UTC 2023


Am 22.08.23 um 08:17 schrieb Yifan Zhang:
> To decrease VRAM pressure for APUs, put page tables to
> GTT domain.
>
> Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> index 96d601e209b8..26063e611c49 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> @@ -515,7 +515,7 @@ int amdgpu_vm_pt_create(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>   	bp.size = amdgpu_vm_pt_size(adev, level);
>   	bp.byte_align = AMDGPU_GPU_PAGE_SIZE;
>   
> -	if (!adev->gmc.is_app_apu)
> +	if (!(adev->gmc.is_app_apu || (adev->flags & AMD_IS_APU)))

I've tried this before and it doesn't work in quite a bunch of 
configurations. Especially IOMMU has big problems with that.

Alex do you know which hw generation finally supported that without 
problems?

Regards,
Christian.

>   		bp.domain = AMDGPU_GEM_DOMAIN_VRAM;
>   	else
>   		bp.domain = AMDGPU_GEM_DOMAIN_GTT;



More information about the amd-gfx mailing list