diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 16:59:46 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 14:16:45 +0200 |
commit | f6ebc1b0f7725ccf5c282b59bd45fc8ef4d7cfd0 (patch) | |
tree | eed9064c937ca0345558d81c7defcb5fbcb5d2a1 /drivers/gpu/drm/vc4/vc4_dsi.c | |
parent | d877d6ea7773b3aa3d03c359c85262fb0468c41a (diff) | |
download | linux-f6ebc1b0f7725ccf5c282b59bd45fc8ef4d7cfd0.tar.bz2 |
drm/vc4: Use simple encoder
The vc4 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>
Acked-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-19-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_dsi.c')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_dsi.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index d99b1d526651..eaf276978ee7 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -37,6 +37,7 @@ #include <drm/drm_of.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> #include "vc4_drv.h" #include "vc4_regs.h" @@ -652,15 +653,6 @@ static const struct debugfs_reg32 dsi1_regs[] = { VC4_REG32(DSI1_ID), }; -static void vc4_dsi_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs vc4_dsi_encoder_funcs = { - .destroy = vc4_dsi_encoder_destroy, -}; - static void vc4_dsi_latch_ulps(struct vc4_dsi *dsi, bool latch) { u32 afec0 = DSI_PORT_READ(PHY_AFEC0); @@ -1615,8 +1607,7 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) if (dsi->port == 1) vc4->dsi1 = dsi; - drm_encoder_init(drm, dsi->encoder, &vc4_dsi_encoder_funcs, - DRM_MODE_ENCODER_DSI, NULL); + drm_simple_encoder_init(drm, dsi->encoder, DRM_MODE_ENCODER_DSI); drm_encoder_helper_add(dsi->encoder, &vc4_dsi_encoder_helper_funcs); ret = drm_bridge_attach(dsi->encoder, dsi->bridge, NULL, 0); @@ -1656,7 +1647,7 @@ static void vc4_dsi_unbind(struct device *dev, struct device *master, * normally. */ list_splice_init(&dsi->bridge_chain, &dsi->encoder->bridge_chain); - vc4_dsi_encoder_destroy(dsi->encoder); + drm_encoder_cleanup(dsi->encoder); if (dsi->port == 1) vc4->dsi1 = NULL; |