<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm, branch v4.19.77</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.77'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-10-05T11:10:13+00:00</updated>
<entry>
<title>drm/amd/display: Restore backlight brightness after system resume</title>
<updated>2019-10-05T11:10:13+00:00</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2019-09-02T08:33:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c60da90ec4467adec602e1b81b3ca256f581031'/>
<id>urn:sha1:2c60da90ec4467adec602e1b81b3ca256f581031</id>
<content type='text'>
commit bb264220d9316f6bd7c1fd84b8da398c93912931 upstream.

Laptops with AMD APU doesn't restore display backlight brightness after
system resume.

This issue started when DC was introduced.

Let's use BL_CORE_SUSPENDRESUME so the backlight core calls
update_status callback after system resume to restore the backlight
level.

Tested on Dell Inspiron 3180 (Stoney Ridge) and Dell Latitude 5495
(Raven Ridge).

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)</title>
<updated>2019-10-05T11:09:58+00:00</updated>
<author>
<name>Ahzo</name>
<email>Ahzo@tutanota.com</email>
</author>
<published>2019-08-05T19:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d47636913bda8255652805eb29b9638e6d9311c1'/>
<id>urn:sha1:d47636913bda8255652805eb29b9638e6d9311c1</id>
<content type='text'>
[ Upstream commit f659bb6dae58c113805f92822e4c16ddd3156b79 ]

This fixes screen corruption/flickering on 75 Hz displays.

v2: make print statement debug only (Alex)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102646
Reviewed-by: Evan Quan &lt;evan.quan@amd.com&gt;
Signed-off-by: Ahzo &lt;Ahzo@tutanota.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling</title>
<updated>2019-10-01T06:26:12+00:00</updated>
<author>
<name>Ilia Mirkin</name>
<email>imirkin@alum.mit.edu</email>
</author>
<published>2019-05-25T22:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91ae87240166eee37fb9e3648a4ff8815e9cb3e0'/>
<id>urn:sha1:91ae87240166eee37fb9e3648a4ff8815e9cb3e0</id>
<content type='text'>
[ Upstream commit 533f4752407543f488a9118d817b8c504352b6fb ]

Previously center scaling would get scaling applied to it (when it was
only supposed to center the image), and aspect-corrected scaling did not
always correctly pick whether to reduce width or height for a particular
combination of inputs/outputs.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110660
Signed-off-by: Ilia Mirkin &lt;imirkin@alum.mit.edu&gt;
Signed-off-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: Flush output polling on shutdown</title>
<updated>2019-10-01T06:26:11+00:00</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-06-03T13:58:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff0fbfacc94f94afae61fd06f44a0d5ac199008c'/>
<id>urn:sha1:ff0fbfacc94f94afae61fd06f44a0d5ac199008c</id>
<content type='text'>
[ Upstream commit 3b295cb1a411d9c82bbfaa66bc17a8508716ed07 ]

We need to mark the output polling as disabled to prevent concurrent
irqs from queuing new work as shutdown the probe -- causing that work to
execute after we have freed the structs:

