[PATCH 1/3] drm/amdgpu: implicitly sync the dependent read fences
Liang, Prike
Prike.Liang at amd.com
Fri Apr 25 07:19:24 UTC 2025
[Public]
Will send a new patch for updating the patch subject.
Regards,
Prike
> -----Original Message-----
> From: Liang, Prike <Prike.Liang at amd.com>
> Sent: Friday, April 25, 2025 3:07 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian
> <Christian.Koenig at amd.com>; Liang, Prike <Prike.Liang at amd.com>
> Subject: [PATCH 1/3] drm/amdgpu: implicitly sync the dependent read fences
>
> The driver doesn't want to sync on the DMA_RESV_USAGE_BOOKKEEP usage
> fences, so here only return and sync the dependent read fences.
>
> Signed-off-by: Prike Liang <Prike.Liang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> index 5576ed0b508f..4e1d30ecb6cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> @@ -249,9 +249,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
> struct amdgpu_sync *sync,
>
> if (resv == NULL)
> return -EINVAL;
> -
> - /* TODO: Use DMA_RESV_USAGE_READ here */
> - dma_resv_for_each_fence(&cursor, resv,
> DMA_RESV_USAGE_BOOKKEEP, f) {
> + /*Only return and sync the fences of usage <=
> DMA_RESV_USAGE_READ.*/
> + dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_READ, f) {
> dma_fence_chain_for_each(f, f) {
> struct dma_fence *tmp = dma_fence_chain_contained(f);
>
> --
> 2.34.1
More information about the amd-gfx
mailing list