Merge tag 'drm-next-2020-06-02' of git://anongit.freedesktop.org/drm/drm
[openwrt/staging/blogic.git] / drivers / gpu / drm / sun4i / sun6i_mipi_dsi.c
index 3eb89f1eb0e1ad44bfde8cb12359111ef5ad68be..aa67cb037e9d10a417e932ea9abc7fca68fdb30f 100644 (file)
@@ -24,6 +24,7 @@
 #include <drm/drm_panel.h>
 #include <drm/drm_print.h>
 #include <drm/drm_probe_helper.h>
+#include <drm/drm_simple_kms_helper.h>
 
 #include "sun4i_crtc.h"
 #include "sun4i_tcon.h"
@@ -846,10 +847,6 @@ static const struct drm_encoder_helper_funcs sun6i_dsi_enc_helper_funcs = {
        .enable         = sun6i_dsi_encoder_enable,
 };
 
-static const struct drm_encoder_funcs sun6i_dsi_enc_funcs = {
-       .destroy        = drm_encoder_cleanup,
-};
-
 static u32 sun6i_dsi_dcs_build_pkt_hdr(struct sun6i_dsi *dsi,
                                       const struct mipi_dsi_msg *msg)
 {
@@ -1062,11 +1059,8 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
 
        drm_encoder_helper_add(&dsi->encoder,
                               &sun6i_dsi_enc_helper_funcs);
-       ret = drm_encoder_init(drm,
-                              &dsi->encoder,
-                              &sun6i_dsi_enc_funcs,
-                              DRM_MODE_ENCODER_DSI,
-                              NULL);
+       ret = drm_simple_encoder_init(drm, &dsi->encoder,
+                                     DRM_MODE_ENCODER_DSI);
        if (ret) {
                dev_err(dsi->dev, "Couldn't initialise the DSI encoder\n");
                return ret;