Commit 800f7c33 authored by Jonas Karlman's avatar Jonas Karlman Committed by Heiko Stuebner

drm/rockchip: vop: Use cleanup helper directly as destroy funcs

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: default avatarJonas Karlman <jonas@kwiboo.se>
Reviewed-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230621223311.2239547-3-jonas@kwiboo.se
parent 13fc2880
...@@ -765,11 +765,6 @@ static void vop_crtc_atomic_disable(struct drm_crtc *crtc, ...@@ -765,11 +765,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) static inline bool rockchip_afbc(u64 modifier)
{ {
return modifier == ROCKCHIP_AFBC_MOD; return modifier == ROCKCHIP_AFBC_MOD;
...@@ -1130,7 +1125,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = { ...@@ -1130,7 +1125,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = {
static const struct drm_plane_funcs vop_plane_funcs = { static const struct drm_plane_funcs vop_plane_funcs = {
.update_plane = drm_atomic_helper_update_plane, .update_plane = drm_atomic_helper_update_plane,
.disable_plane = drm_atomic_helper_disable_plane, .disable_plane = drm_atomic_helper_disable_plane,
.destroy = vop_plane_destroy, .destroy = drm_plane_cleanup,
.reset = drm_atomic_helper_plane_reset, .reset = drm_atomic_helper_plane_reset,
.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
...@@ -1601,11 +1596,6 @@ static const struct drm_crtc_helper_funcs vop_crtc_helper_funcs = { ...@@ -1601,11 +1596,6 @@ static const struct drm_crtc_helper_funcs vop_crtc_helper_funcs = {
.atomic_disable = vop_crtc_atomic_disable, .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) static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
{ {
struct rockchip_crtc_state *rockchip_state; struct rockchip_crtc_state *rockchip_state;
...@@ -1710,7 +1700,7 @@ vop_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name, ...@@ -1710,7 +1700,7 @@ vop_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
static const struct drm_crtc_funcs vop_crtc_funcs = { static const struct drm_crtc_funcs vop_crtc_funcs = {
.set_config = drm_atomic_helper_set_config, .set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip, .page_flip = drm_atomic_helper_page_flip,
.destroy = vop_crtc_destroy, .destroy = drm_crtc_cleanup,
.reset = vop_crtc_reset, .reset = vop_crtc_reset,
.atomic_duplicate_state = vop_crtc_duplicate_state, .atomic_duplicate_state = vop_crtc_duplicate_state,
.atomic_destroy_state = vop_crtc_destroy_state, .atomic_destroy_state = vop_crtc_destroy_state,
...@@ -1961,7 +1951,7 @@ static void vop_destroy_crtc(struct vop *vop) ...@@ -1961,7 +1951,7 @@ static void vop_destroy_crtc(struct vop *vop)
*/ */
list_for_each_entry_safe(plane, tmp, &drm_dev->mode_config.plane_list, list_for_each_entry_safe(plane, tmp, &drm_dev->mode_config.plane_list,
head) head)
vop_plane_destroy(plane); drm_plane_cleanup(plane);
/* /*
* Destroy CRTC after vop_plane_destroy() since vop_disable_plane() * Destroy CRTC after vop_plane_destroy() since vop_disable_plane()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment