From: "Christian König" <christian.koenig@amd.com>
To: Prike Liang <Prike.Liang@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alexander.Deucher@amd.com, Christian.Koenig@amd.com
Subject: Re: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference
Date: Wed, 30 Apr 2025 13:58:12 +0200 [thread overview]
Message-ID: <5f08bb2d-e9c4-4d0d-b333-baf0355c23af@amd.com> (raw)
In-Reply-To: <20250430024054.4093239-3-Prike.Liang@amd.com>
On 4/30/25 04:40, Prike Liang wrote:
> The dma_resv_add_fence() already refers to the added fence.
> So when attaching the evciton fence to the gem bo, it needn't
> refer to it anymore.
>
> Signed-off-by: Prike Liang <Prike.Liang@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>
This is a bug fix and as such should always come as first patch in a series.
Please make sure to commit this one to amd-staging-drm-next ASAP.
Regards,
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> index 6c9b2b43a929..7a5f02ef45a7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c
> @@ -189,7 +189,6 @@ void amdgpu_eviction_fence_destroy(struct amdgpu_eviction_fence_mgr *evf_mgr)
> int amdgpu_eviction_fence_attach(struct amdgpu_eviction_fence_mgr *evf_mgr,
> struct amdgpu_bo *bo)
> {
> - struct dma_fence *ef;
> struct amdgpu_eviction_fence *ev_fence;
> struct dma_resv *resv = bo->tbo.base.resv;
> int ret;
> @@ -205,10 +204,8 @@ int amdgpu_eviction_fence_attach(struct amdgpu_eviction_fence_mgr *evf_mgr,
>
> spin_lock(&evf_mgr->ev_fence_lock);
> ev_fence = evf_mgr->ev_fence;
> - if (ev_fence) {
> - ef = dma_fence_get(&ev_fence->base);
> - dma_resv_add_fence(resv, ef, DMA_RESV_USAGE_BOOKKEEP);
> - }
> + if (ev_fence)
> + dma_resv_add_fence(resv, &ev_fence->base, DMA_RESV_USAGE_BOOKKEEP);
> spin_unlock(&evf_mgr->ev_fence_lock);
>
> return 0;
next prev parent reply other threads:[~2025-04-30 11:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 2:40 [PATCH v3 1/5] drm/amdgpu: promote the implicit sync to the dependent read fences Prike Liang
2025-04-30 2:40 ` [PATCH v3 2/5] drm/amdgpu: don't sync the user queue eviction fence Prike Liang
2025-04-30 11:56 ` Christian König
2025-05-06 2:09 ` Liang, Prike
2025-05-06 8:23 ` Christian König
2025-05-06 8:59 ` Liang, Prike
2025-04-30 2:40 ` [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference Prike Liang
2025-04-30 11:58 ` Christian König [this message]
2025-05-06 2:19 ` Liang, Prike
2025-04-30 2:40 ` [PATCH v3 4/5] drm/amdgpu: validate the eviction fence before attaching/detaching Prike Liang
2025-04-30 12:01 ` Christian König
2025-05-06 8:22 ` Liang, Prike
2025-05-06 8:38 ` Christian König
2025-05-08 7:08 ` Liang, Prike
2025-05-08 9:40 ` Christian König
2025-04-30 2:40 ` [PATCH v3 5/5] drm/amdgpu: lock the eviction fence before signaling it Prike Liang
2025-04-30 12:03 ` Christian König
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=5f08bb2d-e9c4-4d0d-b333-baf0355c23af@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Prike.Liang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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