Thread View: org.freedesktop.lists.amd-gfx
1 messages
1 total messages
Started by Liang, Prike
Tue, 06 May 2025 02:19
RE: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference
Author: Liang, Prike
Date: Tue, 06 May 2025 02:19
Date: Tue, 06 May 2025 02:19
43 lines
15348 bytes
15348 bytes
[Public]
> From: Koenig, Christian <Christian.Koenig@amd.com>
> Sent: Wednesday, April 30, 2025 7:58 PM
> To: Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>
> Subject: Re: [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference
>
> 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.
Thank you for the reminder. The eviction fence release total fixes need to include the patch#1, but this fix can be pushed separately. I have pushed it now.
> 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;
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads