From: sashiko-bot@kernel.org
To: "Benjamin Cheng" <benjamin.cheng@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/amdgpu/object: get rid of amdgpu_bo_fence
Date: Thu, 12 Nov 2026 16:52:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-211541@kernel.org> (raw)
In-Reply-To: <20261112164408.1748006-4-benjamin.cheng@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/amdgpu: build failure due to remaining amdgpu_bo_fence()
call
--
commit ad8f0288ef23c9d2bb8ccdc99b45b97d28e2518c
Author: Benjamin Cheng <benjamin.cheng@amd.com>
drm/amdgpu/object: get rid of amdgpu_bo_fence
This commit removes the amdgpu_bo_fence() helper and its declaration.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 6aa895f63aeaf..7fc43363ec626 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1441,31 +1441,6 @@ vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
> return 0;
> }
>
> -/**
> - * amdgpu_bo_fence - add fence to buffer object
> - *
> - * @bo: buffer object in question
> - * @fence: fence to add
> - * @shared: true if fence should be added shared
> - *
> - */
> -void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,
> - bool shared)
> -{
> - struct dma_resv *resv = bo->tbo.base.resv;
> - int r;
> -
> - r = dma_resv_reserve_fences(resv, 1);
> - if (r) {
> - /* As last resort on OOM we block for the fence */
> - dma_fence_wait(fence, false);
> - return;
> - }
> -
> - dma_resv_add_fence(resv, fence, shared ? DMA_RESV_USAGE_READ :
> - DMA_RESV_USAGE_WRITE);
> -}
[Severity: High]
Does removing amdgpu_bo_fence() break the build in
amdgpu_gem_object_close()?
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c:amdgpu_gem_object_close() {
...
if (r || !fence)
goto out_unlock;
amdgpu_bo_fence(bo, fence, true);
dma_fence_put(fence);
...
}
amdgpu_gem_object_close() still calls amdgpu_bo_fence(), which causes an
implicit function declaration error when compiling amdgpu_gem.c. Since
amdgpu_gem_object_close() already reserves a fence slot via
drm_exec_prepare_obj(), that caller can use dma_resv_add_fence() directly.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112164408.1748006-1-benjamin.cheng@amd.com?part=3
next prev parent reply other threads:[~2026-11-12 16:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 2:21 [PATCH] drm/amdgpu: wait for tlb flush before freeing BO Benjamin Cheng
2026-10-14 7:17 ` Christian König
2026-10-14 12:46 ` Benjamin Cheng
2026-10-14 13:09 ` Christian König
2026-11-06 15:20 ` [PATCH v2] " Benjamin Cheng
2026-11-06 16:04 ` Christian König
2026-11-06 16:07 ` Benjamin Cheng
2026-11-09 9:58 ` Christian König
2026-11-09 14:57 ` [PATCH v3 1/2] " Benjamin Cheng
2026-11-09 14:57 ` [PATCH v3 2/2] drm/amdgpu/gem: use dma_resv_add_fence directly Benjamin Cheng
2026-11-09 15:00 ` Christian König
2026-11-09 15:02 ` Benjamin Cheng
2026-11-12 16:44 ` [PATCH 1/3] drm/amdgpu/vm: stop using amdgpu_bo_fence Benjamin Cheng
2026-11-12 16:44 ` [PATCH 2/3] drm/amdgpu/uvd: " Benjamin Cheng
2026-11-12 16:44 ` [PATCH 3/3] drm/amdgpu/object: get rid of amdgpu_bo_fence Benjamin Cheng
2026-11-12 16:52 ` sashiko-bot [this message]
2026-11-12 17:22 ` [PATCH 1/3] drm/amdgpu/vm: stop using amdgpu_bo_fence 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=sashiko-outbox-211541@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benjamin.cheng@amd.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.