summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mediatek/mtk_dsi.c
diff options
context:
space:
mode:
authorCK Hu <ck.hu@mediatek.com>2020-10-12 11:50:47 +0800
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2021-01-07 06:28:16 +0800
commit1d33f13a1be32915f25c63f13100938cb9de4c63 (patch)
tree12fdb080dd1e604259de6b291e92be05b4ce3f64 /drivers/gpu/drm/mediatek/mtk_dsi.c
parent9b0704988b151824a51133dc4c921f4273c5d839 (diff)
downloadlinux-1d33f13a1be32915f25c63f13100938cb9de4c63.tar.bz2
drm/mediatek: DRM driver directly refer to sub driver's function
Some ddp component exist in both display path and other path, so sub driver should not directly call DRM driver's function. Let DRM driver directly refer to sub driver's function so that sub driver need not register these function to DRM driver. Signed-off-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_dsi.c')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_dsi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 3407fc6cd802..c4af04071e23 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -25,6 +25,7 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
+#include "mtk_disp_drv.h"
#include "mtk_drm_ddp_comp.h"
#define DSI_START 0x00
@@ -767,25 +768,20 @@ static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = {
.mode_set = mtk_dsi_bridge_mode_set,
};
-static void mtk_dsi_ddp_start(struct device *dev)
+void mtk_dsi_ddp_start(struct device *dev)
{
struct mtk_dsi *dsi = dev_get_drvdata(dev);
mtk_dsi_poweron(dsi);
}
-static void mtk_dsi_ddp_stop(struct device *dev)
+void mtk_dsi_ddp_stop(struct device *dev)
{
struct mtk_dsi *dsi = dev_get_drvdata(dev);
mtk_dsi_poweroff(dsi);
}
-static const struct mtk_ddp_comp_funcs mtk_dsi_funcs = {
- .start = mtk_dsi_ddp_start,
- .stop = mtk_dsi_ddp_stop,
-};
-
static int mtk_dsi_host_attach(struct mipi_dsi_host *host,
struct mipi_dsi_device *device)
{
@@ -1097,8 +1093,7 @@ static int mtk_dsi_probe(struct platform_device *pdev)
goto err_unregister_host;
}
- ret = mtk_ddp_comp_init(dev->of_node, &dsi->ddp_comp, comp_id,
- &mtk_dsi_funcs);
+ ret = mtk_ddp_comp_init(dev->of_node, &dsi->ddp_comp, comp_id);
if (ret) {
dev_err(dev, "Failed to initialize component: %d\n", ret);
goto err_unregister_host;