<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/dma-buf, branch v4.19</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.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-07-16T14:50:37Z</updated>
<entry>
<title>dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace</title>
<updated>2018-07-16T14:50:37Z</updated>
<author>
<name>Michel Dänzer</name>
<email>michel.daenzer@amd.com</email>
</author>
<published>2018-07-04T15:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f43ef9f0d98abbc0eb5e697628ec06756bf60a9'/>
<id>urn:sha1:7f43ef9f0d98abbc0eb5e697628ec06756bf60a9</id>
<content type='text'>
Fixes the BUG_ON spuriously triggering under the following
circumstances:

* reservation_object_reserve_shared is called with shared_count ==
  shared_max - 1, so obj-&gt;staged is freed in preparation of an in-place
  update.

* reservation_object_add_shared_fence is called with the first fence,
  after which shared_count == shared_max.

* reservation_object_add_shared_fence is called with a follow-up fence
  from the same context.

In the second reservation_object_add_shared_fence call, the BUG_ON
triggers. However, nothing bad would happen in
reservation_object_add_shared_inplace, since both fences are from the
same context, so they only occupy a single slot.

Prevent this by moving the BUG_ON to where an overflow would actually
happen (e.g. if a buggy caller didn't call
reservation_object_reserve_shared before).

v2:
* Fix description of breaking scenario (Christian König)
* Add bugzilla reference

Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/106418
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt; # v1
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt; # v1
Signed-off-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Signed-off-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180704151405.10357-1-michel@daenzer.net
</content>
</entry>
<entry>
<title>Merge tag 'drm-misc-next-2018-07-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next</title>
<updated>2018-07-06T00:01:56Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2018-07-05T22:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1c3b49523aeb89a7f5ffa852c29db9c4e5ac8dd'/>
<id>urn:sha1:a1c3b49523aeb89a7f5ffa852c29db9c4e5ac8dd</id>
<content type='text'>
drm-misc-next for 4.19:

UAPI Changes:
v3d: add fourcc modicfier for fourcc for the Broadcom UIF format (Eric Anholt)

Cross-subsystem Changes:
console/fbcon: Add support for deferred console takeover (Hans de Goede)

Core Changes:
dma-fence clean up, improvements and docs (Daniel Vetter)
add mask function for crtc, plane, encoder and connector DRM objects(Ville Syrjälä)

Driver Changes:
pl111: add Nomadik LCDC variant (Linus Walleij)

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180704234641.GA3981@juma
</content>
</entry>
<entry>
<title>dma-fence: Polish kernel-doc for dma-fence.c</title>
<updated>2018-07-04T10:18:37Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-07-04T09:29:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4dd3cdb281f7a3200234ed2bcaae79af15f120d2'/>
<id>urn:sha1:4dd3cdb281f7a3200234ed2bcaae79af15f120d2</id>
<content type='text'>
- Intro section that links to how this is exposed to userspace.
- Lots more hyperlinks.
- Minor clarifications and style polish

v2: Add misplaced hunk of kerneldoc from a different patch.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180704092909.6599-6-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>dma-fence: Make -&gt;wait callback optional</title>
<updated>2018-07-03T11:12:57Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-05-03T14:25:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=418cc6ca06071e7b7d75c0d525d80a6f49a763d6'/>
<id>urn:sha1:418cc6ca06071e7b7d75c0d525d80a6f49a763d6</id>
<content type='text'>
Almost everyone uses dma_fence_default_wait.

v2: Also remove the BUG_ON(!ops-&gt;wait) (Chris).

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt; (v1)
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-5-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>locking: Implement an algorithm choice for Wound-Wait mutexes</title>
<updated>2018-07-03T07:44:36Z</updated>
<author>
<name>Thomas Hellstrom</name>
<email>thellstrom@vmware.com</email>
</author>
<published>2018-06-15T08:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08295b3b5beec9aac0f7a9db86f0fc3792039da3'/>
<id>urn:sha1:08295b3b5beec9aac0f7a9db86f0fc3792039da3</id>
<content type='text'>
The current Wound-Wait mutex algorithm is actually not Wound-Wait but
Wait-Die. Implement also Wound-Wait as a per-ww-class choice. Wound-Wait
is, contrary to Wait-Die a preemptive algorithm and is known to generate
fewer backoffs. Testing reveals that this is true if the
number of simultaneous contending transactions is small.
As the number of simultaneous contending threads increases, Wait-Wound
becomes inferior to Wait-Die in terms of elapsed time.
Possibly due to the larger number of held locks of sleeping transactions.

