media: qcom: venus: add MSM8939 support
Subsystems (6)
v10 cover media: qcom: venus: add MSM8939 support
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
---
Changes in v10:
- Drop applied patches
- Apply R-b tags
- Extend commit message (halt check)
- Improve format of video-codec@1d00000 node
- Link to v9: https://patch.msgid.link/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
To: Bryan O'Donoghue <[email protected]>
To: Vikash Garodia <[email protected]>
To: Mauro Carvalho Chehab <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: André Apitzsch <[email protected]>
To: Erikas Bitovtas <[email protected]>
To: Bjorn Andersson <[email protected]>
To: Konrad Dybcio <[email protected]>
To: Michael Turquette <[email protected]>
To: Stephen Boyd <[email protected]>
To: Brian Masney <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: ~postmarketos/[email protected]
Cc: [email protected]
---
André Apitzsch (2):
arm64: dts: qcom: msm8939: Add venus node
arm64: dts: qcom: msm8939-longcheer-l9100: Enable venus node
Erikas Bitovtas (2):
clk: qcom: gcc-msm8939: mark Venus core GDSCs as hardware controlled
arm64: dts: qcom: msm8939-asus-z00t: add Venus
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 | 26 ++++++++++++++++++++++ drivers/clk/qcom/gcc-msm8939.c | 4 ++++ 4 files changed, 46 insertions(+)
---
base-commit: 415606a7be939835db9b0d6b711887586646346d
change-id: 20260416-msm8939-venus-rfc-c025c4c74fae
Best regards,
Signature · 1 line
André Apitzsch <[email protected]>
PATCH v10 1/4 clk: qcom: gcc-msm8939: mark Venus core GDSCs as hardware controlled
From: Erikas Bitovtas <[email protected]>
Allow Venus core GDSCs to have their control passed to hardware, so they can be powered on by Venus firmware and explicitly state that the vcodec clocks' halt bit should be checked.
--- drivers/clk/qcom/gcc-msm8939.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/clk/qcom/gcc-msm8939.c +4 -0
@@ -3665,6 +3665,7 @@ static struct clk_branch gcc_venus0_vcodec0_clk = {static struct clk_branch gcc_venus0_core0_vcodec0_clk = { .halt_reg =0x4c02c , + .halt_check =BRANCH_HALT , .clkr = { .enable_reg =0x4c02c , .enable_mask =BIT (0 ),
@@ -3682,6 +3683,7 @@ static struct clk_branch gcc_venus0_core0_vcodec0_clk = {static struct clk_branch gcc_venus0_core1_vcodec0_clk = { .halt_reg =0x4c034 , + .halt_check =BRANCH_HALT , .clkr = { .enable_reg =0x4c034 , .enable_mask =BIT (0 ),
@@ -3754,6 +3756,7 @@ static struct gdsc venus_core0_gdsc = { .pd = { .name = "venus_core0", }, + .flags = HW_CTRL_TRIGGER, .pwrsts = PWRSTS_OFF_ON, };
@@ -3762,6 +3765,7 @@ static struct gdsc venus_core1_gdsc = { .pd = { .name = "venus_core1", }, + .flags = HW_CTRL_TRIGGER, .pwrsts = PWRSTS_OFF_ON, };
Signature · 1 line
2.55.0
PATCH v10 2/4 arm64: dts: qcom: msm8939: Add venus node
In reply to André ApitzschAdd DT entries for the msm8939 venus encoder/decoder.
--- arch/arm64/boot/dts/qcom/msm8939.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/arm64/boot/dts/qcom/msm8939.dtsi +26 -0
@@ -1627,6 +1627,32 @@ opp-19200000 { }; }; + venus: video-codec@1d00000 { + compatible = "qcom,msm8939-venus"; + reg = <0x01d00000 0xff000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_VENUS0_VCODEC0_CLK>, + <&gcc GCC_VENUS0_AHB_CLK>, + <&gcc GCC_VENUS0_AXI_CLK>, + <&gcc GCC_VENUS0_CORE0_VCODEC0_CLK>, + <&gcc GCC_VENUS0_CORE1_VCODEC0_CLK>; + clock-names = "core", + "iface", + "bus", + "vcodec0_core", + "vcodec1_core"; + power-domains = <&gcc VENUS_GDSC>, + <&gcc VENUS_CORE0_GDSC>, + <&gcc VENUS_CORE1_GDSC>; + power-domain-names = "venus", + "vcodec0", + "vcodec1"; + iommus = <&apps_iommu 5>; + memory-region = <&venus_mem>; + + status = "disabled"; + }; + apps_iommu: iommu@1ef0000 { compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1"; reg = <0x01ef0000 0x3000>;
Signature · 1 line
2.55.0
PATCH v10 3/4 arm64: dts: qcom: msm8939-longcheer-l9100: Enable venus node
In reply to André ApitzschEnable the venus node so that the video encoder/decoder will start working.
Default paths for firmware work on BQ Aquaris M5, which means firmware-name property can be left out.
--- arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts +8 -0
@@ -314,6 +314,14 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; };
Signature · 1 line
2.55.0
PATCH v10 4/4 arm64: dts: qcom: msm8939-asus-z00t: add Venus
In reply to André ApitzschFrom: Erikas Bitovtas <[email protected]>
Enable Venus video encoder/decoder for Asus ZenFone 2 Laser/Selfie.
Default firmware paths work on Asus ZenFone 2 Laser/Selfie, which means firmware-name property can be left out.
--- arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts +8 -0
@@ -267,6 +267,14 @@ &usb_hs_phy { extcon = <&usb_id>; }; +&venus { + status = "okay"; +}; + +&venus_mem { + status = "okay"; +}; + &wcnss { status = "okay"; };
Signature · 1 line
2.55.0
Re: (subset) [PATCH v10 0/4] media: qcom: venus: add MSM8939 support
In reply to André ApitzschQuoted 13 lines · André Apitzsch
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
Quoted 1 line
[...]
Applied, thanks!
[1/4] clk: qcom: gcc-msm8939: mark Venus core GDSCs as hardware controlled
commit: 04352db59676ec384fae25ecf1e982a0afa62139
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>
Re: (subset) [PATCH v10 0/4] media: qcom: venus: add MSM8939 support
In reply to André ApitzschQuoted 13 lines · André Apitzsch
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
Quoted 1 line
[...]
Applied, thanks!
[1/4] clk: qcom: gcc-msm8939: mark Venus core GDSCs as hardware controlled
commit: 7bc58e0aca2ac92967c265af67d3adc11d61ff6a
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>
Re: (subset) [PATCH v10 0/4] media: qcom: venus: add MSM8939 support
In reply to André ApitzschQuoted 13 lines · André Apitzsch
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
Quoted 1 line
[...]
Applied, thanks!
[4/4] arm64: dts: qcom: msm8939-asus-z00t: add Venus
commit: bb92958ea1012d8fdee55fa9254e420b8fb1b6f8
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>