[Public] > From: Koenig, Christian <christian.koe...@amd.com> > Sent: Wednesday, April 30, 2025 7:57 PM > To: Liang, Prike <prike.li...@amd.com>; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander <alexander.deuc...@amd.com> > Subject: Re: [PATCH v3 2/5] drm/amdgpu: don't sync the user queue eviction > fence > > On 4/30/25 04:40, Prike Liang wrote: > > Don't return and sync the user queue eviction fence; otherwise, the > > eviction fence will be returned as a dependent fence during VM update > > and refer to the fence result in leakage. > > Please drop that patch, it shouldn't be needed any more after the changes in > patch #1.
Yes, may I get patch#1( drm/amdgpu: promote the implicit sync to the dependent read fences) reviewed? > Regards, > Christian. > > > > > Signed-off-by: Prike Liang <prike.li...@amd.com> > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 11 +++++++++++ > > drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h | 1 + > > drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 ++++ > > 3 files changed, 16 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > > index d86e611a9ff4..6c9b2b43a929 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c > > @@ -224,6 +224,17 @@ void amdgpu_eviction_fence_detach(struct > amdgpu_eviction_fence_mgr *evf_mgr, > > dma_fence_put(stub); > > } > > > > +bool amdgpu_eviction_fence_valid(struct dma_fence *f) { > > + > > + if(!f) > > + return false; > > + if (f->ops == &amdgpu_eviction_fence_ops) > > + return true; > > + > > + return false; > > +} > > + > > int amdgpu_eviction_fence_init(struct amdgpu_eviction_fence_mgr > > *evf_mgr) { > > /* This needs to be done one time per open */ diff --git > > a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h > > index fcd867b7147d..d4e1975cac71 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.h > > @@ -42,6 +42,7 @@ struct amdgpu_eviction_fence_mgr { }; > > > > /* Eviction fence helper functions */ > > +bool amdgpu_eviction_fence_valid(struct dma_fence *f); > > struct amdgpu_eviction_fence * > > amdgpu_eviction_fence_create(struct amdgpu_eviction_fence_mgr > > *evf_mgr); > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c > > index d6ae9974c952..8ac685eb1be1 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c > > @@ -185,6 +185,10 @@ static bool amdgpu_sync_test_fence(struct > > amdgpu_device *adev, { > > void *fence_owner = amdgpu_sync_get_owner(f); > > > > + /* don't sync the kgd userq eviction fence*/ > > + if(amdgpu_eviction_fence_valid(f)) > > + return false; > > + > > /* Always sync to moves, no matter what */ > > if (fence_owner == AMDGPU_FENCE_OWNER_UNDEFINED) > > return true;