Commit a9cdf680 authored by Jagan Teki's avatar Jagan Teki Committed by Philippe Cornu

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: default avatarJagan Teki <jagan@amarulasolutions.com>
Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Tested-by: default avatarYannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: default avatarPhilippe Cornu <philippe.cornu@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210302175700.28640-1-jagan@amarulasolutions.com
parent 0f9c4296
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <drm/drm_of.h> #include <drm/drm_of.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_vblank.h> #include <drm/drm_vblank.h>
#include <video/videomode.h> #include <video/videomode.h>
...@@ -1054,14 +1055,6 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc) ...@@ -1054,14 +1055,6 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
return ret; return ret;
} }
/*
* DRM_ENCODER
*/
static const struct drm_encoder_funcs ltdc_encoder_funcs = {
.destroy = drm_encoder_cleanup,
};
static void ltdc_encoder_disable(struct drm_encoder *encoder) static void ltdc_encoder_disable(struct drm_encoder *encoder)
{ {
struct drm_device *ddev = encoder->dev; struct drm_device *ddev = encoder->dev;
...@@ -1122,8 +1115,7 @@ static int ltdc_encoder_init(struct drm_device *ddev, struct drm_bridge *bridge) ...@@ -1122,8 +1115,7 @@ static int ltdc_encoder_init(struct drm_device *ddev, struct drm_bridge *bridge)
encoder->possible_crtcs = CRTC_MASK; encoder->possible_crtcs = CRTC_MASK;
encoder->possible_clones = 0; /* No cloning support */ encoder->possible_clones = 0; /* No cloning support */
drm_encoder_init(ddev, encoder, &ltdc_encoder_funcs, drm_simple_encoder_init(ddev, encoder, DRM_MODE_ENCODER_DPI);
DRM_MODE_ENCODER_DPI, NULL);
drm_encoder_helper_add(encoder, &ltdc_encoder_helper_funcs); drm_encoder_helper_add(encoder, &ltdc_encoder_helper_funcs);
......
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