All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: Use simple encoder
@ 2021-03-02 17:57 ` Jagan Teki
  0 siblings, 0 replies; 16+ messages in thread
From: Jagan Teki @ 2021-03-02 17:57 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard, Vincent Abriou
  Cc: dri-devel, linux-stm32, linux-arm-kernel, linux-kernel,
	linux-amarula, Jagan Teki

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>
---
 drivers/gpu/drm/stm/ltdc.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 7812094f93d6..aeeb43524ca0 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>
@@ -1020,14 +1021,6 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
 	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;
@@ -1088,8 +1081,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, &ltdc_encoder_funcs,
-			 DRM_MODE_ENCODER_DPI, NULL);
+	drm_simple_encoder_init(ddev, encoder, DRM_MODE_ENCODER_DPI);
 
 	drm_encoder_helper_add(encoder, &ltdc_encoder_helper_funcs);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-03-08 10:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 17:57 [PATCH] drm/stm: ltdc: Use simple encoder Jagan Teki
2021-03-02 17:57 ` Jagan Teki
2021-03-02 17:57 ` Jagan Teki
2021-03-03  7:46 ` Thomas Zimmermann
2021-03-03  7:46   ` Thomas Zimmermann
2021-03-03  7:46   ` Thomas Zimmermann
2021-03-03 15:42 ` yannick Fertre
2021-03-04  8:21 ` Thomas Zimmermann
2021-03-04  8:21   ` Thomas Zimmermann
2021-03-04  8:21   ` Thomas Zimmermann
2021-03-04  8:49   ` yannick Fertre
2021-03-04  8:49     ` yannick Fertre
2021-03-04  8:49     ` yannick Fertre
2021-03-08 10:50     ` [Linux-stm32] " Philippe CORNU - foss
2021-03-08 10:50       ` Philippe CORNU - foss
2021-03-08 10:50       ` Philippe CORNU - foss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.