Merge tag 'drm-misc-next-2020-04-14' of git://anongit.freedesktop.org/drm/drm-misc...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / rockchip / analogix_dp-rockchip.c
index ce98c08aa8b446da487481ebf51a4f996a4efd77..ade2327a10e2c3d340bf91846f25f4748c34c70e 100644 (file)
@@ -26,6 +26,7 @@
 #include <drm/drm_of.h>
 #include <drm/drm_panel.h>
 #include <drm/drm_probe_helper.h>
+#include <drm/drm_simple_kms_helper.h>
 
 #include "rockchip_drm_drv.h"
 #include "rockchip_drm_vop.h"
@@ -258,10 +259,6 @@ static struct drm_encoder_helper_funcs rockchip_dp_encoder_helper_funcs = {
        .atomic_check = rockchip_dp_drm_encoder_atomic_check,
 };
 
-static struct drm_encoder_funcs rockchip_dp_encoder_funcs = {
-       .destroy = drm_encoder_cleanup,
-};
-
 static int rockchip_dp_of_probe(struct rockchip_dp_device *dp)
 {
        struct device *dev = dp->dev;
@@ -309,8 +306,8 @@ static int rockchip_dp_drm_create_encoder(struct rockchip_dp_device *dp)
                                                             dev->of_node);
        DRM_DEBUG_KMS("possible_crtcs = 0x%x\n", encoder->possible_crtcs);
 
-       ret = drm_encoder_init(drm_dev, encoder, &rockchip_dp_encoder_funcs,
-                              DRM_MODE_ENCODER_TMDS, NULL);
+       ret = drm_simple_encoder_init(drm_dev, encoder,
+                                     DRM_MODE_ENCODER_TMDS);
        if (ret) {
                DRM_ERROR("failed to initialize encoder with drm\n");
                return ret;