&lt;4&gt; [341.846490] DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock))
&lt;4&gt; [341.846497] WARNING: CPU: 3 PID: 3300 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x49/0x50
&lt;4&gt; [341.846508] Modules linked in: i915(-) vgem thunderbolt snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm mcs7830 btusb usbnet btrtl mii btbcm btintel bluetooth ecdh_generic ecc mei_me mei prime_numbers i2c_hid pinctrl_sunrisepoint pinctrl_intel [last unloaded: i915]
&lt;4&gt; [341.846546] CPU: 3 PID: 3300 Comm: i915_module_loa Tainted: G     U            5.2.0-rc2-CI-CI_DRM_6175+ #1
&lt;4&gt; [341.846553] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018
&lt;4&gt; [341.846560] RIP: 0010:mutex_destroy+0x49/0x50
&lt;4&gt; [341.846565] Code: 00 00 5b c3 e8 a8 9f 3b 00 85 c0 74 ed 8b 05 3e 55 23 01 85 c0 75 e3 48 c7 c6 00 d0 08 82 48 c7 c7 a8 aa 07 82 e8 e7 08 fa ff &lt;0f&gt; 0b eb cc 0f 1f 00 48 b8 11 11 11 11 11 11 11 11 48 89 76 20 48
&lt;4&gt; [341.846578] RSP: 0018:ffffc900006cfdb0 EFLAGS: 00010286
&lt;4&gt; [341.846583] RAX: 0000000000000000 RBX: ffff88826759a168 RCX: 0000000000000000
&lt;4&gt; [341.846589] RDX: 0000000000000002 RSI: 0000000000000000 RDI: ffffffff8112844c
&lt;4&gt; [341.846595] RBP: ffff8882708fa548 R08: 0000000000000000 R09: 0000000000039600
&lt;4&gt; [341.846601] R10: 0000000000000000 R11: 0000000000000ce4 R12: ffffffffa07de1e0
&lt;4&gt; [341.846607] R13: 0000000000000000 R14: 0000000000000000 R15: ffffffffa07de2d0
&lt;4&gt; [341.846613] FS:  00007f62b5ae0e40(0000) GS:ffff888276380000(0000) knlGS:0000000000000000
&lt;4&gt; [341.846620] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&lt;4&gt; [341.846626] CR2: 000055a4e064f4a0 CR3: 0000000266b16006 CR4: 00000000003606e0
&lt;4&gt; [341.846632] Call Trace:
&lt;4&gt; [341.846639]  drm_fb_helper_fini.part.17+0xb3/0x100
&lt;4&gt; [341.846682]  intel_fbdev_fini+0x20/0x80 [i915]
&lt;4&gt; [341.846722]  intel_modeset_cleanup+0x9a/0x140 [i915]
&lt;4&gt; [341.846750]  i915_driver_unload+0xa3/0x100 [i915]
&lt;4&gt; [341.846778]  i915_pci_remove+0x19/0x30 [i915]
&lt;4&gt; [341.846784]  pci_device_remove+0x36/0xb0
&lt;4&gt; [341.846790]  device_release_driver_internal+0xd3/0x1b0
&lt;4&gt; [341.846795]  driver_detach+0x3f/0x80
&lt;4&gt; [341.846800]  bus_remove_driver+0x53/0xd0
&lt;4&gt; [341.846805]  pci_unregister_driver+0x25/0xa0
&lt;4&gt; [341.846843]  i915_exit+0x16/0x1c [i915]
&lt;4&gt; [341.846849]  __se_sys_delete_module+0x162/0x210
&lt;4&gt; [341.846855]  ? trace_hardirqs_off_thunk+0x1a/0x1c
&lt;4&gt; [341.846859]  ? do_syscall_64+0xd/0x1c0
&lt;4&gt; [341.846864]  do_syscall_64+0x55/0x1c0
&lt;4&gt; [341.846869]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
&lt;4&gt; [341.846875] RIP: 0033:0x7f62b51871b7
&lt;4&gt; [341.846881] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 &lt;48&gt; 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48
&lt;4&gt; [341.846897] RSP: 002b:00007ffe7a227138 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
&lt;4&gt; [341.846904] RAX: ffffffffffffffda RBX: 00007ffe7a2272b0 RCX: 00007f62b51871b7
&lt;4&gt; [341.846910] RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000557cd6b55948
&lt;4&gt; [341.846916] RBP: 0000557cd6b558e0 R08: 0000557cd6b5594c R09: 00007ffe7a227160
&lt;4&gt; [341.846922] R10: 00007ffe7a226134 R11: 0000000000000206 R12: 0000000000000000
&lt;4&gt; [341.846927] R13: 00007ffe7a227820 R14: 0000000000000000 R15: 0000000000000000
&lt;4&gt; [341.846936] irq event stamp: 3547847
&lt;4&gt; [341.846940] hardirqs last  enabled at (3547847): [&lt;ffffffff819aad2c&gt;] _raw_spin_unlock_irqrestore+0x4c/0x60
&lt;4&gt; [341.846949] hardirqs last disabled at (3547846): [&lt;ffffffff819aab9d&gt;] _raw_spin_lock_irqsave+0xd/0x50
&lt;4&gt; [341.846957] softirqs last  enabled at (3547376): [&lt;ffffffff81c0033a&gt;] __do_softirq+0x33a/0x4b9
&lt;4&gt; [341.846966] softirqs last disabled at (3547367): [&lt;ffffffff810b6379&gt;] irq_exit+0xa9/0xc0
&lt;4&gt; [341.846973] WARNING: CPU: 3 PID: 3300 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x49/0x50
&lt;4&gt; [341.846980] ---[ end trace ba94ca8952ba970e ]---
&lt;7&gt; [341.866547] [drm:intel_dp_detect [i915]] MST support? port A: no, sink: no, modparam: yes
&lt;7&gt; [341.890480] [drm:drm_add_display_info] non_desktop set to 0
&lt;7&gt; [341.890530] [drm:drm_add_edid_modes] ELD: no CEA Extension found
&lt;7&gt; [341.890537] [drm:drm_add_display_info] non_desktop set to 0
&lt;7&gt; [341.890578] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:86:eDP-1] probed modes :
&lt;7&gt; [341.890589] [drm:drm_mode_debug_printmodeline] Modeline "3200x1800": 60 373250 3200 3248 3280 3360 1800 1803 1808 1852 0x48 0xa
&lt;7&gt; [341.890602] [drm:drm_mode_debug_printmodeline] Modeline "3200x1800": 48 298600 3200 3248 3280 3360 1800 1803 1808 1852 0x40 0xa
&lt;4&gt; [341.890628] general protection fault: 0000 [#1] PREEMPT SMP PTI
&lt;4&gt; [341.890636] CPU: 0 PID: 508 Comm: kworker/0:4 Tainted: G     U  W         5.2.0-rc2-CI-CI_DRM_6175+ #1
&lt;4&gt; [341.890646] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018
&lt;4&gt; [341.890655] Workqueue: events output_poll_execute
&lt;4&gt; [341.890663] RIP: 0010:drm_setup_crtcs+0x13e/0xbe0
&lt;4&gt; [341.890669] Code: 00 41 8b 44 24 58 85 c0 0f 8e f9 01 00 00 44 8b 6c 24 20 44 8b 74 24 28 31 db 31 ed 49 8b 44 24 60 48 63 d5 44 89 ee 83 c5 01 &lt;48&gt; 8b 04 d0 44 89 f2 48 8b 38 48 8b 87 88 01 00 00 48 8b 40 20 e8
&lt;4&gt; [341.890686] RSP: 0018:ffffc9000033fd40 EFLAGS: 00010202
&lt;4&gt; [341.890692] RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000000
&lt;4&gt; [341.890700] RDX: 0000000000000001 RSI: 0000000000000c80 RDI: 00000000ffffffff
&lt;4&gt; [341.890707] RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000
&lt;4&gt; [341.890715] R10: 0000000000000c80 R11: 0000000000000000 R12: ffff888267599fe8
&lt;4&gt; [341.890722] R13: 0000000000000c80 R14: 0000000000000708 R15: 0000000000000007
&lt;4&gt; [341.890730] FS:  0000000000000000(0000) GS:ffff888276200000(0000) knlGS:0000000000000000
&lt;4&gt; [341.890739] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&lt;4&gt; [341.890745] CR2: 000055a4e064f4a0 CR3: 000000026d234003 CR4: 00000000003606f0
&lt;4&gt; [341.890752] Call Trace:
&lt;4&gt; [341.890760]  drm_fb_helper_hotplug_event.part.24+0x89/0xb0
&lt;4&gt; [341.890768]  drm_kms_helper_hotplug_event+0x21/0x30
&lt;4&gt; [341.890774]  output_poll_execute+0x9d/0x1a0
&lt;4&gt; [341.890782]  process_one_work+0x245/0x610
&lt;4&gt; [341.890790]  worker_thread+0x37/0x380
&lt;4&gt; [341.890796]  ? process_one_work+0x610/0x610
&lt;4&gt; [341.890802]  kthread+0x119/0x130
&lt;4&gt; [341.890808]  ? kthread_park+0x80/0x80
&lt;4&gt; [341.890815]  ret_from_fork+0x3a/0x50

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109964
Signed-off-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Reviewed-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190603135910.15979-2-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"</title>
<updated>2019-10-01T06:26:08+00:00</updated>
<author>
<name>Shirish S</name>
<email>shirish.s@amd.com</email>
</author>
<published>2018-11-16T06:50:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a935d78e54ccc026ae9c4f900002f35e7ecb8ed5'/>
<id>urn:sha1:a935d78e54ccc026ae9c4f900002f35e7ecb8ed5</id>
<content type='text'>
[ Upstream commit 00fedbe629bfc0a51c07b6e665265ce31d8b6f3c ]

This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8.

Reason for revert:
This patch sends  msg PPSMC_MSG_DisableLowMemoryPstate(0x002e)
in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008).
This leads to SMU failing to service the request as it is
dependent on UVD to be powered ON, since it accesses UVD
registers.