Update documentation and callers.

Timings using git://people.freedesktop.org/~thomash/ww_mutex_test
tag patch-18-06-15

Each thread runs 100000 batches of lock / unlock 800 ww mutexes randomly
chosen out of 100000. Four core Intel x86_64:

Algorithm    #threads       Rollbacks  time
Wound-Wait   4              ~100       ~17s.
Wait-Die     4              ~150000    ~19s.
Wound-Wait   16             ~360000    ~109s.
Wait-Die     16             ~450000    ~82s.

Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-doc@vger.kernel.org
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Co-authored-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Acked-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>dma-fence: Allow wait_any_timeout for all fences</title>
<updated>2018-07-02T08:20:53Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-05-03T14:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=796422f227eef662256dcf74f609abd48cfd1cc9'/>
<id>urn:sha1:796422f227eef662256dcf74f609abd48cfd1cc9</id>
<content type='text'>
When this was introduced in

commit a519435a96597d8cd96123246fea4ae5a6c90b02
Author: Christian König &lt;christian.koenig@amd.com&gt;
Date:   Tue Oct 20 16:34:16 2015 +0200

    dma-buf/fence: add fence_wait_any_timeout function v2

there was a restriction added that this only works if the dma-fence
uses the dma_fence_default_wait hook. Which works for amdgpu, which is
the only caller. Well, until you share some buffers with e.g. i915,
then you get an -EINVAL.

But there's really no reason for this, because all drivers must
support callbacks. The special -&gt;wait hook is only as an optimization;
if the driver needs to create a worker thread for an active callback,
then it can avoid to do that if it knows that there's a process
context available already. So -&gt;wait is just an optimization, just
using the logic in dma_fence_default_wait() should work for all
drivers.

Let's remove this restriction.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180503142603.28513-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>dma-fence: Make -&gt;enable_signaling optional</title>
<updated>2018-07-02T08:16:33Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-05-04T14:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c701317a3eb8c012364a8d468f20eabf6df1ad77'/>
<id>urn:sha1:c701317a3eb8c012364a8d468f20eabf6df1ad77</id>
<content type='text'>
Many drivers have a trivial implementation for -&gt;enable_signaling.
Let's make it optional by assuming that signalling is already
available when the callback isn't present.

v2: Don't do the trick to set the ENABLE_SIGNAL_BIT
unconditionally, it results in an expensive spinlock take for
everyone. Instead just check if the callback is present. Suggested by
Maarten.

Also move misplaced kerneldoc hunk to the right patch.

Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt; (v1)
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Link: https://patchwork.freedesktop.org/patch/msgid/20180504141034.27727-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>dma-buf: remove kmap_atomic interface</title>
<updated>2018-06-20T13:59:34Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2018-05-28T11:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f664a52695429b68afb4e130a0f69cd5fd1fec86'/>
<id>urn:sha1:f664a52695429b68afb4e130a0f69cd5fd1fec86</id>
<content type='text'>
Neither used nor correctly implemented anywhere. Just completely remove
the interface.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/226645/
</content>
</entry>
<entry>
<title>dma_buf: remove device parameter from attach callback v2</title>
<updated>2018-06-20T13:59:34Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2018-05-28T09:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a19741e5e5a9f1f02f8e3c037bde7d73d4bfae9c'/>
<id>urn:sha1:a19741e5e5a9f1f02f8e3c037bde7d73d4bfae9c</id>
<content type='text'>
The device parameter is completely unused because it is available in the
attachment structure as well.

v2: fix kerneldoc as well

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/226643/
</content>
</entry>
<entry>
<title>dma-buf: make map_atomic and map function pointers optional</title>
<updated>2018-06-01T06:59:35Z</updated>
<author>
<name>Gerd Hoffmann</name>
<email>kraxel@redhat.com</email>
</author>
<published>2018-05-29T13:59:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09ea0dfbf972c63dfea8cf46f2fb67f39e4d833b'/>
<id>urn:sha1:09ea0dfbf972c63dfea8cf46f2fb67f39e4d833b</id>
<content type='text'>
So drivers don't need dummy functions just returning NULL.

Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Oleksandr Andrushchenko &lt;oleksandr_andrushchenko@epam.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20180529135918.19729-1-kraxel@redhat.com
</content>
</entry>
</feed>
