Skip to contentSkip to conversation

drm: mxsfb: Use simple encoder

PATCH New Tian Tao 1 participant 1 message Mar 10, 2021

Subsystems (4)
lore
Share & tools
lore

Tian Tao

author
#0 lore raw

PATCH 1/1 drm: mxsfb: Use simple encoder

The driver uses empty implementations for its encoders. Replace the code with the generic simple encoder.

---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
drivers/gpu/drm/mxsfb/mxsfb_kms.c +2 -10
index 300e7bab..0975930 100644
@@ -25,6 +25,7 @@
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_plane.h>
 #include <drm/drm_plane_helper.h>
+#include <drm/drm_simple_kms_helper.h>
 #include <drm/drm_vblank.h>
 
 #include "mxsfb_drv.h"
@@ -390,14 +391,6 @@ static const struct drm_crtc_funcs mxsfb_crtc_funcs = {
 };
 
 /* -----------------------------------------------------------------------------
- * Encoder
- */
-
-static const struct drm_encoder_funcs mxsfb_encoder_funcs = {
-	.destroy = drm_encoder_cleanup,
-};
-
-/* -----------------------------------------------------------------------------
  * Planes
  */
 
@@ -584,6 +577,5 @@ int mxsfb_kms_init(struct mxsfb_drm_private *mxsfb)
 		return ret;
 
 	encoder->possible_crtcs = drm_crtc_mask(crtc);
-	return drm_encoder_init(mxsfb->drm, encoder, &mxsfb_encoder_funcs,
-				DRM_MODE_ENCODER_NONE, NULL);
+	return drm_simple_encoder_init(mxsfb->drm, encoder, DRM_MODE_ENCODER_NONE);
 }
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel