Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] mmap on the dma-buf directly
@ 2015-08-11 20:59 Tiago Vignatti
  2015-08-11 20:59 ` [PATCH 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd Tiago Vignatti
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Tiago Vignatti @ 2015-08-11 20:59 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.vetter, intel-gfx, daniel.thompson

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.

To validate all this I'm using igt, and sending the tests for review now.
Please take a look.

Tiago


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()

 drivers/dma-buf/dma-buf.c              | 47 ++++++++++++++++++++++++++++++++++
 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           | 39 ++++++++++++++++++++++++++++
 5 files changed, 117 insertions(+), 8 deletions(-)
 create mode 100644 include/uapi/linux/dma-buf.h

-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH v4] mmap on the dma-buf directly
@ 2015-08-12 23:29 Tiago Vignatti
  2015-08-12 23:29 ` [PATCH 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd Tiago Vignatti
  0 siblings, 1 reply; 14+ messages in thread
From: Tiago Vignatti @ 2015-08-12 23:29 UTC (permalink / raw)
  To: dri-devel; +Cc: daniel.thompson, daniel.vetter, intel-gfx

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


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

-- 
2.1.0

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-12 23:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 20:59 [PATCH v3] mmap on the dma-buf directly Tiago Vignatti
2015-08-11 20:59 ` [PATCH 1/4] drm: prime: Honour O_RDWR during prime-handle-to-fd Tiago Vignatti
2015-08-11 20:59 ` [PATCH 2/4] dma-buf: Add ioctls to allow userspace to flush Tiago Vignatti
2015-08-12 14:20   ` Sumit Semwal
2015-08-11 20:59 ` [PATCH 3/4] drm/i915: Implement end_cpu_access Tiago Vignatti
2015-08-11 20:59 ` [PATCH 4/4] drm/i915: Use CPU mapping for userspace dma-buf mmap() Tiago Vignatti
2015-08-11 22:20   ` Chris Wilson
2015-08-12 13:28     ` Daniel Vetter
2015-08-11 20:59 ` [PATCH i-g-t 1/5] prime_mmap: Add new test for calling mmap() on dma-buf fds Tiago Vignatti
2015-08-11 20:59 ` [PATCH i-g-t 2/5] prime_mmap: Fix a few misc stuff Tiago Vignatti
2015-08-11 20:59 ` [PATCH i-g-t 3/5] prime_mmap: Add basic tests to write in a bo using CPU Tiago Vignatti
2015-08-11 20:59 ` [PATCH i-g-t 4/5] tests: Add kms_mmap_write_crc for cache coherency tests Tiago Vignatti
2015-08-11 20:59 ` [PATCH i-g-t 5/5] tests/kms_mmap_write_crc: Demonstrate the need for end_cpu_access Tiago Vignatti
  -- strict thread matches above, loose matches on Subject: below --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox