[PATCH] drm: mxsfb: Use simple encoder
Tian Tao
tiantao6 at hisilicon.com
Wed Mar 10 07:40:00 UTC 2021
The driver uses empty implementations for its encoders. Replace
the code with the generic simple encoder.
Signed-off-by: Tian Tao <tiantao6 at hisilicon.com>
---
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
More information about the dri-devel
mailing list