Re: [PATCH 6/6] drm/amdgpu: use dma_fence_chain_contained

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 4, 2022 at 5:04 AM Christian König
<ckoenig.leichtzumerken@xxxxxxxxx> wrote:
>
> Instead of manually extracting the fence.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

> ---
>  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 f7d8487799b2..40e06745fae9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> @@ -261,10 +261,9 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
>
>         dma_resv_for_each_fence(&cursor, resv, true, f) {
>                 dma_fence_chain_for_each(f, f) {
> -                       struct dma_fence_chain *chain = to_dma_fence_chain(f);
> +                       struct dma_fence *tmp = dma_fence_chain_contained(f);
>
> -                       if (amdgpu_sync_test_fence(adev, mode, owner, chain ?
> -                                                  chain->fence : f)) {
> +                       if (amdgpu_sync_test_fence(adev, mode, owner, tmp)) {
>                                 r = amdgpu_sync_fence(sync, f);
>                                 dma_fence_put(f);
>                                 if (r)
> --
> 2.25.1
>




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux