<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpu, branch v4.9.196</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.196</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.196'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2019-10-07T16:53:13Z</updated>
<entry>
<title>drm/amdgpu/si: fix ASIC tests</title>
<updated>2019-10-07T16:53:13Z</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2019-08-28T15:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd8ed512905b6ed25f93becf31971870c0917c8a'/>
<id>urn:sha1:bd8ed512905b6ed25f93becf31971870c0917c8a</id>
<content type='text'>
[ Upstream commit 77efe48a729588527afb4d5811b9e0acb29f5e51 ]

Comparing adev-&gt;family with CHIP constants is not correct.
adev-&gt;family can only be compared with AMDGPU_FAMILY constants and
adev-&gt;asic_type is the struct member to compare with CHIP constants.
They are separate identification spaces.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Fixes: 62a37553414a ("drm/amdgpu: add si implementation v10")
Cc: Ken Wang &lt;Qingqing.Wang@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: "David (ChunMing) Zhou" &lt;David1.Zhou@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>gpu: drm: radeon: Fix a possible null-pointer dereference in radeon_connector_set_property()</title>
<updated>2019-10-07T16:53:09Z</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2019-07-29T08:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59a8932a1fb63abb00a9e2cb6781d031d45b7c99'/>
<id>urn:sha1:59a8932a1fb63abb00a9e2cb6781d031d45b7c99</id>
<content type='text'>
[ Upstream commit f3eb9b8f67bc28783eddc142ad805ebdc53d6339 ]

In radeon_connector_set_property(), there is an if statement on line 743
to check whether connector-&gt;encoder is NULL:
    if (connector-&gt;encoder)

When connector-&gt;encoder is NULL, it is used on line 755:
    if (connector-&gt;encoder-&gt;crtc)

Thus, a possible null-pointer dereference may occur.

To fix this bug, connector-&gt;encoder is checked before being used.

This bug is found by a static analysis tool STCheck written by us.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.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/radeon: Fix EEH during kexec</title>
<updated>2019-10-07T16:53:09Z</updated>
<author>
<name>KyleMahlkuch</name>
<email>kmahlkuc@linux.vnet.ibm.com</email>
</author>
<published>2019-07-31T22:10:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=96aed711d302f50162c4a25762e2fde6bf189396'/>
<id>urn:sha1:96aed711d302f50162c4a25762e2fde6bf189396</id>
<content type='text'>
[ Upstream commit 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6 ]

During kexec some adapters hit an EEH since they are not properly
shut down in the radeon_pci_shutdown() function. Adding
radeon_suspend_kms() fixes this issue.

Signed-off-by: KyleMahlkuch &lt;kmahlkuc@linux.vnet.ibm.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/bridge: tc358767: Increase AUX transfer length limit</title>
<updated>2019-10-07T16:53:08Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2019-06-19T05:27:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0372fc304a6b8cea84a1e3c8aeca1d4592971ca5'/>
<id>urn:sha1:0372fc304a6b8cea84a1e3c8aeca1d4592971ca5</id>
<content type='text'>
[ Upstream commit e0655feaec62d5139b6b13a7b1bbb1ab8f1c2d83 ]

