public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Tiago Vignatti <tiago.vignatti@intel.com>
Cc: daniel.vetter@ffwll.ch, daniel.thompson@linaro.org,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4] mmap on the dma-buf directly
Date: Thu, 13 Aug 2015 13:09:48 +0200	[thread overview]
Message-ID: <55CC7AFC.40302@shipmail.org> (raw)
In-Reply-To: <1439422160-20148-1-git-send-email-tiago.vignatti@intel.com>

On 08/13/2015 01:29 AM, Tiago Vignatti wrote:
> Hi,
>
> The idea is to create a GEM bo in one process and pass the prime handle of the
> it to another process, which in turn uses the handle only to map and write.
> This could be useful for Chrome OS architecture, where the Web content
> ("unpriviledged process") maps and CPU-draws a buffer, which was previously
> allocated in the GPU process ("priviledged process").
>
> In v2, I've added a patch that Daniel kindly drafted to allow the
> unpriviledged process flush through a prime fd. In v3, I've fixed a few
> concerns and then added end_cpu_access to i915. In v4, I fixed Sumit Semwal's
> concerns about dma-duf documentation and the FIXME missing in that same patch,
> and also removed WARN in i915 dma-buf mmap (pointed by Chris). PTAL.
>
> Best Regards,
>
> Tiago
Tiago,

I take it, this is intended to be a generic interface used mostly for 2D
rendering.

In that case, using SYNC is crucial for performance of incoherent
architectures and I'd rather see it mandatory than an option. It could
perhaps be made mandatory preferrably using an error or a one-time
kernel warning. If nobody uses the SYNC interface, it is of little use.

Also I think the syncing needs to be extended to two dimensions. A long
time ago when this was brought up people argued why we should limit it
to two dimensions, but I believe two dimensions addresses most
performance-problematic use-cases. A default implementation of
twodimensional sync can easily be made using the one-dimensional API.

Thanks,
Thomas






>
>
> Daniel Thompson (1):
>   drm: prime: Honour O_RDWR during prime-handle-to-fd
>
> Daniel Vetter (1):
>   dma-buf: Add ioctls to allow userspace to flush
>
> Tiago Vignatti (2):
>   drm/i915: Implement end_cpu_access
>   drm/i915: Use CPU mapping for userspace dma-buf mmap()
>
>  Documentation/dma-buf-sharing.txt      | 12 ++++++++
>  drivers/dma-buf/dma-buf.c              | 50 ++++++++++++++++++++++++++++++++++
>  drivers/gpu/drm/drm_prime.c            | 10 ++-----
>  drivers/gpu/drm/i915/i915_gem_dmabuf.c | 28 ++++++++++++++++++-
>  include/uapi/drm/drm.h                 |  1 +
>  include/uapi/linux/dma-buf.h           | 43 +++++++++++++++++++++++++++++
>  6 files changed, 136 insertions(+), 8 deletions(-)
>  create mode 100644 include/uapi/linux/dma-buf.h
>


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-08-13 11:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 23:29 [PATCH v4] mmap on the dma-buf directly Tiago Vignatti
2015-08-12 23:29 ` [PATCH 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd Tiago Vignatti
2015-08-12 23:29 ` [PATCH 2/4] dma-buf: Add ioctls to allow userspace to flush Tiago Vignatti
2015-08-12 23:29 ` [PATCH 3/4] drm/i915: Implement end_cpu_access Tiago Vignatti
2015-08-23 12:14   ` Chris Wilson
2015-08-12 23:29 ` [PATCH 4/4] drm/i915: Use CPU mapping for userspace dma-buf mmap() Tiago Vignatti
2015-08-23 12:21   ` Chris Wilson
2015-08-12 23:29 ` [PATCH 1/7] prime_mmap: Add new test for calling mmap() on dma-buf fds Tiago Vignatti
2015-08-13  7:04   ` Daniel Vetter
2015-08-14 22:17     ` Tiago Vignatti
2015-08-25  7:46       ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 2/7] prime_mmap: Fix a few misc stuff Tiago Vignatti
2015-08-12 23:29 ` [PATCH 3/7] prime_mmap: Add basic tests to write in a bo using CPU Tiago Vignatti
2015-08-13  7:01   ` Daniel Vetter
2015-08-13 14:26     ` Tiago Vignatti
2015-08-13 14:48       ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 4/7] lib: Add gem_userptr helpers Tiago Vignatti
2015-08-23 12:10   ` Chris Wilson
2015-08-25  7:47     ` Daniel Vetter
2015-08-12 23:29 ` [PATCH 5/7] prime_mmap: Test for userptr mmap Tiago Vignatti
2015-08-23 12:17   ` Chris Wilson
2015-08-12 23:29 ` [PATCH 6/7] tests: Add kms_mmap_write_crc for cache coherency tests Tiago Vignatti
2015-08-12 23:29 ` [PATCH 7/7] tests/kms_mmap_write_crc: Demonstrate the need for end_cpu_access Tiago Vignatti
2015-08-13 11:09 ` Thomas Hellstrom [this message]
2015-08-13 14:09   ` [PATCH v4] mmap on the dma-buf directly Tiago Vignatti
2015-08-13 14:51     ` 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=55CC7AFC.40302@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tiago.vignatti@intel.com \
    /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