aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/shmobile
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-03-05 16:59:41 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2020-04-02 14:16:45 +0200
commit2d2e89dafc858444edc30d1c3923920c4e917331 (patch)
treec6d80fa46deb9727efc1a349ae51f2c2be0c078e /drivers/gpu/drm/shmobile
parentdrm/rockchip: Use simple encoder (diff)
downloadlinux-dev-2d2e89dafc858444edc30d1c3923920c4e917331.tar.xz
linux-dev-2d2e89dafc858444edc30d1c3923920c4e917331.zip
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.c14
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;