This msg should ideally be sent only when the UVD is about to decode
a 4k video.

Signed-off-by: Shirish S &lt;shirish.s@amd.com&gt;
Signed-off-by: suresh guttula &lt;suresh.guttula@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines</title>
<updated>2019-10-01T06:26:00+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>ndesaulniers@google.com</email>
</author>
<published>2019-07-22T22:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=70ec2eecc550e4ca189cd0ab6bdd6a65bb343988'/>
<id>urn:sha1:70ec2eecc550e4ca189cd0ab6bdd6a65bb343988</id>
<content type='text'>
[ Upstream commit 0f0727d971f6fdf8f1077180d495ddb9928f0c8b ]

arch/x86/Makefile disables SSE and SSE2 for the whole kernel.  The
AMDGPU drivers modified in this patch re-enable SSE but not SSE2.  Turn
on SSE2 to support emitting double precision floating point instructions
rather than calls to non-existent (usually available from gcc_s or
compiler_rt) floating point helper routines for Clang.

This was originally landed in:
commit 10117450735c ("drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines")
but reverted in:
commit 193392ed9f69 ("Revert "drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines"")
due to bugreports from GCC builds. Add guards to only do so for Clang.

Link: https://bugs.freedesktop.org/show_bug.cgi?id=109487
Link: https://github.com/ClangBuiltLinux/linux/issues/327

