linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: sumit.semwal@linaro.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH 19/26] drm: support more than one write fence in drm_gem_plane_helper_prepare_fb
Date: Fri, 26 Nov 2021 11:30:19 +0100	[thread overview]
Message-ID: <0a3f93f1-278e-c393-3e79-745a52694f3d@gmail.com> (raw)
In-Reply-To: <YZ+wCxjFSI4EAIvx@phenom.ffwll.local>

Am 25.11.21 um 16:47 schrieb Daniel Vetter:
> On Tue, Nov 23, 2021 at 03:21:04PM +0100, Christian König wrote:
>> Use dma_resv_get_singleton() here to eventually get more than one write
>> fence as single fence.
> Yeah this is nice, atomic commit helpers not supporting multiple write
> fences was really my main worry in this entire endeavour. Otherwise looks
> all rather reasonable.
>
> I'll try to find some review bandwidth, but would be really if you can
> volunteer others too (especially making sure ttm drivers set the KERNEL
> fences correctly in all cases).

Maybe I should split that up into switching over to adding the enum and 
then switching to kernel/bookkeep(previously other) for some use cases.

It would be good if I could get an rb on the trivial driver cleanups 
first. I can send those out individually if that helps.

Thanks,
Christian.

> -Daniel
>
>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>>   drivers/gpu/drm/drm_gem_atomic_helper.c | 18 +++++++-----------
>>   1 file changed, 7 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/drivers/gpu/drm/drm_gem_atomic_helper.c
>> index c3189afe10cb..9338ddb7edff 100644
>> --- a/drivers/gpu/drm/drm_gem_atomic_helper.c
>> +++ b/drivers/gpu/drm/drm_gem_atomic_helper.c
>> @@ -143,25 +143,21 @@
>>    */
>>   int drm_gem_plane_helper_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state)
>>   {
>> -	struct dma_resv_iter cursor;
>>   	struct drm_gem_object *obj;
>>   	struct dma_fence *fence;
>> +	int ret;
>>   
>>   	if (!state->fb)
>>   		return 0;
>>   
>>   	obj = drm_gem_fb_get_obj(state->fb, 0);
>> -	dma_resv_iter_begin(&cursor, obj->resv, false);
>> -	dma_resv_for_each_fence_unlocked(&cursor, fence) {
>> -		/* TODO: Currently there should be only one write fence, so this
>> -		 * here works fine. But drm_atomic_set_fence_for_plane() should
>> -		 * be changed to be able to handle more fences in general for
>> -		 * multiple BOs per fb anyway. */
>> -		dma_fence_get(fence);
>> -		break;
>> -	}
>> -	dma_resv_iter_end(&cursor);
>> +	ret = dma_resv_get_singleton(obj->resv, false, &fence);
>> +	if (ret)
>> +		return ret;
>>   
>> +	/* TODO: drm_atomic_set_fence_for_plane() should be changed to be able
>> +	 * to handle more fences in general for multiple BOs per fb.
>> +	 */
>>   	drm_atomic_set_fence_for_plane(state, fence);
>>   	return 0;
>>   }
>> -- 
>> 2.25.1
>>


  reply	other threads:[~2021-11-26 11:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 14:20 completely rework the dma_resv semantic Christian König
2021-11-23 14:20 ` [PATCH 01/26] drm/amdgpu: partially revert "svm bo enable_signal call condition" Christian König
2021-11-23 14:20 ` [PATCH 02/26] dma-buf: cleanup pruning of dma_resv objects Christian König
2021-11-23 14:20 ` [PATCH 03/26] dma-buf: make fence mandatory for dma_resv_add_excl_fence Christian König
2021-11-23 14:20 ` [PATCH 04/26] drm/qxl: use iterator instead of dma_resv_shared_list Christian König
2021-11-23 14:20 ` [PATCH 05/26] dma-buf: add dma_resv_replace_fences Christian König
2021-11-23 14:20 ` [PATCH 06/26] dma-buf: finally make the dma_resv_list private Christian König
2021-11-23 14:20 ` [PATCH 07/26] dma-buf: drop excl_fence parameter from dma_resv_get_fences Christian König
2021-11-23 14:20 ` [PATCH 08/26] dma-buf: add dma_resv_get_singleton Christian König
2021-11-23 14:20 ` [PATCH 09/26] RDMA: use dma_resv_wait() instead of extracting the fence Christian König
2021-11-23 14:20 ` [PATCH 10/26] drm/etnaviv: stop using dma_resv_excl_fence Christian König
2021-11-23 14:20 ` [PATCH 11/26] drm/nouveau: " Christian König
2021-11-23 14:20 ` [PATCH 12/26] drm/vmwgfx: " Christian König
2021-11-23 14:20 ` [PATCH 13/26] drm/radeon: " Christian König
2021-11-23 14:20 ` [PATCH 14/26] drm/amdgpu: remove excl as shared workarounds Christian König
2021-11-23 14:21 ` [PATCH 15/26] drm/amdgpu: use dma_resv_for_each_fence for CS workaround Christian König
2021-11-23 14:21 ` [PATCH 16/26] dma-buf: finally make dma_resv_excl_fence private Christian König
2021-11-23 14:21 ` [PATCH 17/26] dma-buf: drop the DAG approach for the dma_resv object Christian König
2021-11-23 14:21 ` [PATCH 18/26] dma-buf/drivers: make reserving a shared slot mandatory Christian König
2021-11-23 14:21 ` [PATCH 19/26] drm: support more than one write fence in drm_gem_plane_helper_prepare_fb Christian König
2021-11-25 15:47   ` Daniel Vetter
2021-11-26 10:30     ` Christian König [this message]
2021-11-26 15:37       ` Daniel Vetter
2021-11-23 14:21 ` [PATCH 20/26] drm/nouveau: support more than one write fence in fenv50_wndw_prepare_fb Christian König
2021-11-23 14:21 ` [PATCH 21/26] drm/amdgpu: use dma_resv_get_singleton in amdgpu_pasid_free_cb Christian König
2021-11-23 14:21 ` [PATCH 22/26] dma-buf: add enum dma_resv_usage Christian König
2021-11-25 15:50   ` Daniel Vetter
2021-11-25 15:59   ` Daniel Vetter
2021-11-29 12:19     ` Christian König
2021-11-30  8:31       ` Daniel Vetter
2021-11-23 14:21 ` [PATCH 23/26] dma-buf: specify usage while adding fences to dma_resv obj Christian König
2021-11-23 14:21 ` [PATCH 24/26] dma-buf: wait for map to complete for static attachments Christian König
2021-11-23 14:21 ` [PATCH 25/26] amdgpu: remove DMA-buf fence workaround Christian König
2021-11-23 14:21 ` [PATCH 26/26] drm/ttm: remove bo->moving Christian König
2021-11-24  8:31 ` completely rework the dma_resv semantic Pekka Paalanen
2021-11-24  8:39   ` Christian König
2021-11-25 16:04 ` 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=0a3f93f1-278e-c393-3e79-745a52694f3d@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.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;
as well as URLs for NNTP newsgroup(s).