All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org,
	sumit.semwal@linaro.org
Subject: [PATCH 1/7] dma-buf: add some more kerneldoc to dma_resv_add_shared_fence
Date: Wed, 16 Jun 2021 10:26:49 +0200	[thread overview]
Message-ID: <20210616082655.111001-2-christian.koenig@amd.com> (raw)
In-Reply-To: <20210616082655.111001-1-christian.koenig@amd.com>

Explicitly document that code can't assume that shared fences
signal after the exclusive fence.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/dma-buf/dma-resv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
index f26c71747d43..4ab02b6c387a 100644
--- a/drivers/dma-buf/dma-resv.c
+++ b/drivers/dma-buf/dma-resv.c
@@ -235,7 +235,10 @@ EXPORT_SYMBOL(dma_resv_reset_shared_max);
  * @fence: the shared fence to add
  *
  * Add a fence to a shared slot, obj->lock must be held, and
- * dma_resv_reserve_shared() has been called.
+ * dma_resv_reserve_shared() has been called. The shared fences can signal in
+ * any order and there is especially no guarantee that shared fences signal
+ * after the exclusive one. Code relying on any signaling order is broken and
+ * needs to be fixed.
  */
 void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence)
 {
-- 
2.25.1


  reply	other threads:[~2021-06-16  8:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  8:26 Fixing problems around shared fences and RCU in DMA-buf Christian König
2021-06-16  8:26 ` Christian König [this message]
2021-06-17 19:26   ` [PATCH 1/7] dma-buf: add some more kerneldoc to dma_resv_add_shared_fence Daniel Vetter
2021-06-17 19:26     ` Daniel Vetter
2021-06-16  8:26 ` [PATCH 2/7] dma-buf: fix and rework dma_buf_poll v2 Christian König
2021-06-16  8:26 ` [PATCH 3/7] dma-buf: fix dma_resv_test_signaled test_all handling v2 Christian König
2021-06-16  8:26 ` [PATCH 4/7] drm/nouveau: always wait for the exclusive fence Christian König
2021-06-16  8:26 ` [PATCH 5/7] drm/msm: " Christian König
2021-06-16  8:26 ` [PATCH 6/7] drm/amdgpu: drop workaround for adding page table clears as shared fence Christian König
2021-06-16  8:26 ` [PATCH 7/7] drm/amdgpu: drop CS workaround adding the shared manually Christian König

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=20210616082655.111001-2-christian.koenig@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.