From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jonas Karlman <jonas@kwiboo.se>
Cc: Sandy Huang <hjc@rock-chips.com>,
Heiko Stuebner <heiko@sntech.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Mark Yao <markyao0591@gmail.com>,
Andy Yan <andy.yan@rock-chips.com>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
Date: Wed, 21 Jun 2023 10:05:35 +0200 [thread overview]
Message-ID: <20230621080535.GV18491@pengutronix.de> (raw)
In-Reply-To: <20230620064732.1525594-2-jonas@kwiboo.se>
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@kwiboo.se>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.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 |
next prev parent reply other threads:[~2023-06-21 8:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 6:47 [PATCH 0/4] drm/rockchip: Fix crtc duplicate state and crtc reset funcs Jonas Karlman
2023-06-20 6:47 ` [PATCH 1/4] drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs Jonas Karlman
2023-06-21 8:05 ` Sascha Hauer [this message]
2023-06-20 6:47 ` [PATCH 2/4] drm/rockchip: vop: Use cleanup helper directly as destroy funcs Jonas Karlman
2023-06-21 8:05 ` Sascha Hauer
2023-06-20 6:47 ` [PATCH 3/4] drm/rockchip: vop2: Don't crash for invalid duplicate_state Jonas Karlman
2023-06-21 8:06 ` Sascha Hauer
2023-06-20 6:47 ` [PATCH 4/4] drm/rockchip: vop2: Add missing call to crtc reset helper Jonas Karlman
2023-06-21 8:11 ` Sascha Hauer
2023-06-21 15:41 ` Jonas Karlman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230621080535.GV18491@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=airlied@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jonas@kwiboo.se \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=markyao0591@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox