The simple KMS helpers are deprecated because they only add an intermediate layer between drivers and atomic modesetting.
Open-code drm_simple_encoder_init() by calling drm_encoder_init() directly and providing driver-local drm_encoder_funcs. Signed-off-by: Diogo Silva <[email protected]> --- drivers/gpu/drm/kmb/kmb_dsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c index 59d0e856392f..13adba96bc78 100644 --- a/drivers/gpu/drm/kmb/kmb_dsi.c +++ b/drivers/gpu/drm/kmb/kmb_dsi.c @@ -14,8 +14,8 @@ #include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_bridge_connector.h> +#include <drm/drm_encoder.h> #include <drm/drm_mipi_dsi.h> -#include <drm/drm_simple_kms_helper.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> @@ -1427,6 +1427,10 @@ struct kmb_dsi *kmb_dsi_init(struct platform_device *pdev) return kmb_dsi; } +static const struct drm_encoder_funcs kmb_dsi_encoder_funcs = { + .destroy = drm_encoder_cleanup, +}; + int kmb_dsi_encoder_init(struct drm_device *dev, struct kmb_dsi *kmb_dsi) { struct drm_encoder *encoder; @@ -1437,7 +1441,8 @@ int kmb_dsi_encoder_init(struct drm_device *dev, struct kmb_dsi *kmb_dsi) encoder->possible_crtcs = 1; encoder->possible_clones = 0; - ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DSI); + ret = drm_encoder_init(dev, encoder, &kmb_dsi_encoder_funcs, + DRM_MODE_ENCODER_DSI, NULL); if (ret) { dev_err(kmb_dsi->dev, "Failed to init encoder %d\n", ret); return ret; -- 2.54.0

