<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/dma-buf, branch v5.4</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=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-10-10T15:05:20Z</updated>
<entry>
<title>dma-buf/resv: fix exclusive fence get</title>
<updated>2019-10-10T15:05:20Z</updated>
<author>
<name>Qiang Yu</name>
<email>yuq825@gmail.com</email>
</author>
<published>2019-09-22T07:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3d79a83ca10d2026fd1cce096cde2d8e316592e'/>
<id>urn:sha1:c3d79a83ca10d2026fd1cce096cde2d8e316592e</id>
<content type='text'>
This causes kernel crash when testing lima driver.

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Fixes: b8c036dfc66f ("dma-buf: simplify reservation_object_get_fences_rcu a bit")
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190922074900.853-1-yuq825@gmail.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>dmabuf: Mark up onstack timer for selftests</title>
<updated>2019-08-20T12:49:15Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-20T12:21:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ac3a0ebfcc2f0c75ca0ca6974389ce421aa5cbd'/>
<id>urn:sha1:6ac3a0ebfcc2f0c75ca0ca6974389ce421aa5cbd</id>
<content type='text'>
The dma-fence selftest uses an on-stack timer that requires explicit
annotation for debugobjects.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111442
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190820122118.13698-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: Use %zu for printing sizeof</title>
<updated>2019-08-20T09:13:42Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-19T19:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea4e537ae149b468963bf500cfb0a99f8df4b3e7'/>
<id>urn:sha1:ea4e537ae149b468963bf500cfb0a99f8df4b3e7</id>
<content type='text'>
Use the %zu format specifier for a size_t returned by sizeof.

Reported-by: kbuild-all@01.org
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190819195740.27608-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: Add selftests for dma-fence</title>
<updated>2019-08-19T17:09:46Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-19T09:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2989f6451084aed3f8cc9992477f7a9bf57a3716'/>
<id>urn:sha1:2989f6451084aed3f8cc9992477f7a9bf57a3716</id>
<content type='text'>
Exercise the dma-fence API exported to drivers.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190819095928.32091-2-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: Introduce selftesting framework</title>
<updated>2019-08-19T17:01:34Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-19T09:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9536b64ac0d6e3151963a11441dde7ade045fb29'/>
<id>urn:sha1:9536b64ac0d6e3151963a11441dde7ade045fb29</id>
<content type='text'>
In light of recent review slip ups, the absence of a suite of tests for
dma-buf became apparent. Given the current plethora of testing
frameworks, opt for one already in use by Intel's CI and so allow easy
hook up into igt.

We introduce a new module that when loaded will execute the list of
selftests and their subtest. The names of the selftests are put into the
modinfo as parameters so that igt can identify each, and run them
independently, principally for ease of error reporting.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Tomi Sarvela &lt;tomi.p.sarvela@intel.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190819095928.32091-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-fence: Store the timestamp in the same union as the cb_list</title>
<updated>2019-08-17T17:46:33Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-17T15:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2cb60e9a3881e679465f84140754bc9d29956ea'/>
<id>urn:sha1:f2cb60e9a3881e679465f84140754bc9d29956ea</id>
<content type='text'>
The timestamp and the cb_list are mutually exclusive, the cb_list can
only be added to prior to being signaled (and once signaled we drain),
while the timestamp is only valid upon being signaled. Both the
timestamp and the cb_list are only valid while the fence is alive, and
as soon as no references are held can be replaced by the rcu_head.

By reusing the union for the timestamp, we squeeze the base dma_fence
struct to 64 bytes on x86-64.

v2: Sort the union chronologically

Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;.
Link: https://patchwork.freedesktop.org/patch/msgid/20190817153022.5749-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-fence: Simply wrap dma_fence_signal_locked with dma_fence_signal</title>
<updated>2019-08-17T17:03:12Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-17T15:23:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0fc89b6802ba1fcc561b0c906e0cefd384e3b2e5'/>
<id>urn:sha1:0fc89b6802ba1fcc561b0c906e0cefd384e3b2e5</id>
<content type='text'>
Currently dma_fence_signal() tries to avoid the spinlock and only takes
it if absolutely required to walk the callback list. However, to allow
for some users to surreptitiously insert lazy signal callbacks that
do not depend on enabling the signaling mechanism around every fence,
we always need to notify the callbacks on signaling. As such, we will
always need to take the spinlock and dma_fence_signal() effectively
becomes a clone of dma_fence_signal_locked().

v2: Update the test_and_set_bit() before entering the spinlock.
v3: Drop the test_[and_set]_bit() before the spinlock, it's a caller
error so expected to be very unlikely.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190817152300.5370-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-fence: Avoid list_del during fence-&gt;cb_list iteration</title>
<updated>2019-08-17T17:03:00Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-17T14:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f86a802bf3a7c28e4c4ea032fa2e61398dbccd5d'/>
<id>urn:sha1:f86a802bf3a7c28e4c4ea032fa2e61398dbccd5d</id>
<content type='text'>
Before we notify the fence signal callback, we remove the cb from the
list. However, since we are processing the entire list from underneath
the spinlock, we do not need to individual delete each element, but can
simply reset the link and the entire list.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190817144736.7826-4-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: Restore seqlock around dma_resv updates</title>
<updated>2019-08-16T11:40:58Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-08-14T18:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b016cd6ed4b772759804e0d6082bd1f5ca63b8ee'/>
<id>urn:sha1:b016cd6ed4b772759804e0d6082bd1f5ca63b8ee</id>
<content type='text'>
This reverts
67c97fb79a7f ("dma-buf: add reservation_object_fences helper")
dd7a7d1ff2f1 ("drm/i915: use new reservation_object_fences helper")
0e1d8083bddb ("dma-buf: further relax reservation_object_add_shared_fence")
5d344f58da76 ("dma-buf: nuke reservation_object seq number")

The scenario that defeats simply grabbing a set of shared/exclusive
fences and using them blissfully under RCU is that any of those fences
may be reallocated by a SLAB_TYPESAFE_BY_RCU fence slab cache. In this
scenario, while keeping the rcu_read_lock we need to establish that no
fence was changed in the dma_resv after a read (or full) memory barrier.

Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190814182401.25009-1-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>dma-buf: rename reservation_object to dma_resv</title>
<updated>2019-08-13T07:09:30Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2019-08-11T08:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52791eeec1d9f4a7e7fe08aaba0b1553149d93bc'/>
<id>urn:sha1:52791eeec1d9f4a7e7fe08aaba0b1553149d93bc</id>
<content type='text'>
Be more consistent with the naming of the other DMA-buf objects.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/323401/
</content>
</entry>
</feed>
