[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230208092209.19472-13-moudy.ho@mediatek.com>
Date: Wed, 8 Feb 2023 17:22:05 +0800
From: Moudy Ho <moudy.ho@...iatek.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>
CC: <linux-media@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>,
Moudy Ho <moudy.ho@...iatek.com>
Subject: [PATCH v4 12/16] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD
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@...iatek.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
Powered by blists - more mailing lists