<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/gpu/drm/drm_plane.c, branch v4.12</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>drm: Fix deadlock retry loop in page_flip_ioctl</title>
<updated>2017-05-23T07:39:14+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-05-22T13:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f928543404bdf6bb4e8d6a6c3ced5edebd0d6f38'/>
<id>f928543404bdf6bb4e8d6a6c3ced5edebd0d6f38</id>
<content type='text'>
I failed to properly onion-wrap the unwind code: We acquire the vblank
reference before we start with the wait-wound locking dance, hence we
must make sure we retry before we drop the reference. Oops.

v2: The vblank_put must be after the frambuffer_put (Michel). I suck at
unwrapping code that doesn't use separate labels for each stage, but
checks each pointer first ... While re-reading everything I also
realized that we must clean up the fb refcounts, and specifically
plane-&gt;old_fb before we drop the locks, either in the final unlocking,
or in the w/w retry path. Hence the correct fix is to drop the
vblank_put to the very bottom.

Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Reported-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Cc: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Cc: Michel Dänzer &lt;michel@daenzer.net&gt;
Tested-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170522135945.28831-1-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I failed to properly onion-wrap the unwind code: We acquire the vblank
reference before we start with the wait-wound locking dance, hence we
must make sure we retry before we drop the reference. Oops.

v2: The vblank_put must be after the frambuffer_put (Michel). I suck at
unwrapping code that doesn't use separate labels for each stage, but
checks each pointer first ... While re-reading everything I also
realized that we must clean up the fb refcounts, and specifically
plane-&gt;old_fb before we drop the locks, either in the final unlocking,
or in the w/w retry path. Hence the correct fix is to drop the
vblank_put to the very bottom.

Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Reported-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Cc: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Cc: Michel Dänzer &lt;michel@daenzer.net&gt;
Tested-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170522135945.28831-1-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Only take cursor locks when the cursor plane exists</title>
<updated>2017-04-07T17:28:32+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-04-07T16:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e0641631f233b5af09f0bfeaa6220d10cad75e7'/>
<id>2e0641631f233b5af09f0bfeaa6220d10cad75e7</id>
<content type='text'>
I thought I've fixed this, but maybe not. Anyway, clearly broken, and
easy fix.

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Fixes: b95ff0319a82 ("drm: Remove drm_modeset_(un)lock_crtc")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170407164817.28272-1-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I thought I've fixed this, but maybe not. Anyway, clearly broken, and
easy fix.

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Reported-by: Tony Lindgren &lt;tony@atomide.com&gt;
Fixes: b95ff0319a82 ("drm: Remove drm_modeset_(un)lock_crtc")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Tested-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170407164817.28272-1-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Remove drm_modeset_(un)lock_crtc</title>
<updated>2017-04-05T07:26:07+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-04-03T08:32:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b95ff0319a829d5e707d64a3994c75f012f6b6ec'/>
<id>b95ff0319a829d5e707d64a3994c75f012f6b6ec</id>
<content type='text'>
The last user, the cursor ioctl, can just open-code this too. We
simply have to move the acquire ctx dance from the universal function
up into the top-level ioctl handler.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-3-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last user, the cursor ioctl, can just open-code this too. We
simply have to move the acquire ctx dance from the universal function
up into the top-level ioctl handler.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-3-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Fix locking gotcha in page_flip ioctl</title>
<updated>2017-03-31T00:28:24+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-30T20:48:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9739e7464691456dd7c297b92ef0783fe13f6ba5'/>
<id>9739e7464691456dd7c297b92ef0783fe13f6ba5</id>
<content type='text'>
We want to lock the primary plane, not the cursor (which might be
optional). Real bad case of copy-paste fail, unfortunately our CI
didn't catch that because i915 does have a cursor plane.

