public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Javier Martinez Canillas" <javierm@redhat.com>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
	linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 02/15] dma-buf: specify usage while adding fences to dma_resv obj v7
Date: Thu, 7 Apr 2022 15:13:05 +0200	[thread overview]
Message-ID: <79648b84-e7d0-4c38-d8f1-cc569238ee7e@amd.com> (raw)
In-Reply-To: <29677a4e-42dc-d35e-f487-f8b344678bee@redhat.com>

Am 07.04.22 um 15:08 schrieb Javier Martinez Canillas:
> Hello Christian,
>
> On 4/7/22 10:59, Christian König wrote:
>> Instead of distingting between shared and exclusive fences specify
>> the fence usage while adding fences.
>>
>> Rework all drivers to use this interface instead and deprecate the old one.
>>
> This patch broke compilation for the vc4 DRM driver.

My apologies for that. I've tried really hard to catch all cases, but 
looks like I missed some.

> I've this patch locally
> which seems to work but I don't know enough about the fence API to know if
> is correct.
>
> If you think is the proper fix then I can post it as a patch.

Yes, that patch looks absolutely correct to me.

Feel free to add an Reviewed-by: Christian König 
<christian.koenig@amd.com> and CC me so that I can push it to 
drm-misc-next ASAP.

Thanks,
Christian.

>
>  From 3e96db4827ef69b38927476659cbb4469a0246e6 Mon Sep 17 00:00:00 2001
> From: Javier Martinez Canillas <javierm@redhat.com>
> Date: Thu, 7 Apr 2022 14:54:07 +0200
> Subject: [PATCH] drm/vc4: Use newer fence API to fix build error
>
> The commit 73511edf8b19 ("dma-buf: specify usage while adding fences to
> dma_resv obj v7") ported all the DRM drivers to use the newer fence API
> that specifies the usage with the enum dma_resv_usage rather than doing
> an explicit shared / exclusive distinction.
>
> But the commit didn't do it properly in two callers of the vc4 driver,
> leading to build errors.
>
> Fixes: 73511edf8b19 ("dma-buf: specify usage while adding fences to dma_resv obj v7")
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>   drivers/gpu/drm/vc4/vc4_gem.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
> index 38550317e025..9eaf304fc20d 100644
> --- a/drivers/gpu/drm/vc4/vc4_gem.c
> +++ b/drivers/gpu/drm/vc4/vc4_gem.c
> @@ -546,7 +546,8 @@ vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno)
>   		bo = to_vc4_bo(&exec->bo[i]->base);
>   		bo->seqno = seqno;
>   
> -		dma_resv_add_fence(bo->base.base.resv, exec->fence);
> +		dma_resv_add_fence(bo->base.base.resv, exec->fence,
> +				   DMA_RESV_USAGE_READ);
>   	}
>   
>   	list_for_each_entry(bo, &exec->unref_list, unref_head) {
> @@ -557,7 +558,8 @@ vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno)
>   		bo = to_vc4_bo(&exec->rcl_write_bo[i]->base);
>   		bo->write_seqno = seqno;
>   
> -		dma_resv_add_excl_fence(bo->base.base.resv, exec->fence);
> +		dma_resv_add_fence(bo->base.base.resv, exec->fence,
> +				   DMA_RESV_USAGE_WRITE);
>   	}
>   }
>   


  reply	other threads:[~2022-04-07 13:13 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07  8:59 DMA-resv usage Christian König
2022-04-07  8:59 ` [PATCH 01/15] dma-buf: add enum dma_resv_usage v4 Christian König
2022-04-07  8:59 ` [PATCH 02/15] dma-buf: specify usage while adding fences to dma_resv obj v7 Christian König
2022-04-07  9:14   ` Daniel Vetter
2022-04-07 13:08   ` Javier Martinez Canillas
2022-04-07 13:13     ` Christian König [this message]
2022-04-07 13:16       ` Javier Martinez Canillas
2022-04-07  8:59 ` [PATCH 03/15] dma-buf & drm/amdgpu: remove dma_resv workaround Christian König
2022-04-20  3:56   ` Zack Rusin
2022-04-20  7:37     ` Christian König
2022-04-20 17:38       ` Zack Rusin
2022-04-20 17:40         ` Christian König
2022-04-20 18:41           ` Zack Rusin
2022-04-20 18:49             ` Christian König
2022-04-20 18:56               ` Christian König
2022-04-20 19:28                 ` Zack Rusin
2022-04-21 10:17                   ` Christian König
2022-04-21 21:13                     ` Zack Rusin
2022-04-22  7:47                       ` Christian König
2022-04-07  8:59 ` [PATCH 04/15] dma-buf: add DMA_RESV_USAGE_KERNEL v3 Christian König
2022-04-07  8:59 ` [PATCH 05/15] drm/amdgpu: use DMA_RESV_USAGE_KERNEL Christian König
2022-04-07  8:59 ` [PATCH 06/15] drm/radeon: " Christian König
2022-04-07  8:59 ` [PATCH 07/15] drm/nouveau: only wait for kernel fences in nouveau_bo_vm_cleanup Christian König
2022-04-07  8:59 ` [PATCH 08/15] RDMA: use DMA_RESV_USAGE_KERNEL Christian König
2022-04-07  8:59 ` [PATCH 09/15] dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3 Christian König
2022-04-07  8:59 ` [PATCH 10/15] drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP Christian König
2022-04-07  8:59 ` [PATCH 11/15] dma-buf: wait for map to complete for static attachments Christian König
2022-04-07  8:59 ` [PATCH 12/15] drm/i915: drop bo->moving dependency Christian König
2022-04-08  9:05   ` Jani Nikula
2022-04-08  9:27     ` Christian König
2022-04-08  9:33       ` Daniel Vetter
2022-04-08  9:39         ` Christian König
2022-04-08 10:15       ` Jani Nikula
2022-04-08 10:41         ` Christian König
2022-04-07  8:59 ` [PATCH 13/15] drm/ttm: remove bo->moving Christian König
2022-04-07  8:59 ` [PATCH 14/15] dma-buf: drop seq count based update Christian König
2022-04-07  8:59 ` [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t Christian König
2022-04-07  9:19   ` Daniel Vetter
2022-04-07 11:48     ` Christian König
2022-04-07  9:26   ` Peter Zijlstra
2022-04-07  9:15 ` DMA-resv usage Daniel Vetter

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=79648b84-e7d0-4c38-d8f1-cc569238ee7e@amd.com \
    --to=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.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