* [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update
@ 2026-10-16 12:09 Sunil Khatri
2026-10-16 12:09 ` [PATCH v1 2/2] drm/amdgpu: identify the root PD by pointer in amdgpu_vm_bo_needs_update Sunil Khatri
2026-10-16 12:13 ` [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Christian König
0 siblings, 2 replies; 3+ messages in thread
From: Sunil Khatri @ 2026-10-16 12:09 UTC (permalink / raw)
To: Alex Deucher, Christian König; +Cc: amd-gfx, Sunil Khatri
In function amdgpu_vm_bo_insert_map, amdgpu_vm_bo_needs_update is
skipped due to amdgpu_vm_is_bo_always_valid but it should not skip
for bo's which are allocate have it's own dma_resv object or NULL.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index de992405ed718..3eb778add39be 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1798,7 +1798,7 @@ static void amdgpu_vm_bo_insert_map(struct amdgpu_device *adev,
if (mapping->flags & AMDGPU_VM_PAGE_PRT)
amdgpu_vm_prt_get(adev);
- if (amdgpu_vm_is_bo_always_valid(vm, bo) && !bo_va->base.moved)
+ if (!bo_va->base.moved)
amdgpu_vm_bo_needs_update(&bo_va->base);
trace_amdgpu_vm_bo_map(bo_va, mapping);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] drm/amdgpu: identify the root PD by pointer in amdgpu_vm_bo_needs_update
2026-10-16 12:09 [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Sunil Khatri
@ 2026-10-16 12:09 ` Sunil Khatri
2026-10-16 12:13 ` [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Sunil Khatri @ 2026-10-16 12:09 UTC (permalink / raw)
To: Alex Deucher, Christian König; +Cc: amd-gfx, Sunil Khatri
bo->tbo.type == ttm_bo_type_kernel && !bo->parent also matches other
kernel BOs with no parent, not just vm->root.bo, routing them to idle
instead of needs_update. Compare against vm->root.bo directly.
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3eb778add39be..de44b9408c103 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -230,7 +230,7 @@ static void amdgpu_vm_bo_needs_update(struct amdgpu_vm_bo_base *vm_bo)
* idle state.
*/
lists = amdgpu_vm_bo_lock_lists(vm_bo);
- if (bo && bo->tbo.type == ttm_bo_type_kernel && !bo->parent) {
+ if (bo == vm_bo->vm->root.bo) {
vm_bo->moved = false;
list_move(&vm_bo->vm_status, &lists->idle);
} else {
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update
2026-10-16 12:09 [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Sunil Khatri
2026-10-16 12:09 ` [PATCH v1 2/2] drm/amdgpu: identify the root PD by pointer in amdgpu_vm_bo_needs_update Sunil Khatri
@ 2026-10-16 12:13 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2026-10-16 12:13 UTC (permalink / raw)
To: Sunil Khatri, Alex Deucher; +Cc: amd-gfx
On 10/16/26 14:09, Sunil Khatri wrote:
> In function amdgpu_vm_bo_insert_map, amdgpu_vm_bo_needs_update is
> skipped due to amdgpu_vm_is_bo_always_valid but it should not skip
> for bo's which are allocate have it's own dma_resv object or NULL.
>
> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> for both.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index de992405ed718..3eb778add39be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1798,7 +1798,7 @@ static void amdgpu_vm_bo_insert_map(struct amdgpu_device *adev,
> if (mapping->flags & AMDGPU_VM_PAGE_PRT)
> amdgpu_vm_prt_get(adev);
>
> - if (amdgpu_vm_is_bo_always_valid(vm, bo) && !bo_va->base.moved)
> + if (!bo_va->base.moved)
> amdgpu_vm_bo_needs_update(&bo_va->base);
>
> trace_amdgpu_vm_bo_map(bo_va, mapping);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-16 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16 12:09 [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Sunil Khatri
2026-10-16 12:09 ` [PATCH v1 2/2] drm/amdgpu: identify the root PD by pointer in amdgpu_vm_bo_needs_update Sunil Khatri
2026-10-16 12:13 ` [PATCH v1 1/2] drm/amdgpu: fix amdgpu_vm_bo_insert_map to let bo gets update Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.