<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/dma-buf.h, branch v4.6-rc7</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.6-rc7</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.6-rc7'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2016-03-19T10:03:49Z</updated>
<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.kobert.dev/pm24.git/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: 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.kobert.dev/pm24.git/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: 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.kobert.dev/pm24.git/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>
<entry>
<title>dma-buf: cleanup dma_buf_export() to make it easily extensible</title>
<updated>2015-04-21T09:17:16Z</updated>
<author>
<name>Sumit Semwal</name>
<email>sumit.semwal@linaro.org</email>
</author>
<published>2015-01-23T07:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d8fbe341beb617ebb22b98fb893e4aa32ae2d864'/>
<id>urn:sha1:d8fbe341beb617ebb22b98fb893e4aa32ae2d864</id>
<content type='text'>
At present, dma_buf_export() takes a series of parameters, which
makes it difficult to add any new parameters for exporters, if required.

Make it simpler by moving all these parameters into a struct, and pass
the struct * as parameter to dma_buf_export().

While at it, unite dma_buf_export_named() with dma_buf_export(), and
change all callers accordingly.

Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
Reviewed-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Acked-by: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: add poll support, v3</title>
<updated>2014-07-08T20:36:52Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@canonical.com</email>
</author>
<published>2014-07-01T10:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9b495a5887994a6d74d5c261d012083a92b94738'/>
<id>urn:sha1:9b495a5887994a6d74d5c261d012083a92b94738</id>
<content type='text'>
Thanks to Fengguang Wu for spotting a missing static cast.

v2:
- Kill unused variable need_shared.
v3:
- Clarify the BUG() in dma_buf_release some more. (Rob Clark)

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: use reservation objects</title>
<updated>2014-07-08T20:03:20Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@canonical.com</email>
</author>
<published>2014-07-01T10:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3aac4502fd3f80dcf7e65dbf6edd8676893c1f46'/>
<id>urn:sha1:3aac4502fd3f80dcf7e65dbf6edd8676893c1f46</id>
<content type='text'>
This allows reservation objects to be used in dma-buf. it's required
for implementing polling support on the fences that belong to a dma-buf.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@canonical.com&gt;
Acked-by: Mauro Carvalho Chehab &lt;m.chehab@samsung.com&gt; #drivers/media/v4l2-core/
Acked-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt; #drivers/gpu/drm/ttm
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Vincent Stehlé &lt;vincent.stehle@laposte.net&gt; #drivers/gpu/drm/armada/
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: update debugfs output</title>
<updated>2014-02-13T04:38:52Z</updated>
<author>
<name>Sumit Semwal</name>
<email>sumit.semwal@linaro.org</email>
</author>
<published>2014-02-03T09:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=c0b00a525c127d0055c1df6283300e17f601a1a1'/>
<id>urn:sha1:c0b00a525c127d0055c1df6283300e17f601a1a1</id>
<content type='text'>
Russell King observed 'wierd' looking output from debugfs, and also suggested
better ways of getting device names (use KBUILD_MODNAME, dev_name())

This patch addresses these issues to make the debugfs output correct and better
looking.

While at it, replace seq_printf with seq_puts to remove the checkpatch.pl
warnings.

Reported-by: Russell King - ARM Linux &lt;linux@arm.linux.org.uk&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: Add debugfs support</title>
<updated>2013-05-01T11:06:22Z</updated>
<author>
<name>Sumit Semwal</name>
<email>sumit.semwal@linaro.org</email>
</author>
<published>2013-04-04T06:14:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b89e35636bc75b72d15a1af6d49798802aff77d5'/>
<id>urn:sha1:b89e35636bc75b72d15a1af6d49798802aff77d5</id>
<content type='text'>
Add debugfs support to make it easier to print debug information
about the dma-buf buffers.

Cc: Dave Airlie &lt;airlied@redhat.com&gt;
 [minor fixes on init and warning fix]
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
 [remove double unlock in fail case]
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: replace dma_buf_export() with dma_buf_export_named()</title>
<updated>2013-05-01T11:05:36Z</updated>
<author>
<name>Sumit Semwal</name>
<email>sumit.semwal@linaro.org</email>
</author>
<published>2013-03-22T12:52:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=78df969550e7187f4dcd70b737217dcbc8e9a06a'/>
<id>urn:sha1:78df969550e7187f4dcd70b737217dcbc8e9a06a</id>
<content type='text'>
For debugging purposes, it is useful to have a name-string added
while exporting buffers. Hence, dma_buf_export() is replaced with
dma_buf_export_named(), which additionally takes 'exp_name' as a
parameter.

For backward compatibility, and for lazy exporters who don't wish to
name themselves, a #define dma_buf_export() is also made available,
which adds a __FILE__ instead of 'exp_name'.

Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
  [Thanks for the idea!]
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
<entry>
<title>dma-buf: implement vmap refcounting in the interface logic</title>
<updated>2013-02-27T09:43:36Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2012-12-20T13:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f00b4dad9d9eb001a04cf72e8351a2a1b9e99322'/>
<id>urn:sha1:f00b4dad9d9eb001a04cf72e8351a2a1b9e99322</id>
<content type='text'>
All drivers which implement this need to have some sort of refcount to
allow concurrent vmap usage. Hence implement this in the dma-buf core.

To protect against concurrent calls we need a lock, which potentially
causes new funny locking inversions. But this shouldn't be a problem
for exporters with statically allocated backing storage, and more
dynamic drivers have decent issues already anyway.

Inspired by some refactoring patches from Aaron Plattner, who
implemented the same idea, but only for drm/prime drivers.

v2: Check in dma_buf_release that no dangling vmaps are left.
Suggested by Aaron Plattner. We might want to do similar checks for
attachments, but that's for another patch. Also fix up ERR_PTR return
for vmap.

v3: Check whether the passed-in vmap address matches with the cached
one for vunmap. Eventually we might want to remove that parameter -
compared to the kmap functions there's no need for the vaddr for
unmapping.  Suggested by Chris Wilson.

v4: Fix a brown-paper-bag bug spotted by Aaron Plattner.

Cc: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Reviewed-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Tested-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Reviewed-by: Rob Clark &lt;rob@ti.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
</content>
</entry>
</feed>
