<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/dma-buf, branch v4.14-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly v2</title>
<updated>2017-08-14T17:01:25+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-08-10T17:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b88fa004e8a349eba38a3df7a3ace9dd1730b6e0'/>
<id>b88fa004e8a349eba38a3df7a3ace9dd1730b6e0</id>
<content type='text'>
With hardware resets in mind it is possible that all shared fences are
signaled, but the exlusive isn't. Fix waiting for everything in this situation.

v2: make sure we always wait for the exclusive fence

Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502384509-10465-3-git-send-email-alexander.deucher@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With hardware resets in mind it is possible that all shared fences are
signaled, but the exlusive isn't. Fix waiting for everything in this situation.

v2: make sure we always wait for the exclusive fence

Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Reviewed-by: Chunming Zhou &lt;david1.zhou@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502384509-10465-3-git-send-email-alexander.deucher@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf: add reservation_object_copy_fences (v2)</title>
<updated>2017-08-14T17:00:49+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-08-10T17:01:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7faf952a3030d304334fe527be339b63e9e2745f'/>
<id>7faf952a3030d304334fe527be339b63e9e2745f</id>
<content type='text'>
Allows us to copy all the fences in a reservation object to another one.

v2: handle NULL src_list

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502384509-10465-2-git-send-email-alexander.deucher@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows us to copy all the fences in a reservation object to another one.

v2: handle NULL src_list

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502384509-10465-2-git-send-email-alexander.deucher@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf: dma_fence_put is NULL safe</title>
<updated>2017-08-09T19:01:32+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2017-08-07T21:32:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3e31b73a54229a39db29345347b8f96d6cd312e'/>
<id>f3e31b73a54229a39db29345347b8f96d6cd312e</id>
<content type='text'>
No need to check.

Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502141543-13455-2-git-send-email-alexander.deucher@amd.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need to check.

Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1502141543-13455-2-git-send-email-alexander.deucher@amd.com
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf/sw_sync: clean up list before signaling the fence</title>
<updated>2017-07-31T17:11:15+00:00</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.com</email>
</author>
<published>2017-07-29T15:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3792b7c1a70815fe4e954221c096f9278638fd21'/>
<id>3792b7c1a70815fe4e954221c096f9278638fd21</id>
<content type='text'>
If userspace already dropped its own reference by closing the sw_sync
fence fd we might end up in a deadlock where
dma_fence_is_signaled_locked() will trigger the release of the fence and
thus try to hold the lock to remove the fence from the list.

dma_fence_is_signaled_locked() tries to release/free the fence and hold
the lock in the process.

We fix that by changing the order operation and clean up the list and
rb-tree first.

v2: Drop fence get/put dance and manipulate the list first (Chris Wilson)

Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170729152217.8362-2-gustavo@padovan.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If userspace already dropped its own reference by closing the sw_sync
fence fd we might end up in a deadlock where
dma_fence_is_signaled_locked() will trigger the release of the fence and
thus try to hold the lock to remove the fence from the list.

dma_fence_is_signaled_locked() tries to release/free the fence and hold
the lock in the process.

We fix that by changing the order operation and clean up the list and
rb-tree first.

v2: Drop fence get/put dance and manipulate the list first (Chris Wilson)

Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170729152217.8362-2-gustavo@padovan.org
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf/sw_sync: move timeline_fence_ops around</title>
<updated>2017-07-31T17:10:33+00:00</updated>
<author>
<name>Gustavo Padovan</name>
<email>gustavo.padovan@collabora.com</email>
</author>
<published>2017-07-29T15:22:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=150b6a9d7d6fffb95c0a5349960a10569e8218b5'/>
<id>150b6a9d7d6fffb95c0a5349960a10569e8218b5</id>
<content type='text'>
We are going to use timeline_fence_signaled() in a internal function in
the next commit.

Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170729152217.8362-1-gustavo@padovan.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We are going to use timeline_fence_signaled() in a internal function in
the next commit.

Cc: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170729152217.8362-1-gustavo@padovan.org
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf/sync_file: Allow multiple sync_files to wrap a single dma-fence</title>
<updated>2017-07-29T14:10:52+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-07-28T21:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=db1fc97ca0c0d3fdeeadf314d99a26188438940a'/>
<id>db1fc97ca0c0d3fdeeadf314d99a26188438940a</id>
<content type='text'>
Up until recently sync_file were create to export a single dma-fence to
userspace, and so we could canabalise a bit insie dma-fence to mark
whether or not we had enable polling for the sync_file itself. However,
with the advent of syncobj, we do allow userspace to create multiple
sync_files for a single dma-fence. (Similarly, that the sw-sync
validation framework also started returning multiple sync-files wrapping
a single dma-fence for a syncpt also triggering the problem.)

