intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Tiago Vignatti <tiago.vignatti@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: devel@driverdev.osuosl.org, "Hans Verkuil" <hverkuil@xs4all.nl>,
	intel-gfx@lists.freedesktop.org,
	"David Herrmann" <dh.herrmann@gmail.com>,
	"Chris Wilson" <chris@chris-wilson.co.uk>,
	linaro-mm-sig@lists.linaro.org,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: Update docs for SYNC ioctl
Date: Mon, 21 Mar 2016 10:16:22 -0300	[thread overview]
Message-ID: <56EFF426.80907@intel.com> (raw)
In-Reply-To: <1458546705-3564-1-git-send-email-daniel.vetter@ffwll.ch>

On 03/21/2016 04:51 AM, Daniel Vetter wrote:
> Just a bit of wording polish plus mentioning that it can fail and must
> be restarted.
>
> Requested by Sumit.
>
> v2: Fix them typos (Hans).
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tiago Vignatti <tiago.vignatti@intel.com>
> Cc: Stéphane Marchesin <marcheu@chromium.org>
> Cc: David Herrmann <dh.herrmann@gmail.com>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> CC: linux-media@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linaro-mm-sig@lists.linaro.org
> Cc: intel-gfx@lists.freedesktop.org
> Cc: devel@driverdev.osuosl.org
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Tiago Vignatti <tiago.vignatti@intel.com>

Best regards,

Tiago


> ---
>   Documentation/dma-buf-sharing.txt | 11 ++++++-----
>   drivers/dma-buf/dma-buf.c         |  2 +-
>   2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
> index 32ac32e773e1..ca44c5820585 100644
> --- a/Documentation/dma-buf-sharing.txt
> +++ b/Documentation/dma-buf-sharing.txt
> @@ -352,7 +352,8 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases:
>
>      No special interfaces, userspace simply calls mmap on the dma-buf fd, making
>      sure that the cache synchronization ioctl (DMA_BUF_IOCTL_SYNC) is *always*
> -   used when the access happens. This is discussed next paragraphs.
> +   used when the access happens. Note that DMA_BUF_IOCTL_SYNC can fail with
> +   -EAGAIN or -EINTR, in which case it must be restarted.
>
>      Some systems might need some sort of cache coherency management e.g. when
>      CPU and GPU domains are being accessed through dma-buf at the same time. To
> @@ -366,10 +367,10 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases:
>          want (with the new data being consumed by the GPU or say scanout device)
>        - munmap once you don't need the buffer any more
>
> -    Therefore, for correctness and optimal performance, systems with the memory
> -    cache shared by the GPU and CPU i.e. the "coherent" and also the
> -    "incoherent" are always required to use SYNC_START and SYNC_END before and
> -    after, respectively, when accessing the mapped address.
> +    For correctness and optimal performance, it is always required to use
> +    SYNC_START and SYNC_END before and after, respectively, when accessing the
> +    mapped address. Userspace cannot rely on coherent access, even when there
> +    are systems where it just works without calling these ioctls.
>
>   2. Supporting existing mmap interfaces in importers
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 774a60f4309a..4a2c07ee6677 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -612,7 +612,7 @@ EXPORT_SYMBOL_GPL(dma_buf_begin_cpu_access);
>    * @dmabuf:	[in]	buffer to complete cpu access for.
>    * @direction:	[in]	length of range for cpu access.
>    *
> - * This call must always succeed.
> + * Can return negative error values, returns 0 on success.
>    */
>   int dma_buf_end_cpu_access(struct dma_buf *dmabuf,
>   			   enum dma_data_direction direction)
>

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2016-03-21 13:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 20:02 [PATCH] dma-buf,drm,ion: Propagate error code from dma_buf_start_cpu_access() Chris Wilson
2016-03-19 10:09 ` [PATCH] dma-buf, drm, ion: " Daniel Vetter
2016-03-21  6:13   ` Sumit Semwal
2016-03-21  7:30     ` [PATCH] dma-buf: Update docs for SYNC ioctl Daniel Vetter
2016-03-21  7:35       ` Sumit Semwal
2016-03-21  7:40       ` Hans Verkuil
2016-03-21  7:50         ` Daniel Vetter
2016-03-21  7:51     ` Daniel Vetter
2016-03-21  7:53       ` Hans Verkuil
2016-03-21 12:26       ` David Herrmann
2016-03-21 17:14         ` Daniel Vetter
2016-03-23 11:30           ` David Herrmann
2016-03-23 11:56             ` Chris Wilson
2016-03-23 15:32               ` David Herrmann
2016-03-23 15:42                 ` Chris Wilson
2016-03-28 19:42                   ` Tiago Vignatti
2016-03-29  9:47                     ` David Herrmann
2016-03-29 17:20                       ` Tiago Vignatti
2016-03-21 13:16       ` Tiago Vignatti [this message]
2016-03-21 13:13 ` [PATCH] dma-buf,drm,ion: Propagate error code from dma_buf_start_cpu_access() Tiago Vignatti

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=56EFF426.80907@intel.com \
    --to=tiago.vignatti@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marcheu@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).