[v3,09/13] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD
Commit Message
In further chips, some components will cooperate to achieve
advanced functions, and these MODs need to be set at the same time.
Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 6 ++++++
drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h | 6 ++++++
2 files changed, 12 insertions(+)
@@ -122,6 +122,7 @@ static int mdp_path_subfrm_require(const struct mdp_path *path,
/* Set mutex mod */
for (index = 0; index < num_comp; index++) {
s32 inner_id = MDP_COMP_NONE;
+ const struct mdp_comp_blend *b;
if (CFG_CHECK(MT8183, p_id))
inner_id = CFG_GET(MT8183, path->config, components[index].type);
@@ -133,6 +134,11 @@ static int mdp_path_subfrm_require(const struct mdp_path *path,
id = ctx->comp->public_id;
mtk_mutex_write_mod(mutex, data->mdp_mutex_table_idx[id], false);
+ b = &data->comp_data[id].blend;
+ if (b->mod_aid)
+ mtk_mutex_write_mod(mutex,
+ data->mdp_mutex_table_idx[b->mod_id],
+ false);
}
mtk_mutex_write_sof(mutex, MUTEX_SOF_IDX_SINGLE_MODE);
@@ -201,9 +201,15 @@ struct mdp_comp_info {
u32 dts_reg_ofst;
};
+struct mdp_comp_blend {
+ bool mod_aid;
+ enum mtk_mdp_comp_id mod_id;
+};
+
struct mdp_comp_data {
struct mdp_comp_match match;
struct mdp_comp_info info;
+ struct mdp_comp_blend blend;
};
struct mdp_comp_ops;