AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag
Date: Wed, 19 Nov 2025 09:32:37 +0100	[thread overview]
Message-ID: <7efd581c-8ab2-4c1d-b8d4-5d3c28a854ee@amd.com> (raw)
In-Reply-To: <20251118165620.216753-1-timur.kristof@gmail.com>

On 11/18/25 17:56, Timur Kristóf wrote:
> This fixes sparse mappings (aka. partially resident textures).
> 
> Check the correct flags.
> Since a recent refactor, the code works with uAPI flags (for
> mapping buffer objects), and not PTE (page table entry) flags.
> 
> Fixes: 0fdf257286d7 ("drm/amdgpu: rework how PTE flags are generated v3")
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

@Alex this needs to go into 6.18, but not older kernels.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index e803d173e25b..1a8155bdce5e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2091,7 +2091,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>  		struct amdgpu_bo *bo = before->bo_va->base.bo;
>  
>  		amdgpu_vm_it_insert(before, &vm->va);
> -		if (before->flags & AMDGPU_PTE_PRT_FLAG(adev))
> +		if (before->flags & AMDGPU_VM_PAGE_PRT)
>  			amdgpu_vm_prt_get(adev);
>  
>  		if (amdgpu_vm_is_bo_always_valid(vm, bo) &&
> @@ -2106,7 +2106,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>  		struct amdgpu_bo *bo = after->bo_va->base.bo;
>  
>  		amdgpu_vm_it_insert(after, &vm->va);
> -		if (after->flags & AMDGPU_PTE_PRT_FLAG(adev))
> +		if (after->flags & AMDGPU_VM_PAGE_PRT)
>  			amdgpu_vm_prt_get(adev);
>  
>  		if (amdgpu_vm_is_bo_always_valid(vm, bo) &&


  parent reply	other threads:[~2025-11-19  8:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 16:56 [PATCH 1/3] drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag Timur Kristóf
2025-11-18 16:56 ` [PATCH 2/3] drm/amdgpu/uapi: Clarify comment on AMDGPU_VM_PAGE_PRT Timur Kristóf
2025-11-19  8:33   ` Christian König
2025-11-18 16:56 ` [PATCH 3/3] Documentation/gpu: Add PRT, PTE to amdgpu glossary Timur Kristóf
2025-11-19  8:34   ` Christian König
2025-11-19  8:32 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-19  9:25 [PATCH 1/3] drm/amdgpu/vm: Check PRT uAPI flag instead of PTE flag Timur Kristóf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7efd581c-8ab2-4c1d-b8d4-5d3c28a854ee@amd.com \
    --to=christian.koenig@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=timur.kristof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox