Skip to content

Commit b28ad7d

Browse files
committed
drm/tidss: Use simple encoder
The tidss driver uses an empty implementation for its encoder. 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> Acked-by: Jyri Sarha <jsarha@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-17-tzimmermann@suse.de
1 parent 4d0e95e commit b28ad7d

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎drivers/gpu/drm/tidss/tidss_encoder.c‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99
#include <drm/drm_crtc.h>
1010
#include <drm/drm_crtc_helper.h>
11-
#include <drm/drm_panel.h>
1211
#include <drm/drm_of.h>
12+
#include <drm/drm_panel.h>
13+
#include <drm/drm_simple_kms_helper.h>
1314

1415
#include "tidss_crtc.h"
1516
#include "tidss_drv.h"
@@ -59,10 +60,6 @@ static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
5960
.atomic_check = tidss_encoder_atomic_check,
6061
};
6162

62-
static const struct drm_encoder_funcs encoder_funcs = {
63-
.destroy = drm_encoder_cleanup,
64-
};
65-
6663
struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
6764
u32 encoder_type, u32 possible_crtcs)
6865
{
@@ -75,8 +72,7 @@ struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
7572

7673
enc->possible_crtcs = possible_crtcs;
7774

78-
ret = drm_encoder_init(&tidss->ddev, enc, &encoder_funcs,
79-
encoder_type, NULL);
75+
ret = drm_simple_encoder_init(&tidss->ddev, enc, encoder_type);
8076
if (ret < 0)
8177
return ERR_PTR(ret);
8278

0 commit comments

Comments
 (0)