[PATCH v9 0/8] media: qcom: venus: add MSM8939 support

From: Erikas Bitovtas

Date: Tue May 26 2026 - 09:37:29 EST


This patch series adds support for Venus on MSM8939. It is mostly
similar to MSM8916 Venus, except it needs two additional cores to be
powered on before it can start decoding.

As per Dmitry's request, I am attaching Fluster results and
v4l2-compliance output. Fluster results were very inconsistent and
caused power collapse fails.
H.264: https://pastebin.com/C15qeq5W
H.265 (HEVC): https://pastebin.com/WDsnxvuk
VP8: https://pastebin.com/egAgEm15
v4l2-compliance: https://pastebin.com/VpBhEFc1
Power collapse fail log: https://pastebin.com/rTivMcpK

Signed-off-by: Erikas Bitovtas <xerikasxx@xxxxxxxxx>
---
Changes in v9:
- Squashed conversion of MSM8916 to a new blacklisting mechanism back
into one commit.
- Extracted passing hardware control to GDSCs into a new function. Power
control is now passed to hardware after core clocks are enabled, not
before.
- Set halt check for Venus core clocks to BRANCH_HALT.
- Link to v8: https://patch.msgid.link/20260519-msm8939-venus-rfc-v8-0-542ec7557ebc@xxxxxxxxx

Changes in v8:
- Only enable vcodec clks if power domains attatched to them are
present.
- Reworded GDSC clock commit. Frankly, I'm not sure why exactly it
happens, I only know that if I don't set this flag and pass control to
hardware, the cores won't power up.
- Extracted conversion of MSM8916 to a new blacklisting mechanism into a
commit of its own.
- Fixed GDSC power domain not being powered off after failing to pass
control to hardware.
- Reordered commits to include schema first, then driver changes, then
device tree source.
- Link to v7: https://patch.msgid.link/20260514-msm8939-venus-rfc-v7-0-33c6c6fb9285@xxxxxxxxx

Changes in v7:
- Moved codec blacklist mechanism to be applied before MSM8939 struct is
added.
- Vcodec power domains are attached with a managed method now.
- Removed duplicate clock rates in msm8939_freq_tbl.
- Redid the merge of vcodec_clks done in v5.
- Removed the {vdec,venc}_{get,power}() methods and moved them to their
respective core_* parts. Vcodec cores are now powered up along with
the core.
- Switched HW_CTRL to HW_CTRL_TRIGGER in Venus core GDSCs. They are now
powered up first, then their control is passed to hardware.
- For now, document just the change of halt check in the commit message
of setting GDSCs to hardware controlled. I'm not sure what happens
exactly, but if they are set to BRANCH_HALT, probing the driver fails:
https://pastebin.com/EYQekR1p
- Given the power management behavior has changed substantially in the
power domain enable logic patch, I removed Bryan's "Reviewed-by: "
tag.
- Link to v6: https://patch.msgid.link/20260510-msm8939-venus-rfc-v6-0-e69465375900@xxxxxxxxx

Changes in v6:
- Added a more generic mechanism on blacklisting codecs.
- Reworded a commit for setting Venus core GDSCs to hardware controlled.
- Reworded a commit for adding HEVC decoding to MSM8939.
- Link to v5: https://patch.msgid.link/20260507-msm8939-venus-rfc-v5-0-d7b5ea2ce591@xxxxxxxxx

Changes in v5:
- Undid the merge of vcodec_clks, they are split back to
vcodec{0,1}_clks now.
- Extracted a dev_pm_domain_attach_list() call into a function of its
own to reduce nesting.
- Added missing "power-domain-names" required property to device tree
binding.
- Renamed vcodec clocks and power domains to match other Venus bindings.
- Reordered commits and grouped them by subsystems. Now first come DTB
patches, then clock, then media.
- Removed "status = "disabled"" in the device tree example.
- Link to v4: https://patch.msgid.link/20260506-msm8939-venus-rfc-v4-0-994f5eb22acb@xxxxxxxxx

Changes in v4:
- Removed vcodec{0,1}_pmdomains and merged vcodec{0,1}_clks into
vcodec_clks instead for MSM8939.
- Inlined video decoder and encoder device tree nodes in the driver and
removed them from the binding.
- Kept vdec and venc methods for HFI v3 separate from HFI v1.
- {vdec,venc}_get() are now called as early as before, since it is no
longer needed for us to attach power domains to dev_dec and dev_enc.
- Link to v3: https://patch.msgid.link/20260427-msm8939-venus-rfc-v3-0-288195bb7917@xxxxxxxxx

Changes in v3:
- Added missing vcodec1_clks to resource struct.
- Removed enc_nodename from resource struct since we include
video-decoder now.
- Link to v2: https://patch.msgid.link/20260425-msm8939-venus-rfc-v2-0-f69e52b36207@xxxxxxxxx

Changes in v2:
- Enabled GDSCs during encoding as well.
- Merged vcodec{0,1}_pmdomains_num into vcodec_pmdomains_num.
- Reworded commit for marking GDSCs as hardware controlled. Same
situation as in cdc59600bccf ("clk: qcom: gcc-msm8953: fix stuck venus0_core0 clock")
- Clarified the reason for missing firmware-name property in device
tree.
- Clarified the reason for moving vdec_get and venc_get for later.
- Link to v1: https://patch.msgid.link/20260416-msm8939-venus-rfc-v1-0-a09fcf2c23df@xxxxxxxxx

To: Bryan O'Donoghue <bod@xxxxxxxxxx>
To: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
To: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: André Apitzsch <git@xxxxxxxxxxx>
To: Erikas Bitovtas <xerikasxx@xxxxxxxxx>
To: Bjorn Andersson <andersson@xxxxxxxxxx>
To: Konrad Dybcio <konradybcio@xxxxxxxxxx>
To: Michael Turquette <mturquette@xxxxxxxxxxxx>
To: Stephen Boyd <sboyd@xxxxxxxxxx>
To: Brian Masney <bmasney@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: linux-media@xxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-clk@xxxxxxxxxxxxxxx

---
André Apitzsch (4):
media: dt-bindings: venus: Add qcom,msm8939 schema
media: qcom: venus: Add msm8939 resource struct
arm64: dts: qcom: msm8939: Add venus node
arm64: dts: qcom: msm8939-longcheer-l9100: Enable venus node

Erikas Bitovtas (4):
clk: qcom: gcc-msm8939: mark Venus core GDSCs as hardware controlled
media: qcom: venus: add power domain enable logic for Venus cores
media: qcom: venus: add codec blacklist mechanism
arm64: dts: qcom: msm8939-asus-z00t: add Venus

.../bindings/media/qcom,msm8939-venus.yaml | 79 +++++++++++
arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts | 8 ++
.../boot/dts/qcom/msm8939-longcheer-l9100.dts | 8 ++
arch/arm64/boot/dts/qcom/msm8939.dtsi | 23 ++++
drivers/clk/qcom/gcc-msm8939.c | 4 +
drivers/media/platform/qcom/venus/core.c | 45 +++++++
drivers/media/platform/qcom/venus/core.h | 5 +
drivers/media/platform/qcom/venus/hfi_parser.c | 10 +-
drivers/media/platform/qcom/venus/pm_helpers.c | 146 ++++++++++++++++++++-
9 files changed, 318 insertions(+), 10 deletions(-)
---
base-commit: d387b06f7c15b4639244ad66b4b0900c6a02b430
change-id: 20260416-msm8939-venus-rfc-c025c4c74fae

Best regards,
--
Erikas Bitovtas <xerikasxx@xxxxxxxxx>