Reported-by: Eric Anholt &lt;eric@anholt.net&gt;
Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170330204831.8225-1-daniel.vetter@ffwll.ch
Tested-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to lock the primary plane, not the cursor (which might be
optional). Real bad case of copy-paste fail, unfortunately our CI
didn't catch that because i915 does have a cursor plane.

Reported-by: Eric Anholt &lt;eric@anholt.net&gt;
Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170330204831.8225-1-daniel.vetter@ffwll.ch
Tested-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Clear e after kfree in drm_mode_page_flip_ioctl</title>
<updated>2017-03-30T18:23:51+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-30T13:32:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=031e5896dfdc24839d60f168f6e8560e294674d3'/>
<id>031e5896dfdc24839d60f168f6e8560e294674d3</id>
<content type='text'>
With the explicit retry loop static analyzers get confused by the
control flow and believe that e could be accessed after kfree. That's
not possible, but it's non-obvious, so let's clear it to NULL.

We already cleared e = NULL at the top of the function, so this is all
in line.

Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170330133253.29500-1-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the explicit retry loop static analyzers get confused by the
control flow and believe that e could be accessed after kfree. That's
not possible, but it's non-obvious, so let's clear it to NULL.

We already cleared e = NULL at the top of the function, so this is all
in line.

Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Reported-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl")
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170330133253.29500-1-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/atomic-helper: remove backoff hack from page_flip</title>
<updated>2017-03-29T07:50:52+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T21:50:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b'/>
<id>043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b</id>
<content type='text'>
Yay, we can now properly retry in case of deadlocks or whatever!

Also don't forget to remove the transitional crtc-&gt;acquire_ctx
assignment again.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-13-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Yay, we can now properly retry in case of deadlocks or whatever!

Also don't forget to remove the transitional crtc-&gt;acquire_ctx
assignment again.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-13-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Add acquire ctx parameter to -&gt;page_flip(_target)</title>
<updated>2017-03-29T07:50:38+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T21:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41292b1fa13a894c1108d4a1c7f8a59fbb307aa6'/>
<id>41292b1fa13a894c1108d4a1c7f8a59fbb307aa6</id>
<content type='text'>
Again just going through the motions, no functional changes in here.

Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;t
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-12-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Again just going through the motions, no functional changes in here.

Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;t
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-12-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Roll out acquire context for the page_flip ioctl</title>
<updated>2017-03-29T07:50:07+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T21:50:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29dc0d1de18239cf3ef8bab578b8321ed340d81c'/>
<id>29dc0d1de18239cf3ef8bab578b8321ed340d81c</id>
<content type='text'>
Again just prep work.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-11-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Again just prep work.

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-11-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/atomic-helper: remove backoff hack from disable/update_plane</title>
<updated>2017-03-29T07:15:06+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T21:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d26f96c74dd027caf14713ae736b4d174535412d'/>
<id>d26f96c74dd027caf14713ae736b4d174535412d</id>
<content type='text'>
We can now properly retry at the top level, yay!

v2: Also remove the temporary acquire_ctx hack again, no longer
needed!

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-6-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can now properly retry at the top level, yay!

v2: Also remove the temporary acquire_ctx hack again, no longer
needed!

Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-6-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
<entry>
<title>drm: Add acquire ctx parameter to -&gt;plane_disable</title>
<updated>2017-03-29T07:14:58+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-22T21:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1931529448bca3e0e77fb526baad20935c9cabaf'/>
<id>1931529448bca3e0e77fb526baad20935c9cabaf</id>
<content type='text'>
Nouveau had a few direct calls to -&gt;disable_plane, I replaced those
with drm_plane_force_disable. Same story for shmob.

Otherwise no code changes.

Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-5-daniel.vetter@ffwll.ch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nouveau had a few direct calls to -&gt;disable_plane, I replaced those
with drm_plane_force_disable. Same story for shmob.

Otherwise no code changes.

Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-5-daniel.vetter@ffwll.ch
</pre>
</div>
</content>
</entry>
</feed>
