From: Benjamin Cheng <benjamin.cheng@amd.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
amd-gfx@lists.freedesktop.org
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>,
"Shahyan Soltani" <shahyan.soltani@amd.com>,
Benjamin Cheng <benjamin.cheng@amd.com>
Subject: [PATCH v2 08/10] drm/amdgpu/vm: stop using amdgpu_bo_fence
Date: Wed, 18 Nov 2026 14:07:33 -0500 [thread overview]
Message-ID: <20261118190735.1863676-9-benjamin.cheng@amd.com> (raw)
In-Reply-To: <20261118190735.1863676-1-benjamin.cheng@amd.com>
Switch to stop using this deprecated helper.
The original could be incorrect under certain circumstances, since the
amdgpu_bo_fence only reserves one slot, and at the time of calling the
SDMA commit and TLB flush fences were not added yet (the reserve_fences
is not additive). In addition this allows us to switch to use BOOKKEEP
usage.
Signed-off-by: Benjamin Cheng <benjamin.cheng@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index daf0e75d0bb1..2a8abc9684b7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1216,7 +1216,8 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (!unlocked && !dma_fence_is_signaled(vm->last_unlocked)) {
struct dma_fence *tmp = dma_fence_get_stub();
- amdgpu_bo_fence(vm->root.bo, vm->last_unlocked, true);
+ dma_resv_add_fence(vm->root.bo->tbo.base.resv, vm->last_unlocked,
+ DMA_RESV_USAGE_BOOKKEEP);
swap(vm->last_unlocked, tmp);
dma_fence_put(tmp);
}
--
2.56.1
next prev parent reply other threads:[~2026-11-18 19:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 19:07 [PATCH v2 00/10] Consolidate and fix root PD fence resverations Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 01/10] drm/amdkfd: reserve TTM move fences Benjamin Cheng
2026-11-19 13:53 ` Christian König
2026-11-18 19:07 ` [PATCH v2 02/10] drm/amdgpu/gem: reserve fences on the VM root PD Benjamin Cheng
2026-11-19 13:58 ` Christian König
2026-11-18 19:07 ` [PATCH v2 03/10] drm/amdgpu/vm: reserve more fences in amdgpu_vm_lock_pd Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 04/10] drm/amdgpu/dma_buf: reserve AMDGPU_VM_UPDATE_FENCES for move_notify Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 05/10] drm/amdgpu/vm: reserve AMDGPU_VM_UPDATE_FENCES for handle_fault Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 06/10] drm/amdgpu: reserve only what the caller asks for in lock_pd Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 07/10] drm/amdgpu/userq: remove extra fence request when locking PD Benjamin Cheng
2026-11-18 19:07 ` Benjamin Cheng [this message]
2026-11-18 19:07 ` [PATCH v2 09/10] drm/amdgpu/uvd: stop using amdgpu_bo_fence Benjamin Cheng
2026-11-18 19:07 ` [PATCH v2 10/10] drm/amdgpu/object: get rid of amdgpu_bo_fence Benjamin Cheng
2026-11-18 19:29 ` sashiko-bot
2026-11-19 14:40 ` [PATCH v3 1/7] drm/amdkfd: reserve TTM move fences Benjamin Cheng
2026-11-19 14:40 ` [PATCH v3 2/7] drm/amdgpu/gem: reserve fences on the VM root PD Benjamin Cheng
2026-11-19 14:40 ` [PATCH v3 3/7] drm/amdgpu/vm: reserve TTM_NUM_MOVE_FENCES in amdgpu_vm_lock_pd Benjamin Cheng
2026-11-20 9:50 ` Christian König
2026-11-19 14:40 ` [PATCH v3 4/7] drm/amdgpu/vm: reserve space for last_unlocked in handle_fault Benjamin Cheng
2026-11-20 12:03 ` Christian König
2026-11-19 14:40 ` [PATCH v3 5/7] drm/amdgpu/vm: stop using amdgpu_bo_fence Benjamin Cheng
2026-11-19 15:04 ` sashiko-bot
2026-11-20 14:08 ` Benjamin Cheng
2026-11-20 14:18 ` Christian König
2026-11-20 14:47 ` Benjamin Cheng
2026-11-19 14:40 ` [PATCH v3 6/7] drm/amdgpu/uvd: " Benjamin Cheng
2026-11-20 9:59 ` Christian König
2026-11-19 14:40 ` [PATCH v3 7/7] drm/amdgpu/object: get rid of amdgpu_bo_fence Benjamin Cheng
2026-11-19 14:46 ` sashiko-bot
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=20261118190735.1863676-9-benjamin.cheng@amd.com \
--to=benjamin.cheng@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=shahyan.soltani@amd.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 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.