From: Moudy Ho <moudy.ho@mediatek.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
<linux-media@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
Moudy Ho <moudy.ho@mediatek.com>
Subject: [PATCH v3 09/13] media: platform: mtk-mdp3: add the blend of component in MUTEX MOD
Date: Fri, 13 Jan 2023 17:03:17 +0800 [thread overview]
Message-ID: <20230113090321.25128-10-moudy.ho@mediatek.com> (raw)
In-Reply-To: <20230113090321.25128-1-moudy.ho@mediatek.com>
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(+)
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
index 72b5dc4cb3b1..f21dfce9098e 100644
--- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
+++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
@@ -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);
diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.h
index d9442679cf53..c91d87359b17 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
next prev parent reply other threads:[~2023-01-13 9:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 9:03 [PATCH v3 00/13] add support MDP3 on MT8195 platform Moudy Ho
2023-01-13 9:03 ` [PATCH v3 01/13] dt-binding: mediatek: add bindings for MediaTek mt8195 MDP3 components Moudy Ho
2023-01-13 10:23 ` Krzysztof Kozlowski
2023-01-16 2:12 ` Moudy Ho (何宗原)
2023-01-13 9:03 ` [PATCH v3 02/13] arm64: dts: mediatek: mt8195: add MDP3 nodes Moudy Ho
2023-01-13 9:03 ` [PATCH v3 03/13] media: platform: mtk-mdp3: add support second sets of MMSYS Moudy Ho
2023-01-13 9:03 ` [PATCH v3 04/13] media: platform: mtk-mdp3: add support second sets of MUTEX Moudy Ho
2023-01-13 9:03 ` [PATCH v3 05/13] media: platform: mtk-mdp3: introduce more MDP3 components Moudy Ho
2023-01-13 9:03 ` [PATCH v3 06/13] media: platform: mtk-mdp3: add checks for dummy components Moudy Ho
2023-01-13 9:03 ` [PATCH v3 07/13] media: platform: mtk-mdp3: avoid multiple driver registrations Moudy Ho
2023-01-13 9:03 ` [PATCH v3 08/13] media: platform: mtk-mdp3: extend GCE event waiting in RDMA and WROT Moudy Ho
2023-01-13 9:03 ` Moudy Ho [this message]
2023-01-13 9:03 ` [PATCH v3 10/13] media: platform: mtk-mdp3: add mt8195 platform configuration Moudy Ho
2023-01-13 9:03 ` [PATCH v3 11/13] media: platform: mtk-mdp3: add mt8195 shared memory configurations Moudy Ho
2023-01-13 9:03 ` [PATCH v3 12/13] media: platform: mtk-mdp3: add mt8195 MDP3 component settings Moudy Ho
2023-01-13 9:03 ` [PATCH v3 13/13] media: platform: mtk-mdp3: add support for parallel pipe to improve FPS Moudy Ho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230113090321.25128-10-moudy.ho@mediatek.com \
--to=moudy.ho@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=chunkuang.hu@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox