All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	John Stultz <john.stultz@linaro.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	DMA BUFFER SHARING FRAMEWORK <linux-media@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH] drm-buf: Add debug option
Date: Fri, 15 Jan 2021 08:25:46 +0000	[thread overview]
Message-ID: <161069914606.19482.1823329746575120144@build.alporthouse.com> (raw)
In-Reply-To: <YAATPMc+1jmhxnsF@phenom.ffwll.local>

Quoting Daniel Vetter (2021-01-14 09:47:40)
> On Thu, Jan 14, 2021 at 09:45:37AM +0000, Chris Wilson wrote:
> > Quoting Daniel Vetter (2021-01-14 09:30:32)
> > > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > > The only other problem I see with the implementation is that there's
> > > > nothing that says that each dmabuf->ops->map_dma_buf() returns a new
> > > > sg_table, so we may end up undoing the xor. Or should each dma-buf
> > > > return a fresh dma-mapping for iommu isolation?
> > > 
> > > Maybe I screwed it up, but that's why I extracted the little helpers:
> > > We scramble when we get the sgtable from exporter, and unscramble
> > > before we pass it back. dma-buf.c does some caching and will hand back
> > > the same sgtable, but for that case we don't re-scramble.
> > 
> > The attachment is only mapped once, but there can be more than one
> > attachment, and the backend could return the same sg_table for each
> > mapping. Conceivably, it could return its own private sg_table where it
> > wants to maintain the struct page. Seems like just adding a sentence to
> > @map_dma_buf to clarify that each call should return a new sg_table will
> > suffice.
> 
> Ah yes good point, will augment (once CI stops being angry at me).

Fwiw, with a quick explanation of "don't do this" in the docs,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	DMA BUFFER SHARING FRAMEWORK <linux-media@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH] drm-buf: Add debug option
Date: Fri, 15 Jan 2021 08:25:46 +0000	[thread overview]
Message-ID: <161069914606.19482.1823329746575120144@build.alporthouse.com> (raw)
In-Reply-To: <YAATPMc+1jmhxnsF@phenom.ffwll.local>

Quoting Daniel Vetter (2021-01-14 09:47:40)
> On Thu, Jan 14, 2021 at 09:45:37AM +0000, Chris Wilson wrote:
> > Quoting Daniel Vetter (2021-01-14 09:30:32)
> > > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > > The only other problem I see with the implementation is that there's
> > > > nothing that says that each dmabuf->ops->map_dma_buf() returns a new
> > > > sg_table, so we may end up undoing the xor. Or should each dma-buf
> > > > return a fresh dma-mapping for iommu isolation?
> > > 
> > > Maybe I screwed it up, but that's why I extracted the little helpers:
> > > We scramble when we get the sgtable from exporter, and unscramble
> > > before we pass it back. dma-buf.c does some caching and will hand back
> > > the same sgtable, but for that case we don't re-scramble.
> > 
> > The attachment is only mapped once, but there can be more than one
> > attachment, and the backend could return the same sg_table for each
> > mapping. Conceivably, it could return its own private sg_table where it
> > wants to maintain the struct page. Seems like just adding a sentence to
> > @map_dma_buf to clarify that each call should return a new sg_table will
> > suffice.
> 
> Ah yes good point, will augment (once CI stops being angry at me).

Fwiw, with a quick explanation of "don't do this" in the docs,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	John Stultz <john.stultz@linaro.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	DMA BUFFER SHARING FRAMEWORK <linux-media@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH] drm-buf: Add debug option
Date: Fri, 15 Jan 2021 08:25:46 +0000	[thread overview]
Message-ID: <161069914606.19482.1823329746575120144@build.alporthouse.com> (raw)
In-Reply-To: <YAATPMc+1jmhxnsF@phenom.ffwll.local>

Quoting Daniel Vetter (2021-01-14 09:47:40)
> On Thu, Jan 14, 2021 at 09:45:37AM +0000, Chris Wilson wrote:
> > Quoting Daniel Vetter (2021-01-14 09:30:32)
> > > On Thu, Jan 14, 2021 at 10:23 AM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > > > The only other problem I see with the implementation is that there's
> > > > nothing that says that each dmabuf->ops->map_dma_buf() returns a new
> > > > sg_table, so we may end up undoing the xor. Or should each dma-buf
> > > > return a fresh dma-mapping for iommu isolation?
> > > 
> > > Maybe I screwed it up, but that's why I extracted the little helpers:
> > > We scramble when we get the sgtable from exporter, and unscramble
> > > before we pass it back. dma-buf.c does some caching and will hand back
> > > the same sgtable, but for that case we don't re-scramble.
> > 
> > The attachment is only mapped once, but there can be more than one
> > attachment, and the backend could return the same sg_table for each
> > mapping. Conceivably, it could return its own private sg_table where it
> > wants to maintain the struct page. Seems like just adding a sentence to
> > @map_dma_buf to clarify that each call should return a new sg_table will
> > suffice.
> 
> Ah yes good point, will augment (once CI stops being angry at me).

Fwiw, with a quick explanation of "don't do this" in the docs,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-01-15  8:26 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 14:06 [PATCH] drm-buf: Add debug option Daniel Vetter
2021-01-13 14:06 ` [Intel-gfx] " Daniel Vetter
2021-01-13 14:06 ` Daniel Vetter
2021-01-13 15:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-01-13 15:43 ` [Intel-gfx] [PATCH] " Chris Wilson
2021-01-13 15:43   ` Chris Wilson
2021-01-13 20:50   ` Daniel Vetter
2021-01-13 20:50     ` Daniel Vetter
2021-01-13 20:50     ` Daniel Vetter
2021-01-13 21:08     ` Chris Wilson
2021-01-13 21:08       ` Chris Wilson
2021-01-14  9:02       ` Daniel Vetter
2021-01-14  9:02         ` Daniel Vetter
2021-01-14  9:02         ` Daniel Vetter
2021-01-14  9:23         ` Chris Wilson
2021-01-14  9:23           ` Chris Wilson
2021-01-14  9:23           ` Chris Wilson
2021-01-14  9:30           ` Daniel Vetter
2021-01-14  9:30             ` Daniel Vetter
2021-01-14  9:30             ` Daniel Vetter
2021-01-14  9:45             ` Chris Wilson
2021-01-14  9:45               ` Chris Wilson
2021-01-14  9:47               ` Daniel Vetter
2021-01-14  9:47                 ` Daniel Vetter
2021-01-15  8:25                 ` Chris Wilson [this message]
2021-01-15  8:25                   ` Chris Wilson
2021-01-15  8:25                   ` Chris Wilson
2021-01-15 20:08         ` John Stultz
2021-01-15 20:08           ` John Stultz
2021-01-15 20:08           ` John Stultz
2021-01-13 16:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-13 20:25 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-01-14 19:55 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm-buf: Add debug option (rev2) Patchwork
2021-01-14 20:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-15  9:42 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-02-17  3:30 ` [PATCH] drm-buf: Add debug option John Stultz
2021-02-17  3:30   ` [Intel-gfx] " John Stultz
2021-02-17  3:30   ` John Stultz
2021-02-17  3:34   ` John Stultz
2021-02-17  3:34     ` [Intel-gfx] " John Stultz
2021-02-17  3:34     ` John Stultz
2021-01-15 13:02 [Intel-gfx] " Daniel Vetter
2021-01-15 15:36 ` kernel test robot

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=161069914606.19482.1823329746575120144@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=john.stultz@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.