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/renesas/shmobile/shmob_drm_crtc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c index 1a2b9b68af6f..2dc477c7eda6 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c @@ -21,6 +21,7 @@ #include <drm/drm_bridge_connector.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_encoder.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> @@ -29,7 +30,6 @@ #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h> -#include <drm/drm_simple_kms_helper.h> #include <drm/drm_vblank.h> #include <video/videomode.h> @@ -436,6 +436,10 @@ static const struct drm_encoder_helper_funcs encoder_helper_funcs = { .mode_fixup = shmob_drm_encoder_mode_fixup, }; +static const struct drm_encoder_funcs shmob_encoder_funcs = { + .destroy = drm_encoder_cleanup, +}; + /* ----------------------------------------------------------------------------- * Encoder */ @@ -448,8 +452,8 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev) encoder->possible_crtcs = 1; - ret = drm_simple_encoder_init(&sdev->ddev, encoder, - DRM_MODE_ENCODER_DPI); + ret = drm_encoder_init(&sdev->ddev, encoder, &shmob_encoder_funcs, + DRM_MODE_ENCODER_DPI, NULL); if (ret < 0) return ret; -- 2.54.0