This patch reverts my suggestion in commit e24165537312
("dma-buf/sync_file: only enable fence signalling on poll()") to use a
single bit in the shared dma-fence and restores the sync_file-&gt;flags for
tracking the bits individually.

Reported-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Fixes: f1e8c67123cf ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline")
Fixes: e9083420bbac ("drm: introduce sync objects (v4)")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;drm-intel-fixes@lists.freedesktop.org&gt; # v4.13-rc1+
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Up until recently sync_file were create to export a single dma-fence to
userspace, and so we could canabalise a bit insie dma-fence to mark
whether or not we had enable polling for the sync_file itself. However,
with the advent of syncobj, we do allow userspace to create multiple
sync_files for a single dma-fence. (Similarly, that the sw-sync
validation framework also started returning multiple sync-files wrapping
a single dma-fence for a syncpt also triggering the problem.)

This patch reverts my suggestion in commit e24165537312
("dma-buf/sync_file: only enable fence signalling on poll()") to use a
single bit in the shared dma-fence and restores the sync_file-&gt;flags for
tracking the bits individually.

Reported-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Fixes: f1e8c67123cf ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline")
Fixes: e9083420bbac ("drm: introduce sync objects (v4)")
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: &lt;drm-intel-fixes@lists.freedesktop.org&gt; # v4.13-rc1+
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk
</pre>
</div>
</content>
</entry>
<entry>
<title>Backmerge tag 'v4.13-rc2' into drm-next</title>
<updated>2017-07-26T22:15:43+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2017-07-26T22:15:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0eb2c0ae578ba00f97c7541e01abbce022d14909'/>
<id>0eb2c0ae578ba00f97c7541e01abbce022d14909</id>
<content type='text'>
Linux 4.13-rc2

This is required for drm-misc fixing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux 4.13-rc2

This is required for drm-misc fixing.
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-fence: Don't BUG_ON when not absolutely needed</title>
<updated>2017-07-26T11:45:07+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-07-20T12:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ce31263c9758c85e7d326cdc65c31fc521dc63d'/>
<id>6ce31263c9758c85e7d326cdc65c31fc521dc63d</id>
<content type='text'>
It makes debugging a massive pain.

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
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170720125107.26693-1-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It makes debugging a massive pain.

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
Reviewed-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Acked-by: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Acked-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170720125107.26693-1-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'drm-misc-next-fixes' into drm-misc-fixes</title>
<updated>2017-07-17T15:56:07+00:00</updated>
<author>
<name>Sean Paul</name>
<email>seanpaul@chromium.org</email>
</author>
<published>2017-07-17T15:43:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ef434a0c2ce765ad33026375db7d23aebd5e9532'/>
<id>ef434a0c2ce765ad33026375db7d23aebd5e9532</id>
<content type='text'>
Pick up

1ed134e6526b drm/vc4: Fix VBLANK handling in crtc-&gt;enable() path

From drm-misc-next-fixes, it was applied after the last pull request
was sent from that branch. We'll send it through drm-fixes instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pick up

1ed134e6526b drm/vc4: Fix VBLANK handling in crtc-&gt;enable() path

