diff options
author | Jagan Teki <jagan@amarulasolutions.com> | 2021-03-02 23:27:00 +0530 |
---|---|---|
committer | Philippe Cornu <philippe.cornu@foss.st.com> | 2021-03-08 11:40:29 +0100 |
commit | a9cdf68092908313320c6959c4e1bdfdb7103613 (patch) | |
tree | 1c5506801f429824c9279fec052f70b3d56109dd /drivers/gpu/drm/stm | |
parent | 0f9c4296485b1b65e1d5cc409054a3f79651cd45 (diff) | |
download | linux-a9cdf68092908313320c6959c4e1bdfdb7103613.tar.gz linux-a9cdf68092908313320c6959c4e1bdfdb7103613.tar.bz2 linux-a9cdf68092908313320c6959c4e1bdfdb7103613.zip |
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
Diffstat (limited to 'drivers/gpu/drm/stm')
-rw-r--r-- | drivers/gpu/drm/stm/ltdc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index b5117fccf355..65c3c79ad1d5 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -31,6 +31,7 @@ #include <drm/drm_of.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> #include <drm/drm_vblank.h> #include <video/videomode.h> @@ -1054,14 +1055,6 @@ cleanup: 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) { struct drm_device *ddev = encoder->dev; @@ -1122,8 +1115,7 @@ static int ltdc_encoder_init(struct drm_device *ddev, struct drm_bridge *bridge) encoder->possible_crtcs = CRTC_MASK; encoder->possible_clones = 0; /* No cloning support */ - drm_encoder_init(ddev, encoder, <dc_encoder_funcs, - DRM_MODE_ENCODER_DPI, NULL); + drm_simple_encoder_init(ddev, encoder, DRM_MODE_ENCODER_DPI); drm_encoder_helper_add(encoder, <dc_encoder_helper_funcs); |