According to the datasheet tc358767 can transfer up to 16 bytes via
its AUX channel, so the artificial limit of 8 appears to be too
low. However only up to 15-bytes seem to be actually supported and
trying to use 16-byte transfers results in transfers failing
sporadically (with bogus status in case of I2C transfers), so limit it
to 15.

Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Reviewed-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Cc: Laurent Pinchart &lt;Laurent.pinchart@ideasonboard.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Andrey Gusakov &lt;andrey.gusakov@cogentembedded.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: Cory Tusar &lt;cory.tusar@zii.aero&gt;
Cc: Chris Healy &lt;cphealy@gmail.com&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-9-andrew.smirnov@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2)</title>
<updated>2019-10-05T10:30:28Z</updated>
<author>
<name>Ahzo</name>
<email>Ahzo@tutanota.com</email>
</author>
<published>2019-08-05T19:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=33bdbb12e279f1c0e11687d529c18db88c17ec38'/>
<id>urn:sha1:33bdbb12e279f1c0e11687d529c18db88c17ec38</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: Flush output polling on shutdown</title>
<updated>2019-10-05T10:30:11Z</updated>
<author>
<name>Chris Wilson</name>
<email>chris@chris-wilson.co.uk</email>
</author>
<published>2019-06-03T13:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e71b75923912d82db880d0b1c2c8134cfc7fdd57'/>
<id>urn:sha1:e71b75923912d82db880d0b1c2c8134cfc7fdd57</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>drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto</title>
<updated>2019-09-21T05:14:07Z</updated>
<author>
<name>Nishka Dasgupta</name>
<email>nishkadg.linux@gmail.com</email>
</author>
<published>2019-07-06T13:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=22571a43d06412a7681de4d7ee383b70a73d8e43'/>
<id>urn:sha1:22571a43d06412a7681de4d7ee383b70a73d8e43</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/vmwgfx: Fix double free in vmw_recv_msg()</title>
<updated>2019-09-16T06:19:32Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2019-08-15T08:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=161f7a6f396152da50d18151c075fe9aba16c6db'/>
<id>urn:sha1:161f7a6f396152da50d18151c075fe9aba16c6db</id>
<content type='text'>
commit 08b0c891605acf727e43e3e03a25857d3e789b61 upstream.

We recently added a kfree() after the end of the loop:

	if (retries == RETRIES) {
		kfree(reply);
		return -EINVAL;
	}

There are two problems.  First the test is wrong and because retries
equals RETRIES if we succeed on the last iteration through the loop.
Second if we fail on the last iteration through the loop then the kfree
is a double free.

When you're reading this code, please note the break statement at the
end of the while loop.  This patch changes the loop so that if it's not
successful then "reply" is NULL and we can test for that afterward.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 6b7c3b86f0b6 ("drm/vmwgfx: fix memory leak when too many retries have occurred")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/vmwgfx: fix memory leak when too many retries have occurred</title>
<updated>2019-09-06T08:19:35Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-06-24T16:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=72cbaa5ba88a91f9fea0132293b81ade3e527ca2'/>
<id>urn:sha1:72cbaa5ba88a91f9fea0132293b81ade3e527ca2</id>
<content type='text'>
[ Upstream commit 6b7c3b86f0b63134b2ab56508921a0853ffa687a ]

Currently when too many retries have occurred there is a memory
leak on the allocation for reply on the error return path. Fix
this by kfree'ing reply before returning.

Addresses-Coverity: ("Resource leak")
Fixes: a9cd9c044aa9 ("drm/vmwgfx: Add a check to handle host message failure")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Deepak Rawat &lt;drawat@vmware.com&gt;
Signed-off-by: Deepak Rawat &lt;drawat@vmware.com&gt;
Signed-off-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/rockchip: Properly adjust to a true clock in adjusted_mode</title>
<updated>2019-08-04T07:33:38Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2019-06-14T22:47:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1d133532eecd156987cca61191e099a6c2c83cc8'/>
<id>urn:sha1:1d133532eecd156987cca61191e099a6c2c83cc8</id>
<content type='text'>
[ Upstream commit 99b9683f2142b20bad78e61f7f829e8714e45685 ]

When fixing up the clock in vop_crtc_mode_fixup() we're not doing it
quite correctly.  Specifically if we've got the true clock 266666667 Hz,
we'll perform this calculation:
   266666667 / 1000 =&gt; 266666

Later when we try to set the clock we'll do clk_set_rate(266666 *
1000).  The common clock framework won't actually pick the proper clock
in this case since it always wants clocks &lt;= the specified one.

Let's solve this by using DIV_ROUND_UP.

Fixes: b59b8de31497 ("drm/rockchip: return a true clock rate to adjusted_mode")
Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Reviewed-by: Yakir Yang &lt;ykk@rock-chips.com&gt;
Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190614224730.98622-1-dianders@chromium.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
