diff mbox series

[RESEND,v1,12/18] drm/mediatek: add function to connect module with it's previous one

Message ID 1552469111-8014-13-git-send-email-yongqiang.niu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series add drm support for MT8183 | expand

Commit Message

Yongqiang Niu March 13, 2019, 9:25 a.m. UTC
This patch add function to connect module with it's previous one

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
index b0064c52..f2ab0b3 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
@@ -91,6 +91,7 @@  struct mtk_ddp_comp_funcs {
 			     struct mtk_plane_state *state);
 	void (*gamma_set)(struct mtk_ddp_comp *comp,
 			  struct drm_crtc_state *state);
+	void (*connect)(struct mtk_ddp_comp *comp, enum mtk_ddp_comp_id prev);
 };
 
 struct mtk_ddp_comp {
@@ -172,6 +173,13 @@  static inline void mtk_ddp_gamma_set(struct mtk_ddp_comp *comp,
 		comp->funcs->gamma_set(comp, state);
 }
 
+static inline void mtk_ddp_comp_connect(struct mtk_ddp_comp *comp,
+					enum mtk_ddp_comp_id prev)
+{
+	if (comp->funcs && comp->funcs->connect)
+		comp->funcs->connect(comp, prev);
+}
+
 int mtk_ddp_comp_get_id(struct device_node *node,
 			enum mtk_ddp_comp_type comp_type);
 int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node,