public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tiago Vignatti <tiago.vignatti@intel.com>
To: Thomas Hellstrom <thomas@shipmail.org>
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 11:09:07 -0300	[thread overview]
Message-ID: <55CCA503.1090600@intel.com> (raw)
In-Reply-To: <55CC7AFC.40302@shipmail.org>

On 08/13/2015 08:09 AM, Thomas Hellstrom wrote:
> Tiago,
>
> I take it, this is intended to be a generic interface used mostly for 2D
> rendering.

yup. "generic" is an important point that I've actually forgot to 
mention in the description, which is probably the whole motivation for 
bringing this up.

We want avoid link any vendor-specific library to the unpriviledged 
process for security reasons, so it's a requirement to it not have 
access to driver-specific ioctls when mapping the buffers. The use-case 
for it is texturing from CPU rendered buffer, like you said, with the 
intention of passing these buffers among processes without performing 
any copy in the user-space ("zero-copy").

> 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.

hmm I'm not sure it is little use. Our hardware (the "LLC" capable) has 
this very specific case where the cache gets dirty wrt the GPU, which is 
when the same buffer is shared with the scanout device. This is not 
something will happen in Chrome OS for example, so we wouldn't need the 
SYNC markers there.

In any case I think that making it mandatory works for us, but I'll have 
to check with Daniel/Chris whether there are performance penalties when 
accessing it and so on.

> 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.

two dimension sync? You're saying that there could be a GPU access API 
in dma-buf as well? I don't get it, what's the use-case? I'm sure I 
missed the discussions because I wasn't particularly interested in this 
whole thingy before :)

Thanks for reviewing, Thomas.

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

  reply	other threads:[~2015-08-13 14: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 ` [PATCH v4] mmap on the dma-buf directly Thomas Hellstrom
2015-08-13 14:09   ` Tiago Vignatti [this message]
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=55CCA503.1090600@intel.com \
    --to=tiago.vignatti@intel.com \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas@shipmail.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