@@ -338,6 +338,14 @@ 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)
+{
+ if (comp_id < DDP_COMPONENT_ID_MAX)
+ return mtk_ddp_matches[comp_id].type;
+
+ return MTK_DDP_COMP_TYPE_MAX;
+}
+
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)
@@ -202,5 +202,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 */