Suggested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Suggested-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Signed-off-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto</title>
<updated>2019-09-19T07:09:39+00:00</updated>
<author>
<name>Nishka Dasgupta</name>
<email>nishkadg.linux@gmail.com</email>
</author>
<published>2019-07-06T13:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a03ed2891cdbe0a975647d5dabd923c1beaba9f7'/>
<id>urn:sha1:a03ed2891cdbe0a975647d5dabd923c1beaba9f7</id>
<content type='text'>
commit 165d42c012be69900f0e2f8545626cb9e7d4a832 upstream.

Each iteration of for_each_child_of_node puts the previous
node, but in the case of a goto from the middle of the loop, there is
no put, thus causing a memory leak. Hence add an of_node_put before the
goto in two places.
Issue found with Coccinelle.

Fixes: 119f5173628a (drm/mediatek: Add DRM Driver for Mediatek SoC MT8173)

Signed-off-by: Nishka Dasgupta &lt;nishkadg.linux@gmail.com&gt;
Signed-off-by: CK Hu &lt;ck.hu@mediatek.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: panel-orientation-quirks: Add extra quirk table entry for GPD MicroPC</title>
<updated>2019-09-19T07:09:39+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-06-24T15:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d13a836d787d79571e51d23e0cf2e6d569047135'/>
<id>urn:sha1:d13a836d787d79571e51d23e0cf2e6d569047135</id>
<content type='text'>
commit dae1ccee012ea7514af8e4a88429844157aca7dc upstream.

Newer GPD MicroPC BIOS versions have proper DMI strings, add an extra quirk
table entry for these new strings. This is good news, as this means that we
no longer have to update the BIOS dates list with every BIOS update.

Fixes: 652b8b086538("drm: panel-orientation-quirks: Add quirk for GPD MicroPC")
Acked-by: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190624154014.8557-2-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/meson: Add support for XBGR8888 &amp; ABGR8888 formats</title>
<updated>2019-09-19T07:09:36+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>narmstrong@baylibre.com</email>
</author>
<published>2019-04-29T07:52:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a63416f39aaff117590665e485f0905d406c3fce'/>
<id>urn:sha1:a63416f39aaff117590665e485f0905d406c3fce</id>
<content type='text'>
commit 5ffff4415f9eeae834960226770963e2947e17eb upstream.

