diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 18:59:34 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 15:16:44 +0300 |
commit | 785b07e1ba600b09a612168ea4445f12bd9bfd07 (patch) | |
tree | 3bd01f80d91050f0b4486402490c59ad54255e59 /drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | |
parent | d088b69f5017f86628a875592414545ba23938f8 (diff) | |
download | linux-785b07e1ba600b09a612168ea4445f12bd9bfd07.tar.xz |
drm/hisilicon/kirin: Use simple encoder
The kirin 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>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c')
-rw-r--r-- | drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c index d399c1077242..00e87c290796 100644 --- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c +++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c @@ -24,6 +24,7 @@ #include <drm/drm_of.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> #include "dw_dsi_reg.h" @@ -695,10 +696,6 @@ static const struct drm_encoder_helper_funcs dw_encoder_helper_funcs = { .disable = dsi_encoder_disable }; -static const struct drm_encoder_funcs dw_encoder_funcs = { - .destroy = drm_encoder_cleanup, -}; - static int dw_drm_encoder_init(struct device *dev, struct drm_device *drm_dev, struct drm_encoder *encoder) @@ -712,8 +709,7 @@ static int dw_drm_encoder_init(struct device *dev, } encoder->possible_crtcs = crtc_mask; - ret = drm_encoder_init(drm_dev, encoder, &dw_encoder_funcs, - DRM_MODE_ENCODER_DSI, NULL); + ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_DSI); if (ret) { DRM_ERROR("failed to init dsi encoder\n"); return ret; |