diff options
author | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-06-15 22:31:06 +0200 |
---|---|---|
committer | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2020-07-05 07:36:31 +0800 |
commit | 45880ff08120dfc15bf1a841c5946dc9eb53240a (patch) | |
tree | 926d2636104499ce3973734174fb2aa3ac15c3b9 | |
parent | 71e780f1158901a832ae1785f2e83221ab07f9d3 (diff) |
drm/mediatek: mtk_dsi: Use simple encoder
The mtk_dsi driver uses an empty implementation for its encoder. Replace
the code with the generic simple encoder.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dsi.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 7ce0eacc6f6b..30959d10db59 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -786,15 +786,6 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi) dsi->enabled = false; } -static void mtk_dsi_encoder_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs mtk_dsi_encoder_funcs = { - .destroy = mtk_dsi_encoder_destroy, -}; - static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi); static void mtk_dsi_destroy_conn_enc(struct mtk_dsi *dsi); @@ -1124,8 +1115,8 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi) { int ret; - ret = drm_encoder_init(drm, &dsi->encoder, &mtk_dsi_encoder_funcs, - DRM_MODE_ENCODER_DSI, NULL); + ret = drm_simple_encoder_init(drm, &dsi->encoder, + DRM_MODE_ENCODER_DSI); if (ret) { DRM_ERROR("Failed to encoder init to drm\n"); return ret; |