<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/dma-buf, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-05-31T16:47:05Z</updated>
<entry>
<title>dma-buf: use vma_pages()</title>
<updated>2016-05-31T16:47:05Z</updated>
<author>
<name>Muhammad Falak R Wani</name>
<email>falakreyaz@gmail.com</email>
</author>
<published>2016-05-23T11:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b02da6f8236148009c22167cd7013d5ce04a2d37'/>
<id>urn:sha1:b02da6f8236148009c22167cd7013d5ce04a2d37</id>
<content type='text'>
Replace explicit computation of vma page count by a call to
vma_pages().
Also, include &lt;linux/mm.h&gt;

Signed-off-by: Muhammad Falak R Wani &lt;falakreyaz@gmail.com&gt;
Reviewed-by: Eric Engestrom &lt;eric.engestrom@imgtec.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>reservation: add headerdoc comments</title>
<updated>2016-05-31T16:42:43Z</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2016-03-31T20:26:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dad6c3945fd25384c2b92306a90ba033e1130428'/>
<id>urn:sha1:dad6c3945fd25384c2b92306a90ba033e1130428</id>
<content type='text'>
Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf/sync_file: de-stage sync_file</title>
<updated>2016-04-30T00:37:10Z</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.co.uk</email>
</author>
<published>2016-04-28T13:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62304fb1fc0801925568e191261b650e1546ce8c'/>
<id>urn:sha1:62304fb1fc0801925568e191261b650e1546ce8c</id>
<content type='text'>
sync_file is useful to connect one or more fences to the file. The file is
used by userspace to track fences between drivers that share DMA bufs.

Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: Update docs for SYNC ioctl</title>
<updated>2016-03-21T08:26:45Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-03-21T07:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87e332d56b2c7dc6733f690c9069f4fe75f21c9d'/>
<id>urn:sha1:87e332d56b2c7dc6733f690c9069f4fe75f21c9d</id>
<content type='text'>
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 &lt;chris@chris-wilson.co.uk&gt;
Cc: Tiago Vignatti &lt;tiago.vignatti@intel.com&gt;
Cc: Stéphane Marchesin &lt;marcheu@chromium.org&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
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 &lt;hverkuil@xs4all.nl&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
</content>
</entry>
<entry>
<title>dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()</title>
<updated>2016-03-19T10:03:49Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2016-03-18T20:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18b862dcd57a3e23e34c8cd1e939f68548c1209a'/>
<id>urn:sha1:18b862dcd57a3e23e34c8cd1e939f68548c1209a</id>
<content type='text'>
Drivers, especially i915.ko, can fail during the initial migration of a
dma-buf for CPU access. However, the error code from the driver was not
being propagated back to ioctl and so userspace was blissfully ignorant
of the failure. Rendering corruption ensues.

Whilst fixing the ioctl to return the error code from
dma_buf_start_cpu_access(), also do the same for
dma_buf_end_cpu_access().  For most drivers, dma_buf_end_cpu_access()
cannot fail. i915.ko however, as most drivers would, wants to avoid being
uninterruptible (as would be required to guarrantee no failure when
flushing the buffer to the device). As userspace already has to handle
errors from the SYNC_IOCTL, take advantage of this to be able to restart
the syscall across signals.

This fixes a coherency issue for i915.ko as well as reducing the
uninterruptible hold upon its BKL, the struct_mutex.

Fixes commit c11e391da2a8fe973c3c2398452000bed505851e
Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Date:   Thu Feb 11 20:04:51 2016 -0200

    dma-buf: Add ioctls to allow userspace to flush

Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible
Testcase: igt/prime_mmap_coherency/ioctl-errors
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Tiago Vignatti &lt;tiago.vignatti@intel.com&gt;
Cc: Stéphane Marchesin &lt;marcheu@chromium.org&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
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
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1458331359-2634-1-git-send-email-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: Add ioctls to allow userspace to flush</title>
<updated>2016-02-12T15:01:32Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2016-02-11T22:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c11e391da2a8fe973c3c2398452000bed505851e'/>
<id>urn:sha1:c11e391da2a8fe973c3c2398452000bed505851e</id>
<content type='text'>
The userspace 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
circumvent this problem there are begin/end coherency markers, that forward
directly to existing dma-buf device drivers vfunc hooks. Userspace can make use
of those markers through the DMA_BUF_IOCTL_SYNC ioctl. The sequence would be
used like following:
     - mmap dma-buf fd
     - for each drawing/upload cycle in CPU 1. SYNC_START ioctl, 2. read/write
       to mmap area 3. SYNC_END ioctl. This can be repeated as often as you
       want (with the new data being consumed by the GPU or say scanout device)
     - munmap once you don't need the buffer any more

v2 (Tiago): Fix header file type names (u64 -&gt; __u64)
v3 (Tiago): Add documentation. Use enum dma_buf_sync_flags to the begin/end
dma-buf functions. Check for overflows in start/length.
v4 (Tiago): use 2d regions for sync.
v5 (Tiago): forget about 2d regions (v4); use _IOW in DMA_BUF_IOCTL_SYNC and
remove range information from struct dma_buf_sync.
v6 (Tiago): use __u64 structured padded flags instead enum. Adjust
documentation about the recommendation on using sync ioctls.
v7 (Tiago): Alex' nit on flags definition and being even more wording in the
doc about sync usage.
v9 (Tiago): remove useless is_dma_buf_file check. Fix sync.flags conditionals
and its mask order check. Add &lt;linux/types.h&gt; include in dma-buf.h.

Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Reviewed-by: Stéphane Marchesin &lt;marcheu@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Tiago Vignatti &lt;tiago.vignatti@intel.com&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1455228291-29640-1-git-send-email-tiago.vignatti@intel.com
</content>
</entry>
<entry>
<title>dma-buf: Remove range-based flush</title>
<updated>2016-02-09T08:25:22Z</updated>
<author>
<name>Tiago Vignatti</name>
<email>tiago.vignatti@intel.com</email>
</author>
<published>2015-12-22T21:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=831e9da7dc5c22fd2a5fb64e999f6e077a4338c3'/>
<id>urn:sha1:831e9da7dc5c22fd2a5fb64e999f6e077a4338c3</id>
<content type='text'>
This patch removes range-based information used for optimizations in
begin_cpu_access and end_cpu_access.

We don't have any user nor implementation using range-based flush. It seems a
consensus that if we ever want something like that again (or even more robust
using 2D, 3D sub-range regions) we can use the upcoming dma-buf sync ioctl for
such.

Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Signed-off-by: Tiago Vignatti &lt;tiago.vignatti@intel.com&gt;
Reviewed-by: Stéphane Marchesin &lt;marcheu@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1450820214-12509-3-git-send-email-tiago.vignatti@intel.com
</content>
</entry>
<entry>
<title>dma-buf/fence: add fence_wait_any_timeout function v2</title>
<updated>2015-10-30T05:16:16Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2015-10-20T14:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a519435a96597d8cd96123246fea4ae5a6c90b02'/>
<id>urn:sha1:a519435a96597d8cd96123246fea4ae5a6c90b02</id>
<content type='text'>
Waiting for the first fence in an array of fences to signal.

This is useful for device driver specific resource managers
and also Vulkan needs something similar.

v2: more parameter checks, handling for timeout==0,
    remove NULL entry support, better callback removal.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>dma-buf: Minor coding style fixes</title>
<updated>2015-05-21T05:59:59Z</updated>
<author>
<name>Jagan Teki</name>
<email>jteki@openedev.com</email>
</author>
<published>2015-05-20T19:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5136629dc5a19701746abd7c8ad98ce0b84dda1d'/>
<id>urn:sha1:5136629dc5a19701746abd7c8ad98ce0b84dda1d</id>
<content type='text'>
- WARNING: Missing a blank line after declarations
- WARNING: line over 80 characters
- WARNING: please, no space before tabs

Signed-off-by: Jagan Teki &lt;jteki@openedev.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: add ref counting for module as exporter</title>
<updated>2015-05-13T09:05:57Z</updated>
<author>
<name>Sumit Semwal</name>
<email>sumit.semwal@linaro.org</email>
</author>
<published>2015-05-05T09:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9abdffe286c1532a54d5aee31571d3029be4026c'/>
<id>urn:sha1:9abdffe286c1532a54d5aee31571d3029be4026c</id>
<content type='text'>
Add reference counting on a kernel module that exports dma-buf and
implements its operations. This prevents the module from being unloaded
while DMABUF file is in use.

The original patch [1] was submitted by Tomasz Stanislawski, but this
is a simpler way to do it.

v3: call module_put() as late as possible, per gregkh's comment.
v2: move owner to struct dma_buf, and use DEFINE_DMA_BUF_EXPORT_INFO
    macro to simplify the change.

Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;

[1]: https://lkml.org/lkml/2012/8/8/163
</content>
</entry>
</feed>
