Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs

struct rockchip_crtc_state members such as output_type, output_bpc and
enable_afbc is always reset to zero in the atomic_duplicate_state crtc
funcs.

Fix this by using kmemdup on the subclass rockchip_crtc_state struct.

Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-2-jonas@kwiboo.se

authored by

Jonas Karlman and committed by
Heiko Stuebner
13fc2880 5976a28b

+2 -1
+2 -1
drivers/gpu/drm/rockchip/rockchip_drm_vop.c
··· 1613 1613 if (WARN_ON(!crtc->state)) 1614 1614 return NULL; 1615 1615 1616 - rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL); 1616 + rockchip_state = kmemdup(to_rockchip_crtc_state(crtc->state), 1617 + sizeof(*rockchip_state), GFP_KERNEL); 1617 1618 if (!rockchip_state) 1618 1619 return NULL; 1619 1620