diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 16:59:42 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 14:16:45 +0200 |
commit | f9f3a38d16542cb6521a14b4c8ed674c1cae2355 (patch) | |
tree | cfe85f0cee9f6519a0995b9e5ac7dce793f40aeb /drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | |
parent | 2d2e89dafc858444edc30d1c3923920c4e917331 (diff) | |
download | lwn-f9f3a38d16542cb6521a14b4c8ed674c1cae2355.tar.gz lwn-f9f3a38d16542cb6521a14b4c8ed674c1cae2355.zip |
drm/sun4i: Use simple encoder
The ingenic 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-15-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c index e8a317d5ba19..972682bb8000 100644 --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c @@ -10,6 +10,7 @@ #include <drm/drm_crtc_helper.h> #include <drm/drm_of.h> +#include <drm/drm_simple_kms_helper.h> #include "sun8i_dw_hdmi.h" #include "sun8i_tcon_top.h" @@ -29,10 +30,6 @@ sun8i_dw_hdmi_encoder_helper_funcs = { .mode_set = sun8i_dw_hdmi_encoder_mode_set, }; -static const struct drm_encoder_funcs sun8i_dw_hdmi_encoder_funcs = { - .destroy = drm_encoder_cleanup, -}; - static enum drm_mode_status sun8i_dw_hdmi_mode_valid_a83t(struct drm_connector *connector, const struct drm_display_mode *mode) @@ -220,8 +217,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, } drm_encoder_helper_add(encoder, &sun8i_dw_hdmi_encoder_helper_funcs); - drm_encoder_init(drm, encoder, &sun8i_dw_hdmi_encoder_funcs, - DRM_MODE_ENCODER_TMDS, NULL); + drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS); sun8i_hdmi_phy_init(hdmi->phy); |