[PATCH v4 12/16] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD
Moudy Ho
moudy.ho at mediatek.com
Wed Feb 8 01:22:05 PST 2023
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 at 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(+)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index 6204173ecc5d..259217233570 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
@@ -117,6 +117,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);
@@ -128,6 +129,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);
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h
index 09e46dfe4f02..9a72020ef26f 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h
@@ -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;
--
2.18.0
More information about the Linux-mediatek
mailing list