<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/drm_atomic.c, branch v4.7</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.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-24T01:10:36Z</updated>
<entry>
<title>drm/atomic: Make drm_atomic_legacy_backoff reset crtc-&gt;acquire_ctx</title>
<updated>2016-06-24T01:10:36Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2016-06-23T11:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81e257e964268d050f8e9188becd44d50f241d72'/>
<id>urn:sha1:81e257e964268d050f8e9188becd44d50f241d72</id>
<content type='text'>
Atomic updates may acquire more state than initially locked through
drm_modeset_lock_crtc, running with heavy stress can cause a
WARN_ON(crtc-&gt;acquire_ctx) in drm_modeset_lock_crtc:

[  601.491296] ------------[ cut here ]------------
[  601.491366] WARNING: CPU: 0 PID: 2411 at
drivers/gpu/drm/drm_modeset_lock.c:191 drm_modeset_lock_crtc+0xeb/0xf0 [drm]
[  601.491369] Modules linked in: drm i915 drm_kms_helper
[  601.491414] CPU: 0 PID: 2411 Comm: kms_cursor_lega Tainted: G     U 4.7.0-rc4-patser+ #4798
[  601.491417] Hardware name: Intel Corporation Skylake Client
[  601.491420]  0000000000000000 ffff88044d153c98 ffffffff812ead28 0000000000000000
[  601.491425]  0000000000000000 ffff88044d153cd8 ffffffff810868e6 000000bf58058030
[  601.491431]  ffff880088b415e8 ffff880458058030 ffff88008a271548 ffff88008a271568
[  601.491436] Call Trace:
[  601.491443]  [&lt;ffffffff812ead28&gt;] dump_stack+0x4d/0x65
[  601.491447]  [&lt;ffffffff810868e6&gt;] __warn+0xc6/0xe0
[  601.491452]  [&lt;ffffffff81086968&gt;] warn_slowpath_null+0x18/0x20
[  601.491472]  [&lt;ffffffffc00d4ffb&gt;] drm_modeset_lock_crtc+0xeb/0xf0 [drm]
[  601.491491]  [&lt;ffffffffc00c5526&gt;] drm_mode_cursor_common+0x66/0x180 [drm]
[  601.491509]  [&lt;ffffffffc00c91cc&gt;] drm_mode_cursor_ioctl+0x3c/0x40 [drm]
[  601.491524]  [&lt;ffffffffc00bc94d&gt;] drm_ioctl+0x14d/0x530 [drm]
[  601.491540]  [&lt;ffffffffc00c9190&gt;] ? drm_mode_setcrtc+0x520/0x520 [drm]
[  601.491545]  [&lt;ffffffff81176aeb&gt;] ? handle_mm_fault+0x106b/0x1430
[  601.491550]  [&lt;ffffffff81108441&gt;] ? stop_one_cpu+0x61/0x70
[  601.491556]  [&lt;ffffffff811bb71d&gt;] do_vfs_ioctl+0x8d/0x570
[  601.491560]  [&lt;ffffffff81290d7e&gt;] ? security_file_ioctl+0x3e/0x60
[  601.491565]  [&lt;ffffffff811bbc74&gt;] SyS_ioctl+0x74/0x80
[  601.491571]  [&lt;ffffffff810e321c&gt;] ? posix_get_monotonic_raw+0xc/0x10
[  601.491576]  [&lt;ffffffff8175b11b&gt;] entry_SYSCALL_64_fastpath+0x13/0x8f
[  601.491581] ---[ end trace 56f3d3d85f000d00 ]---

For good measure, test mode_config.acquire_ctx too, although this should
never happen.

Testcase: kms_cursor_legacy
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: make drm_atomic_set_mode_prop_for_crtc() more reliable</title>
<updated>2016-06-01T04:59:47Z</updated>
<author>
<name>Tomi Valkeinen</name>
<email>tomi.valkeinen@ti.com</email>
</author>
<published>2016-05-31T12:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6709887c448d1cff51b52d09763c7b834ea5f0be'/>
<id>urn:sha1:6709887c448d1cff51b52d09763c7b834ea5f0be</id>
<content type='text'>
drm_atomic_set_mode_prop_for_crtc() does not clear the state-&gt;mode, so
old data may be left there when a new mode is set, possibly causing odd
issues.

This patch improves the situation by always clearing the state-&gt;mode
first.

Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Avoid connector reference imbalance on error path</title>
<updated>2016-05-18T08:42:01Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2016-05-06T11:47:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2d800a3ce1b16a9c25fc6ca91f26df5509ca11d'/>
<id>urn:sha1:e2d800a3ce1b16a9c25fc6ca91f26df5509ca11d</id>
<content type='text'>
Whilst looking at the fallout from using connector references for
atomic, I noticed that there is an early return buried in
drm_atomic_set_crtc_for_connector() that if hit could cause us to leak a
reference on the connector.

Fixes: d2307dea14 (drm/atomic: use connector references (v3))
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Cc: Daniel Stone &lt;daniels@collabora.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1462535265-13058-1-git-send-email-chris@chris-wilson.co.uk
</content>
</entry>
<entry>
<title>drm/atomic: use connector references (v3)</title>
<updated>2016-05-05T02:52:05Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2016-04-27T01:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2307dea14a4f14a4b5db01b6d40a30fa6117e6c'/>
<id>urn:sha1:d2307dea14a4f14a4b5db01b6d40a30fa6117e6c</id>
<content type='text'>
Take a reference when setting a crtc on a connecter,
also take one when duplicating if a crtc is set,
and drop one on destroy if a crtc is set.