From drm-misc-next-fixes, it was applied after the last pull request
was sent from that branch. We'll send it through drm-fixes instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>dma-buf/fence: Avoid use of uninitialised timestamp</title>
<updated>2017-07-14T19:09:55+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2017-02-14T12:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=76250f2b743b72cb685cc51ac0cdabb32957180b'/>
<id>76250f2b743b72cb685cc51ac0cdabb32957180b</id>
<content type='text'>
[  236.821534] WARNING: kmemcheck: Caught 64-bit read from uninitialized memory (ffff8802538683d0)
[  236.828642] 420000001e7f0000000000000000000000080000000000000000000000000000
[  236.839543]  i i i i u u u u i i i i i i i i u u u u u u u u u u u u u u u u
[  236.850420]                                  ^
[  236.854123] RIP: 0010:[&lt;ffffffff81396f07&gt;]  [&lt;ffffffff81396f07&gt;] fence_signal+0x17/0xd0
[  236.861313] RSP: 0018:ffff88024acd7ba0  EFLAGS: 00010282
[  236.865027] RAX: ffffffff812f6a90 RBX: ffff8802527ca800 RCX: ffff880252cb30e0
[  236.868801] RDX: ffff88024ac5d918 RSI: ffff880252f780e0 RDI: ffff880253868380
[  236.872579] RBP: ffff88024acd7bc0 R08: ffff88024acd7be0 R09: 0000000000000000
[  236.876407] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880253868380
[  236.880185] R13: ffff8802538684d0 R14: ffff880253868380 R15: ffff88024cd48e00
[  236.883983] FS:  00007f1646d1a740(0000) GS:ffff88025d000000(0000) knlGS:0000000000000000
[  236.890959] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  236.894702] CR2: ffff880251360318 CR3: 000000024ad21000 CR4: 00000000001406f0
[  236.898481]  [&lt;ffffffff8130d1ad&gt;] i915_gem_request_retire+0x1cd/0x230
[  236.902439]  [&lt;ffffffff8130e2b3&gt;] i915_gem_request_alloc+0xa3/0x2f0
[  236.906435]  [&lt;ffffffff812fb1bd&gt;] i915_gem_do_execbuffer.isra.41+0xb6d/0x18b0
[  236.910434]  [&lt;ffffffff812fc265&gt;] i915_gem_execbuffer2+0x95/0x1e0
[  236.914390]  [&lt;ffffffff812ad625&gt;] drm_ioctl+0x1e5/0x460
[  236.918275]  [&lt;ffffffff8110d4cf&gt;] do_vfs_ioctl+0x8f/0x5c0
[  236.922168]  [&lt;ffffffff8110da3c&gt;] SyS_ioctl+0x3c/0x70
[  236.926090]  [&lt;ffffffff814b7a5f&gt;] entry_SYSCALL_64_fastpath+0x17/0x93
[  236.930045]  [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

We only set the timestamp before we mark the fence as signaled. It is
done before to avoid observers having a window in which they may see the
fence as complete but no timestamp. Having it does incur a potential for
the timestamp to be written twice, and even for it to be corrupted if
the u64 write is not atomic. Instead use a new bit to record the
presence of the timestamp, and teach the readers to wait until it is set
if the fence is complete. There still remains a race where the timestamp
for the signaled fence may be shown before the fence is reported as
signaled, but that's a pre-existing error.

Signed-off-by: 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: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reported-by: Rafael Antognolli &lt;rafael.antognolli@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170214124001.1930-1-chris@chris-wilson.co.uk
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[  236.821534] WARNING: kmemcheck: Caught 64-bit read from uninitialized memory (ffff8802538683d0)
[  236.828642] 420000001e7f0000000000000000000000080000000000000000000000000000
[  236.839543]  i i i i u u u u i i i i i i i i u u u u u u u u u u u u u u u u
[  236.850420]                                  ^
[  236.854123] RIP: 0010:[&lt;ffffffff81396f07&gt;]  [&lt;ffffffff81396f07&gt;] fence_signal+0x17/0xd0
[  236.861313] RSP: 0018:ffff88024acd7ba0  EFLAGS: 00010282
[  236.865027] RAX: ffffffff812f6a90 RBX: ffff8802527ca800 RCX: ffff880252cb30e0
[  236.868801] RDX: ffff88024ac5d918 RSI: ffff880252f780e0 RDI: ffff880253868380
[  236.872579] RBP: ffff88024acd7bc0 R08: ffff88024acd7be0 R09: 0000000000000000
[  236.876407] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880253868380
[  236.880185] R13: ffff8802538684d0 R14: ffff880253868380 R15: ffff88024cd48e00
[  236.883983] FS:  00007f1646d1a740(0000) GS:ffff88025d000000(0000) knlGS:0000000000000000
[  236.890959] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  236.894702] CR2: ffff880251360318 CR3: 000000024ad21000 CR4: 00000000001406f0
[  236.898481]  [&lt;ffffffff8130d1ad&gt;] i915_gem_request_retire+0x1cd/0x230
[  236.902439]  [&lt;ffffffff8130e2b3&gt;] i915_gem_request_alloc+0xa3/0x2f0
[  236.906435]  [&lt;ffffffff812fb1bd&gt;] i915_gem_do_execbuffer.isra.41+0xb6d/0x18b0
[  236.910434]  [&lt;ffffffff812fc265&gt;] i915_gem_execbuffer2+0x95/0x1e0
[  236.914390]  [&lt;ffffffff812ad625&gt;] drm_ioctl+0x1e5/0x460
[  236.918275]  [&lt;ffffffff8110d4cf&gt;] do_vfs_ioctl+0x8f/0x5c0
[  236.922168]  [&lt;ffffffff8110da3c&gt;] SyS_ioctl+0x3c/0x70
[  236.926090]  [&lt;ffffffff814b7a5f&gt;] entry_SYSCALL_64_fastpath+0x17/0x93
[  236.930045]  [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

We only set the timestamp before we mark the fence as signaled. It is
done before to avoid observers having a window in which they may see the
fence as complete but no timestamp. Having it does incur a potential for
the timestamp to be written twice, and even for it to be corrupted if
the u64 write is not atomic. Instead use a new bit to record the
presence of the timestamp, and teach the readers to wait until it is set
if the fence is complete. There still remains a race where the timestamp
for the signaled fence may be shown before the fence is reported as
signaled, but that's a pre-existing error.

Signed-off-by: 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: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reported-by: Rafael Antognolli &lt;rafael.antognolli@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170214124001.1930-1-chris@chris-wilson.co.uk
</pre>
</div>
</content>
</entry>
</feed>
