]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: tc358767: copy the mode data, instead of storing the pointer
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 28 May 2019 08:27:43 +0000 (11:27 +0300)
committerAndrzej Hajda <a.hajda@samsung.com>
Fri, 31 May 2019 13:41:29 +0000 (15:41 +0200)
commit0db7209e5d349abd182f015344e6d4b4aeb81f07
tree7b9f8bfbc2908c66fd4b7a274b5c22ff57484a2b
parentcf88b6670b6e0bb0b1346db015d4d490fdd08790
drm/bridge: tc358767: copy the mode data, instead of storing the pointer

In tc_bridge_mode_set callback, we store the pointer to the given
drm_display_mode, and use the mode later. Storing a pointer in such a
way looks very suspicious to me, and I have observed odd issues where
the timings were apparently (at least mostly) zero.

Do a copy of the drm_display_mode instead to ensure we don't refer to
freed/modified data.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528082747.3631-21-tomi.valkeinen@ti.com
drivers/gpu/drm/bridge/tc358767.c