[PATCH] drm: mxsfb: Use simple encoder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx>
---
 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index 300e7bab..0975930 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -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);
 }
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux