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

Yongqiang Niu yongqiang.niu at mediatek.com
Wed Mar 13 12:00:51 UTC 2019


An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190313/f91d628c/attachment.html>
-------------- next part --------------
This patch add function to connect module with it's previous one

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

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,
-- 
1.8.1.1.dirty


More information about the dri-devel mailing list