[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230621080551.GW18491@pengutronix.de>
Date: Wed, 21 Jun 2023 10:05:51 +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 2/4] drm/rockchip: vop: Use cleanup helper directly as
destroy funcs
On Tue, Jun 20, 2023 at 06:47:37AM +0000, Jonas Karlman wrote:
> vop_plane_destroy and vop_crtc_destroy are plain wrappers around
> drm_plane_cleanup and drm_crtc_cleanup. Use them directly as plane and
> crtc funcs to closer match VOP2 driver.
>
> 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 | 16 +++-------------
> 1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 60b23636a3fe..25c873d4ff53 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -766,11 +766,6 @@ static void vop_crtc_atomic_disable(struct drm_crtc *crtc,
> }
> }
>
> -static void vop_plane_destroy(struct drm_plane *plane)
> -{
> - drm_plane_cleanup(plane);
> -}
> -
> static inline bool rockchip_afbc(u64 modifier)
> {
> return modifier == ROCKCHIP_AFBC_MOD;
> @@ -1131,7 +1126,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
> static const struct drm_plane_funcs vop_plane_funcs = {
> .update_plane = drm_atomic_helper_update_plane,
> .disable_plane = drm_atomic_helper_disable_plane,
> - .destroy = vop_plane_destroy,
> + .destroy = drm_plane_cleanup,
> .reset = drm_atomic_helper_plane_reset,
> .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
> .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> @@ -1602,11 +1597,6 @@ static const struct drm_crtc_helper_funcs vop_crtc_helper_funcs = {
> .atomic_disable = vop_crtc_atomic_disable,
> };
>
> -static void vop_crtc_destroy(struct drm_crtc *crtc)
> -{
> - drm_crtc_cleanup(crtc);
> -}
> -
> static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
> {
> struct rockchip_crtc_state *rockchip_state;
> @@ -1711,7 +1701,7 @@ vop_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
> static const struct drm_crtc_funcs vop_crtc_funcs = {
> .set_config = drm_atomic_helper_set_config,
> .page_flip = drm_atomic_helper_page_flip,
> - .destroy = vop_crtc_destroy,
> + .destroy = drm_crtc_cleanup,
> .reset = vop_crtc_reset,
> .atomic_duplicate_state = vop_crtc_duplicate_state,
> .atomic_destroy_state = vop_crtc_destroy_state,
> @@ -1962,7 +1952,7 @@ static void vop_destroy_crtc(struct vop *vop)
> */
> list_for_each_entry_safe(plane, tmp, &drm_dev->mode_config.plane_list,
> head)
> - vop_plane_destroy(plane);
> + drm_plane_cleanup(plane);
>
> /*
> * Destroy CRTC after vop_plane_destroy() since vop_disable_plane()
> --
> 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