Add missing XBGR8888 &amp; ABGR8888 formats variants from the primary plane.

Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
Signed-off-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190429075238.7884-1-narmstrong@baylibre.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/atomic_helper: Allow DPMS On&lt;-&gt;Off changes for unregistered connectors</title>
<updated>2019-09-16T06:22:23+00:00</updated>
<author>
<name>Lyude Paul</name>
<email>lyude@redhat.com</email>
</author>
<published>2018-10-09T20:44:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e88a1f874ca5c5c449dd1580c02aaeda60b6485'/>
<id>urn:sha1:1e88a1f874ca5c5c449dd1580c02aaeda60b6485</id>
<content type='text'>
[ Upstream commit 34ca26a98ad67edd6e4870fe2d4aa047d41a51dd ]

It appears when testing my previous fix for some of the legacy
modesetting issues with MST, I misattributed some kernel splats that
started appearing on my machine after a rebase as being from upstream.
But it appears they actually came from my patch series:

[    2.980512] [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] Updating routing for [CONNECTOR:65:eDP-1]
[    2.980516] [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] [CONNECTOR:65:eDP-1] is not registered
[    2.980516] ------------[ cut here ]------------
[    2.980519] Could not determine valid watermarks for inherited state
[    2.980553] WARNING: CPU: 3 PID: 551 at drivers/gpu/drm/i915/intel_display.c:14983 intel_modeset_init+0x14d7/0x19f0 [i915]
[    2.980556] Modules linked in: i915(O+) i2c_algo_bit drm_kms_helper(O) syscopyarea sysfillrect sysimgblt fb_sys_fops drm(O) intel_rapl x86_pkg_temp_thermal iTCO_wdt wmi_bmof coretemp crc32_pclmul psmouse i2c_i801 mei_me mei i2c_core lpc_ich mfd_core tpm_tis tpm_tis_core wmi tpm thinkpad_acpi pcc_cpufreq video ehci_pci crc32c_intel serio_raw ehci_hcd xhci_pci xhci_hcd
[    2.980577] CPU: 3 PID: 551 Comm: systemd-udevd Tainted: G           O      4.19.0-rc7Lyude-Test+ #1
[    2.980579] Hardware name: LENOVO 20BWS1KY00/20BWS1KY00, BIOS JBET63WW (1.27 ) 11/10/2016
[    2.980605] RIP: 0010:intel_modeset_init+0x14d7/0x19f0 [i915]
[    2.980607] Code: 89 df e8 ec 27 02 00 e9 24 f2 ff ff be 03 00 00 00 48 89 df e8 da 27 02 00 e9 26 f2 ff ff 48 c7 c7 c8 d1 34 a0 e8 23 cf dc e0 &lt;0f&gt; 0b e9 7c fd ff ff f6 c4 04 0f 85 37 f7 ff ff 48 8b 83 60 08 00
[    2.980611] RSP: 0018:ffffc90000287988 EFLAGS: 00010282
[    2.980614] RAX: 0000000000000000 RBX: ffff88031b488000 RCX: 0000000000000006
[    2.980617] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff880321ad54d0
[    2.980620] RBP: ffffc90000287a10 R08: 000000000000040a R09: 0000000000000065
[    2.980623] R10: ffff88030ebb8f00 R11: ffffffff81416590 R12: ffff88031b488000
[    2.980626] R13: ffff88031b4883a0 R14: ffffc900002879a8 R15: ffff880319099800
[    2.980630] FS:  00007f475620d180(0000) GS:ffff880321ac0000(0000) knlGS:0000000000000000
[    2.980633] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    2.980636] CR2: 00007f9ef28018a0 CR3: 000000031b72c001 CR4: 00000000003606e0
[    2.980639] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    2.980642] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    2.980645] Call Trace:
[    2.980675]  i915_driver_load+0xb0e/0xdc0 [i915]
[    2.980681]  ? kernfs_add_one+0xe7/0x130
[    2.980709]  i915_pci_probe+0x46/0x60 [i915]
[    2.980715]  pci_device_probe+0xd4/0x150
[    2.980719]  really_probe+0x243/0x3b0
[    2.980722]  driver_probe_device+0xba/0x100
[    2.980726]  __driver_attach+0xe4/0x110
[    2.980729]  ? driver_probe_device+0x100/0x100
[    2.980733]  bus_for_each_dev+0x74/0xb0
[    2.980736]  driver_attach+0x1e/0x20
[    2.980739]  bus_add_driver+0x159/0x230
[    2.980743]  ? 0xffffffffa0393000
[    2.980746]  driver_register+0x70/0xc0
[    2.980749]  ? 0xffffffffa0393000
[    2.980753]  __pci_register_driver+0x57/0x60
[    2.980780]  i915_init+0x55/0x58 [i915]
[    2.980785]  do_one_initcall+0x4a/0x1c4
[    2.980789]  ? do_init_module+0x27/0x210
[    2.980793]  ? kmem_cache_alloc_trace+0x131/0x190
[    2.980797]  do_init_module+0x60/0x210
[    2.980800]  load_module+0x2063/0x22e0
[    2.980804]  ? vfs_read+0x116/0x140
[    2.980807]  ? vfs_read+0x116/0x140
[    2.980811]  __do_sys_finit_module+0xbd/0x120
[    2.980814]  ? __do_sys_finit_module+0xbd/0x120
[    2.980818]  __x64_sys_finit_module+0x1a/0x20
[    2.980821]  do_syscall_64+0x5a/0x110
[    2.980824]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    2.980826] RIP: 0033:0x7f4754e32879
[    2.980828] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 &lt;48&gt; 3d 01 f0 ff ff 73 01 c3 48 8b 0d f7 45 2c 00 f7 d8 64 89 01 48
[    2.980831] RSP: 002b:00007fff43fd97d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[    2.980834] RAX: ffffffffffffffda RBX: 0000559a44ca64f0 RCX: 00007f4754e32879
[    2.980836] RDX: 0000000000000000 RSI: 00007f475599f4cd RDI: 0000000000000018
[    2.980838] RBP: 00007f475599f4cd R08: 0000000000000000 R09: 0000000000000000
[    2.980839] R10: 0000000000000018 R11: 0000000000000246 R12: 0000000000000000
[    2.980841] R13: 0000559a44c92fd0 R14: 0000000000020000 R15: 0000000000000000
[    2.980881] WARNING: CPU: 3 PID: 551 at drivers/gpu/drm/i915/intel_display.c:14983 intel_modeset_init+0x14d7/0x19f0 [i915]
[    2.980884] ---[ end trace 5eb47a76277d4731 ]---

