aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mediatek/mtk_dpi.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_dpi.c
parent9b0704988b151824a51133dc4c921f4273c5d839 (diff)
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_dpi.c')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_dpi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index c904ed2ead56..3c23d682fc57 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -24,6 +24,7 @@
#include <drm/drm_of.h>
#include <drm/drm_simple_kms_helper.h>
+#include "mtk_disp_drv.h"
#include "mtk_dpi_regs.h"
#include "mtk_drm_ddp_comp.h"
@@ -562,25 +563,20 @@ static const struct drm_bridge_funcs mtk_dpi_bridge_funcs = {
.enable = mtk_dpi_bridge_enable,
};
-static void mtk_dpi_start(struct device *dev)
+void mtk_dpi_start(struct device *dev)
{
struct mtk_dpi *dpi = dev_get_drvdata(dev);
mtk_dpi_power_on(dpi);
}
-static void mtk_dpi_stop(struct device *dev)
+void mtk_dpi_stop(struct device *dev)
{
struct mtk_dpi *dpi = dev_get_drvdata(dev);
mtk_dpi_power_off(dpi);
}
-static const struct mtk_ddp_comp_funcs mtk_dpi_funcs = {
- .start = mtk_dpi_start,
- .stop = mtk_dpi_stop,
-};
-
static int mtk_dpi_bind(struct device *dev, struct device *master, void *data)
{
struct mtk_dpi *dpi = dev_get_drvdata(dev);
@@ -775,8 +771,7 @@ static int mtk_dpi_probe(struct platform_device *pdev)
return comp_id;
}
- ret = mtk_ddp_comp_init(dev->of_node, &dpi->ddp_comp, comp_id,
- &mtk_dpi_funcs);
+ ret = mtk_ddp_comp_init(dev->of_node, &dpi->ddp_comp, comp_id);
if (ret) {
dev_err(dev, "Failed to initialize component: %d\n", ret);
return ret;