diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 18:59:41 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 15:16:45 +0300 |
commit | 2d2e89dafc858444edc30d1c3923920c4e917331 (patch) | |
tree | c6d80fa46deb9727efc1a349ae51f2c2be0c078e /drivers/gpu/drm/shmobile | |
parent | 0dbd735448bfdb078a429d5d63e1bd0ef2c5d0f0 (diff) | |
download | linux-2d2e89dafc858444edc30d1c3923920c4e917331.tar.xz |
drm/shmobile: Use simple encoder
The shmobile driver uses empty implementations for its encoders. Replace
the code with the generic simple encoder.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-14-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/shmobile')
-rw-r--r-- | drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 75a752d59ef1..03556dbfcafb 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -17,6 +17,7 @@ #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> #include <drm/drm_vblank.h> #include "shmob_drm_backlight.h" @@ -558,15 +559,6 @@ static const struct drm_encoder_helper_funcs encoder_helper_funcs = { .mode_set = shmob_drm_encoder_mode_set, }; -static void shmob_drm_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs encoder_funcs = { - .destroy = shmob_drm_encoder_destroy, -}; - int shmob_drm_encoder_create(struct shmob_drm_device *sdev) { struct drm_encoder *encoder = &sdev->encoder.encoder; @@ -576,8 +568,8 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev) encoder->possible_crtcs = 1; - ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs, - DRM_MODE_ENCODER_LVDS, NULL); + ret = drm_simple_encoder_init(sdev->ddev, encoder, + DRM_MODE_ENCODER_LVDS); if (ret < 0) return ret; |