The cause of this appears to be due to the fact that if there's
pre-existing display state that was set by the BIOS when i915 loads, it
will attempt to perform a modeset before the driver is registered with
userspace. Since this happens before the driver's registered with
userspace, it's connectors are also unregistered and thus-states which
would turn on DPMS on a connector end up getting rejected since the
connector isn't registered.

These bugs managed to get past Intel's CI partially due to the fact it
never ran a full test on my patches for some reason, but also because
all of the tests unload the GPU once before running. Since this bug is
only really triggered when the drivers tries to perform a modeset before
it's been fully registered with userspace when coming from whatever
display configuration the firmware left us with, it likely would never
have been picked up by CI in the first place.

After some discussion with vsyrjala, we decided the best course of
action would be to just move the unregistered connector checks out of
update_connector_routing() and into drm_atomic_set_crtc_for_connector().
The reason for this being that legacy modesetting isn't going to be
expecting failures anywhere (at least this is the case with X), so
ideally we want to ensure that any DPMS changes will still work even on
unregistered connectors. Instead, we now only reject new modesets which
would change the current CRTC assigned to an unregistered connector
unless no new CRTC is being assigned to replace the connector's previous
one.

Signed-off-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reported-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Fixes: 4d80273976bf ("drm/atomic_helper: Disallow new modesets on unregistered connectors")
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181009204424.21462-1-lyude@redhat.com
(cherry picked from commit b5d29843d8ef86d4cde4742e095b81b7fd41e688)
Fixes: e96550956fbc ("drm/atomic_helper: Disallow new modesets on unregistered connectors")
Signed-off-by: Joonas Lahtinen &lt;joonas.lahtinen@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
