From f9f3a38d16542cb6521a14b4c8ed674c1cae2355 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Thu, 5 Mar 2020 16:59:42 +0100 Subject: drm/sun4i: Use simple encoder The ingenic driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-15-tzimmermann@suse.de --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c') diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 059939789730..f6c67dd87a05 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "sun4i_crtc.h" #include "sun4i_tcon.h" @@ -846,10 +847,6 @@ static const struct drm_encoder_helper_funcs sun6i_dsi_enc_helper_funcs = { .enable = sun6i_dsi_encoder_enable, }; -static const struct drm_encoder_funcs sun6i_dsi_enc_funcs = { - .destroy = drm_encoder_cleanup, -}; - static u32 sun6i_dsi_dcs_build_pkt_hdr(struct sun6i_dsi *dsi, const struct mipi_dsi_msg *msg) { @@ -1062,11 +1059,8 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master, drm_encoder_helper_add(&dsi->encoder, &sun6i_dsi_enc_helper_funcs); - ret = drm_encoder_init(drm, - &dsi->encoder, - &sun6i_dsi_enc_funcs, - DRM_MODE_ENCODER_DSI, - NULL); + ret = drm_simple_encoder_init(drm, &dsi->encoder, + DRM_MODE_ENCODER_DSI); if (ret) { dev_err(dsi->dev, "Couldn't initialise the DSI encoder\n"); return ret; -- cgit v1.2.3-59-g8ed1b