summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/zte/zx_vga.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-03-05 16:59:50 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2020-04-02 14:16:46 +0200
commitb812e5b4aaed827f3d0691543a8c48846db45152 (patch)
tree806814896b0cf2117c4543e477837f9b104053a8 /drivers/gpu/drm/zte/zx_vga.c
parentd19561579d230db8151c93ff54c91c3baa3b037a (diff)
downloadlinux-b812e5b4aaed827f3d0691543a8c48846db45152.tar.gz
linux-b812e5b4aaed827f3d0691543a8c48846db45152.tar.bz2
linux-b812e5b4aaed827f3d0691543a8c48846db45152.zip
drm/zte: Use simple encoder
The zte 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-23-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/zte/zx_vga.c')
-rw-r--r--drivers/gpu/drm/zte/zx_vga.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/zte/zx_vga.c b/drivers/gpu/drm/zte/zx_vga.c
index c4fa3bbaba78..a7ed7f5ca837 100644
--- a/drivers/gpu/drm/zte/zx_vga.c
+++ b/drivers/gpu/drm/zte/zx_vga.c
@@ -14,6 +14,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
+#include <drm/drm_simple_kms_helper.h>
#include "zx_drm_drv.h"
#include "zx_vga_regs.h"
@@ -72,10 +73,6 @@ static const struct drm_encoder_helper_funcs zx_vga_encoder_helper_funcs = {
.disable = zx_vga_encoder_disable,
};
-static const struct drm_encoder_funcs zx_vga_encoder_funcs = {
- .destroy = drm_encoder_cleanup,
-};
-
static int zx_vga_connector_get_modes(struct drm_connector *connector)
{
struct zx_vga *vga = to_zx_vga(connector);
@@ -154,8 +151,7 @@ static int zx_vga_register(struct drm_device *drm, struct zx_vga *vga)
encoder->possible_crtcs = VOU_CRTC_MASK;
- ret = drm_encoder_init(drm, encoder, &zx_vga_encoder_funcs,
- DRM_MODE_ENCODER_DAC, NULL);
+ ret = drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_DAC);
if (ret) {
DRM_DEV_ERROR(dev, "failed to init encoder: %d\n", ret);
return ret;