@@ -350,6 +350,16 @@ int mtk_ddp_comp_get_id(struct device_node *node,
return -EINVAL;
}
+enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id)
+{
+ enum mtk_ddp_comp_type comp_type = MTK_DDP_COMP_TYPE_MAX;
+
+ if (comp_id < DDP_COMPONENT_ID_MAX)
+ comp_type = mtk_ddp_matches[comp_id].type;
+
+ return comp_type;
+}
+
int mtk_ddp_comp_init(struct device *dev, struct device_node *node,
struct mtk_ddp_comp *comp, enum mtk_ddp_comp_id comp_id,
const struct mtk_ddp_comp_funcs *funcs)
@@ -198,5 +198,6 @@ void mtk_ddp_write_mask(unsigned int value,
struct mtk_ddp_comp *comp,
unsigned int offset,
unsigned int mask);
+enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id);
#endif /* MTK_DRM_DDP_COMP_H */