From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Matthias Brugger <matthias.bgg@gmail.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: "AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
kernel@collabora.com,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Chen-Yu Tsai" <wenst@chromium.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Michael Turquette" <mturquette@baylibre.com>,
"Miles Chen" <miles.chen@mediatek.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Stephen Boyd" <sboyd@kernel.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH 5/6] clk: mediatek: mt8183: Add CLK_VDEC_ACTIVE to vdec
Date: Mon, 5 Jun 2023 12:20:29 -0400 [thread overview]
Message-ID: <20230605162030.274395-6-nfraprado@collabora.com> (raw)
In-Reply-To: <20230605162030.274395-1-nfraprado@collabora.com>
Add the CLK_VDEC_ACTIVE clock to the vdec clock driver. This clock is
enabled by the VPU once it starts decoding.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
drivers/clk/mediatek/clk-mt8183-vdec.c | 5 +++++
include/dt-bindings/clock/mt8183-clk.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mt8183-vdec.c b/drivers/clk/mediatek/clk-mt8183-vdec.c
index 513b7956cbea..5830934a6d25 100644
--- a/drivers/clk/mediatek/clk-mt8183-vdec.c
+++ b/drivers/clk/mediatek/clk-mt8183-vdec.c
@@ -27,6 +27,10 @@ static const struct mtk_gate_regs vdec1_cg_regs = {
GATE_MTK(_id, _name, _parent, &vdec0_cg_regs, _shift, \
&mtk_clk_gate_ops_setclr_inv)
+#define GATE_VDEC0(_id, _name, _parent, _shift) \
+ GATE_MTK(_id, _name, _parent, &vdec0_cg_regs, _shift, \
+ &mtk_clk_gate_ops_setclr)
+
#define GATE_VDEC1_I(_id, _name, _parent, _shift) \
GATE_MTK(_id, _name, _parent, &vdec1_cg_regs, _shift, \
&mtk_clk_gate_ops_setclr_inv)
@@ -34,6 +38,7 @@ static const struct mtk_gate_regs vdec1_cg_regs = {
static const struct mtk_gate vdec_clks[] = {
/* VDEC0 */
GATE_VDEC0_I(CLK_VDEC_VDEC, "vdec_vdec", "mm_sel", 0),
+ GATE_VDEC0(CLK_VDEC_ACTIVE, "vdec_active", "mm_sel", 4),
/* VDEC1 */
GATE_VDEC1_I(CLK_VDEC_LARB1, "vdec_larb1", "mm_sel", 0),
};
diff --git a/include/dt-bindings/clock/mt8183-clk.h b/include/dt-bindings/clock/mt8183-clk.h
index a7b470b0ec8a..32dd7d91dbe2 100644
--- a/include/dt-bindings/clock/mt8183-clk.h
+++ b/include/dt-bindings/clock/mt8183-clk.h
@@ -357,7 +357,8 @@
/* VDEC_GCON */
#define CLK_VDEC_VDEC 0
#define CLK_VDEC_LARB1 1
-#define CLK_VDEC_NR_CLK 2
+#define CLK_VDEC_ACTIVE 2
+#define CLK_VDEC_NR_CLK 3
/* VENC_GCON */
#define CLK_VENC_LARB 0
--
2.40.1
next prev parent reply other threads:[~2023-06-05 16:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 16:20 [PATCH 0/6] Enable decoder for mt8183 Nícolas F. R. A. Prado
2023-06-05 16:20 ` [PATCH 1/6] media: dt-bindings: mediatek,vcodec: Allow single clock " Nícolas F. R. A. Prado
2023-06-06 6:36 ` Matthias Brugger
2023-06-06 7:28 ` AngeloGioacchino Del Regno
2023-06-06 9:12 ` Krzysztof Kozlowski
2023-06-05 16:20 ` [PATCH 2/6] media: dt-bindings: mediatek,vcodec: Don't require assigned-clocks Nícolas F. R. A. Prado
2023-06-06 6:36 ` Matthias Brugger
2023-06-06 7:28 ` AngeloGioacchino Del Regno
2023-06-06 9:12 ` Krzysztof Kozlowski
2023-06-05 16:20 ` [PATCH 3/6] media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183 Nícolas F. R. A. Prado
2023-06-06 7:30 ` AngeloGioacchino Del Regno
2023-06-06 9:16 ` Krzysztof Kozlowski
2023-06-07 19:58 ` Nícolas F. R. A. Prado
2023-06-05 16:20 ` Nícolas F. R. A. Prado [this message]
2023-06-06 7:39 ` [PATCH 5/6] clk: mediatek: mt8183: Add CLK_VDEC_ACTIVE to vdec AngeloGioacchino Del Regno
2023-06-05 16:20 ` [PATCH 6/6] arm64: dts: mediatek: mt8183: Add decoder Nícolas F. R. A. Prado
2023-06-06 7:40 ` AngeloGioacchino Del Regno
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=20230605162030.274395-6-nfraprado@collabora.com \
--to=nfraprado@collabora.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=miles.chen@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=wenst@chromium.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