[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621080535.GV18491@pengutronix.de>
Date: Wed, 21 Jun 2023 10:05:35 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Jonas Karlman <jonas@...boo.se>
Cc: Sandy Huang <hjc@...k-chips.com>, Heiko Stuebner <heiko@...ech.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Mark Yao <markyao0591@...il.com>,
Andy Yan <andy.yan@...k-chips.com>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] drm/rockchip: vop: Fix reset of state in duplicate
state crtc funcs
On Tue, Jun 20, 2023 at 06:47:36AM +0000, Jonas Karlman wrote:
> 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@...boo.se>
Reviewed-by: Sascha Hauer <s.hauer@...gutronix.de>
Sascha
> ---
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index a530ecc4d207..60b23636a3fe 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1614,7 +1614,8 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
> if (WARN_ON(!crtc->state))
> return NULL;
>
> - rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL);
> + rockchip_state = kmemdup(to_rockchip_crtc_state(crtc->state),
> + sizeof(*rockchip_state), GFP_KERNEL);
> if (!rockchip_state)
> return NULL;
>
> --
> 2.41.0
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists