Skip to content

Commit a9cdf68

Browse files
openedevPhilippe Cornu
authored andcommitted
drm/stm: ltdc: Use simple encoder
STM ltdc driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: Yannick Fertre <yannick.fertre@foss.st.com> Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210302175700.28640-1-jagan@amarulasolutions.com
1 parent 0f9c429 commit a9cdf68

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/gpu/drm/stm/ltdc.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <drm/drm_of.h>
3232
#include <drm/drm_plane_helper.h>
3333
#include <drm/drm_probe_helper.h>
34+
#include <drm/drm_simple_kms_helper.h>
3435
#include <drm/drm_vblank.h>
3536

3637
#include <video/videomode.h>
@@ -1054,14 +1055,6 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
10541055
return ret;
10551056
}
10561057

1057-
/*
1058-
* DRM_ENCODER
1059-
*/
1060-
1061-
static const struct drm_encoder_funcs ltdc_encoder_funcs = {
1062-
.destroy = drm_encoder_cleanup,
1063-
};
1064-
10651058
static void ltdc_encoder_disable(struct drm_encoder *encoder)
10661059
{
10671060
struct drm_device *ddev = encoder->dev;
@@ -1122,8 +1115,7 @@ static int ltdc_encoder_init(struct drm_device *ddev, struct drm_bridge *bridge)
11221115
encoder->possible_crtcs = CRTC_MASK;
11231116
encoder->possible_clones = 0; /* No cloning support */
11241117

1125-
drm_encoder_init(ddev, encoder, &ltdc_encoder_funcs,
1126-
DRM_MODE_ENCODER_DPI, NULL);
1118+
drm_simple_encoder_init(ddev, encoder, DRM_MODE_ENCODER_DPI);
11271119

11281120
drm_encoder_helper_add(encoder, &ltdc_encoder_helper_funcs);
11291121

0 commit comments

Comments
 (0)