v2: take Daniel Stone's advice and simplify the
ref/unref dances, also take care of NULL as connector
to state reset.

v3: remove need for connector NULL check.

Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/modes: add connector reference counting. (v2)</title>
<updated>2016-05-05T02:51:53Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2016-04-27T01:10:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b164d31f50b2923a7a92c2a40cb46973a6ba8c36'/>
<id>urn:sha1:b164d31f50b2923a7a92c2a40cb46973a6ba8c36</id>
<content type='text'>
This uses the previous changes to add reference counts
to drm connector objects.

v2: move fbdev changes to their own patch.
add some kerneldoc

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/atomic: Add WARN_ON when state-&gt;acquire_ctx is not set.</title>
<updated>2016-05-03T12:35:45Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2016-05-03T09:12:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f4eaa89fb20d9fd178d2f9db5aa2df5af358dcd'/>
<id>urn:sha1:7f4eaa89fb20d9fd178d2f9db5aa2df5af358dcd</id>
<content type='text'>
When I was writing an atomic wrapper for rmfb, I ran into the
following backtrace from lockdep:

=============================================
[ INFO: possible recursive locking detected ]
4.5.0-patser+ #4696 Tainted: G     U
---------------------------------------------
kworker/2:2/2608 is trying to acquire lock:
 (crtc_ww_class_mutex){+.+.+.}, at: [&lt;ffffffffc00c9ddc&gt;] drm_modeset_lock+0x7c/0x120 [drm]

but task is already holding lock:
 (crtc_ww_class_mutex){+.+.+.}, at: [&lt;ffffffffc00c98cd&gt;] modeset_backoff+0x8d/0x220 [drm]

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(crtc_ww_class_mutex);
  lock(crtc_ww_class_mutex);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

4 locks held by kworker/2:2/2608:
 #0:  ("events"){.+.+.+}, at: [&lt;ffffffff810a5eea&gt;] process_one_work+0x15a/0x6c0
 #1:  ((&amp;arg.work)){+.+.+.}, at: [&lt;ffffffff810a5eea&gt;] process_one_work+0x15a/0x6c0
 #2:  (crtc_ww_class_acquire){+.+.+.}, at: [&lt;ffffffffc004532a&gt;] drm_atomic_helper_remove_fb+0x4a/0x1d0 [drm_kms_helper]
 #3:  (crtc_ww_class_mutex){+.+.+.}, at: [&lt;ffffffffc00c98cd&gt;] modeset_backoff+0x8d/0x220 [drm]

While lockdep probably catches this bug when it happens, it's better
to explicitly warn when state-&gt;acquire_ctx is not set.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1462266751-29123-1-git-send-email-maarten.lankhorst@linux.intel.com
</content>
</entry>
<entry>
<title>drm/atomic: Rename drm_atomic_async_commit to nonblocking.</title>
<updated>2016-05-02T14:36:03Z</updated>
<author>
<name>Maarten Lankhorst</name>
<email>maarten.lankhorst@linux.intel.com</email>
</author>
<published>2016-04-26T14:11:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b837ba0ad95bb5c08626a49321f07f271bdaf512'/>
<id>urn:sha1:b837ba0ad95bb5c08626a49321f07f271bdaf512</id>
<content type='text'>
Another step in renaming async to nonblocking for atomic commit.

Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1461679905-30177-3-git-send-email-maarten.lankhorst@linux.intel.com
</content>
</entry>
<entry>
<title>drm/atomic: Add missing drm_crtc_internal.h include</title>
<updated>2016-04-28T14:36:30Z</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2016-04-28T13:19:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be35f94f5c83bfed9ded918162c9b622743ef520'/>
<id>urn:sha1:be35f94f5c83bfed9ded918162c9b622743ef520</id>
<content type='text'>
Some of the functions implemented are flagged as not having a prototype
defined when building with W=1. Include the header to avoid these build
warnings.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1461849596-12819-1-git-send-email-thierry.reding@gmail.com
</content>
</entry>
<entry>
<title>Merge tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel into drm-next</title>
<updated>2016-03-23T22:41:59Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2016-03-23T22:41:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17efca93c8728445522dedafc033b3384a26a39d'/>
<id>urn:sha1:17efca93c8728445522dedafc033b3384a26a39d</id>
<content type='text'>
Bunch of small fixupes all over. Plus a dma-buf patch that Sumit asked me
to cherry-pick since that's the only one he had in his tree.

There's a sparse issue outstanding in the color mgr stuff, but Lionel is
still working on something that actually appeases sparse.

* tag 'topic/drm-misc-2016-03-22' of git://anongit.freedesktop.org/drm-intel:
  dma-buf/fence: fix fence_is_later v2
  dma-buf: Update docs for SYNC ioctl
  drm: remove excess description
  dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()
  drm/atmel-hlcdc: use helper to get crtc state
  drm/atomic: use helper to get crtc state
</content>
</entry>
<entry>
<title>drm: remove excess description</title>
<updated>2016-03-20T11:18:20Z</updated>
<author>
<name>Luis de Bethencourt</name>
<email>luisbg@osg.samsung.com</email>
</author>
<published>2016-03-19T17:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c66f4aa7f3cb6579dfe977c05fcb5db25b41cd7'/>
<id>urn:sha1:3c66f4aa7f3cb6579dfe977c05fcb5db25b41cd7</id>
<content type='text'>
Description of expected_size doesn't match any parameter of the function
drm_atomic_replace_property_blob. Removing it.

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/1458408156-15990-1-git-send-email-luisbg@osg.samsung.com
</content>
</entry>
</feed>
