* [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc)
@ 2024-04-29 16:14 Marc Gonzalez
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-29 16:14 UTC (permalink / raw
To: Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio, Stanimir Varbanov,
Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Nothing to declare.
Marc Gonzalez (3):
dt-bindings: media: add qcom,msm8998-venus
arm64: dts: qcom: msm8998: add venus node
media: venus: add MSM8998 support
Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++
arch/arm64/boot/dts/qcom/msm8998.dtsi | 48 +++++++++
drivers/media/platform/qcom/venus/core.c | 42 ++++++++
3 files changed, 245 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus
2024-04-29 16:14 [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
@ 2024-04-29 16:15 ` Marc Gonzalez
2024-04-29 23:06 ` Bryan O'Donoghue
2024-04-30 7:54 ` Krzysztof Kozlowski
2024-04-29 16:17 ` [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node Marc Gonzalez
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-29 16:15 UTC (permalink / raw
To: Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio, Stanimir Varbanov,
Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Add YAML binding for Qualcomm MSM8998 Venus HW video encode and decode.
(Based on qcom,msm8996-venus.yaml)
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++
1 file changed, 155 insertions(+)
diff --git a/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
new file mode 100644
index 0000000000000..86a20954cb354
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
@@ -0,0 +1,155 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/qcom,msm8998-venus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm MSM8998 Venus video encode and decode accelerators
+
+maintainers:
+ - Stanimir Varbanov <stanimir.varbanov@linaro.org>
+
+description: |
+ The Venus IP is a video encode and decode accelerator present
+ on Qualcomm platforms
+
+allOf:
+ - $ref: qcom,venus-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,msm8998-venus
+
+ power-domains:
+ maxItems: 1
+
+ clocks:
+ maxItems: 4
+
+ clock-names:
+ items:
+ - const: core
+ - const: iface
+ - const: bus
+ - const: mbus
+
+ interconnects:
+ maxItems: 2
+
+ interconnect-names:
+ items:
+ - const: video-mem
+ - const: cpu-cfg
+
+ iommus:
+ maxItems: 20
+
+ video-decoder:
+ type: object
+
+ properties:
+ compatible:
+ const: venus-decoder
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: core
+
+ power-domains:
+ maxItems: 1
+
+ required:
+ - compatible
+ - clocks
+ - clock-names
+ - power-domains
+
+ additionalProperties: false
+
+ video-encoder:
+ type: object
+
+ properties:
+ compatible:
+ const: venus-encoder
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: core
+
+ power-domains:
+ maxItems: 1
+
+ required:
+ - compatible
+ - clocks
+ - clock-names
+ - power-domains
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - iommus
+ - video-decoder
+ - video-encoder
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/qcom,mmcc-msm8998.h>
+
+ video-codec@cc00000 {
+ compatible = "qcom,msm8998-venus";
+ reg = <0x0cc00000 0xff000>;
+ interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&mmcc VIDEO_TOP_GDSC>;
+ clocks = <&mmcc VIDEO_CORE_CLK>,
+ <&mmcc VIDEO_AHB_CLK>,
+ <&mmcc VIDEO_AXI_CLK>,
+ <&mmcc VIDEO_MAXI_CLK>;
+ clock-names = "core", "iface", "bus", "mbus";
+ iommus = <&mmss_smmu 0x400>,
+ <&mmss_smmu 0x401>,
+ <&mmss_smmu 0x40a>,
+ <&mmss_smmu 0x407>,
+ <&mmss_smmu 0x40e>,
+ <&mmss_smmu 0x40f>,
+ <&mmss_smmu 0x408>,
+ <&mmss_smmu 0x409>,
+ <&mmss_smmu 0x40b>,
+ <&mmss_smmu 0x40c>,
+ <&mmss_smmu 0x40d>,
+ <&mmss_smmu 0x410>,
+ <&mmss_smmu 0x421>,
+ <&mmss_smmu 0x428>,
+ <&mmss_smmu 0x429>,
+ <&mmss_smmu 0x42b>,
+ <&mmss_smmu 0x42c>,
+ <&mmss_smmu 0x42d>,
+ <&mmss_smmu 0x411>,
+ <&mmss_smmu 0x431>;
+ memory-region = <&venus_mem>;
+
+ video-decoder {
+ compatible = "venus-decoder";
+ clocks = <&mmcc VIDEO_SUBCORE0_CLK>;
+ clock-names = "core";
+ power-domains = <&mmcc VIDEO_SUBCORE0_GDSC>;
+ };
+
+ video-encoder {
+ compatible = "venus-encoder";
+ clocks = <&mmcc VIDEO_SUBCORE1_CLK>;
+ clock-names = "core";
+ power-domains = <&mmcc VIDEO_SUBCORE1_GDSC>;
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node
2024-04-29 16:14 [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
@ 2024-04-29 16:17 ` Marc Gonzalez
2024-04-29 23:16 ` Bryan O'Donoghue
2024-04-29 16:19 ` [PATCH v1 3/3] media: venus: add MSM8998 support Marc Gonzalez
2024-04-30 15:53 ` [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
3 siblings, 1 reply; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-29 16:17 UTC (permalink / raw
To: Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio, Stanimir Varbanov,
Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
From: Pierre-Hugues Husson <phhusson@freebox.fr>
Now that the venus clocks are fixed, we can add the DT node.
Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
arch/arm64/boot/dts/qcom/msm8998.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
index 5f5b90a6e2bf1..3d3b1f61c0690 100644
--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
@@ -3010,6 +3010,54 @@ mdss_dsi1_phy: phy@c996400 {
};
};
+ venus: video-codec@cc00000 {
+ compatible = "qcom,msm8998-venus";
+ reg = <0x0cc00000 0xff000>;
+ interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+ power-domains = <&mmcc VIDEO_TOP_GDSC>;
+ clocks = <&mmcc VIDEO_CORE_CLK>,
+ <&mmcc VIDEO_AHB_CLK>,
+ <&mmcc VIDEO_AXI_CLK>,
+ <&mmcc VIDEO_MAXI_CLK>;
+ clock-names = "core", "iface", "bus", "mbus";
+ iommus = <&mmss_smmu 0x400>,
+ <&mmss_smmu 0x401>,
+ <&mmss_smmu 0x40a>,
+ <&mmss_smmu 0x407>,
+ <&mmss_smmu 0x40e>,
+ <&mmss_smmu 0x40f>,
+ <&mmss_smmu 0x408>,
+ <&mmss_smmu 0x409>,
+ <&mmss_smmu 0x40b>,
+ <&mmss_smmu 0x40c>,
+ <&mmss_smmu 0x40d>,
+ <&mmss_smmu 0x410>,
+ <&mmss_smmu 0x421>,
+ <&mmss_smmu 0x428>,
+ <&mmss_smmu 0x429>,
+ <&mmss_smmu 0x42b>,
+ <&mmss_smmu 0x42c>,
+ <&mmss_smmu 0x42d>,
+ <&mmss_smmu 0x411>,
+ <&mmss_smmu 0x431>;
+ memory-region = <&venus_mem>;
+ status = "disabled";
+
+ video-decoder {
+ compatible = "venus-decoder";
+ clocks = <&mmcc VIDEO_SUBCORE0_CLK>;
+ clock-names = "core";
+ power-domains = <&mmcc VIDEO_SUBCORE0_GDSC>;
+ };
+
+ video-encoder {
+ compatible = "venus-encoder";
+ clocks = <&mmcc VIDEO_SUBCORE1_CLK>;
+ clock-names = "core";
+ power-domains = <&mmcc VIDEO_SUBCORE1_GDSC>;
+ };
+ };
+
mmss_smmu: iommu@cd00000 {
compatible = "qcom,msm8998-smmu-v2", "qcom,smmu-v2";
reg = <0x0cd00000 0x40000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v1 3/3] media: venus: add MSM8998 support
2024-04-29 16:14 [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
2024-04-29 16:17 ` [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node Marc Gonzalez
@ 2024-04-29 16:19 ` Marc Gonzalez
2024-04-29 23:19 ` Bryan O'Donoghue
2024-04-30 15:53 ` [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
3 siblings, 1 reply; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-29 16:19 UTC (permalink / raw
To: Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio, Stanimir Varbanov,
Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
From: Pierre-Hugues Husson <phhusson@freebox.fr>
Add the missing bits for MSM8998 support.
Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
drivers/media/platform/qcom/venus/core.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index ce206b7097541..42e0c580e093d 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -587,6 +587,47 @@ static const struct venus_resources msm8996_res = {
.fwname = "qcom/venus-4.2/venus.mbn",
};
+static const struct freq_tbl msm8998_freq_table[] = {
+ { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
+ { 972000, 520000000 }, /* 4k UHD @ 30 */
+ { 489600, 346666667 }, /* 1080p @ 60 */
+ { 244800, 150000000 }, /* 1080p @ 30 */
+ { 108000, 75000000 }, /* 720p @ 30 */
+};
+
+/*
+ * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi
+ */
+static const struct reg_val msm8998_reg_preset[] = {
+ { 0x80124, 0x00000003 },
+ { 0x80550, 0x01111111 },
+ { 0x80560, 0x01111111 },
+ { 0x80568, 0x01111111 },
+ { 0x80570, 0x01111111 },
+ { 0x80580, 0x01111111 },
+ { 0x80588, 0x01111111 },
+ { 0xe2010, 0x00000000 },
+};
+
+static const struct venus_resources msm8998_res = {
+ .freq_tbl = msm8998_freq_table,
+ .freq_tbl_size = ARRAY_SIZE(msm8998_freq_table),
+ .reg_tbl = msm8998_reg_preset,
+ .reg_tbl_size = ARRAY_SIZE(msm8998_reg_preset),
+ .clks = { "core", "iface", "bus", "mbus" },
+ .clks_num = 4,
+ .vcodec0_clks = { "core" },
+ .vcodec1_clks = { "core" },
+ .vcodec_clks_num = 1,
+ .max_load = 2563200,
+ .hfi_version = HFI_VERSION_3XX,
+ .vmem_id = VIDC_RESOURCE_NONE,
+ .vmem_size = 0,
+ .vmem_addr = 0,
+ .dma_mask = 0xddc00000 - 1,
+ .fwname = "qcom/venus-4.4/venus.mbn",
+};
+
static const struct freq_tbl sdm660_freq_table[] = {
{ 979200, 518400000 },
{ 489600, 441600000 },
@@ -893,6 +934,7 @@ static const struct venus_resources sc7280_res = {
static const struct of_device_id venus_dt_match[] = {
{ .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
{ .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
+ { .compatible = "qcom,msm8998-venus", .data = &msm8998_res, },
{ .compatible = "qcom,sdm660-venus", .data = &sdm660_res, },
{ .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
{ .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
@ 2024-04-29 23:06 ` Bryan O'Donoghue
2024-04-30 7:54 ` Krzysztof Kozlowski
1 sibling, 0 replies; 11+ messages in thread
From: Bryan O'Donoghue @ 2024-04-29 23:06 UTC (permalink / raw
To: Marc Gonzalez, Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio,
Stanimir Varbanov, Vikash Garodia
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 29/04/2024 17:15, Marc Gonzalez wrote:
> Add YAML binding for Qualcomm MSM8998 Venus HW video encode and decode.
> (Based on qcom,msm8996-venus.yaml)
>
> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
> ---
> Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++
> 1 file changed, 155 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
> new file mode 100644
> index 0000000000000..86a20954cb354
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
> @@ -0,0 +1,155 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/qcom,msm8998-venus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm MSM8998 Venus video encode and decode accelerators
> +
> +maintainers:
> + - Stanimir Varbanov <stanimir.varbanov@linaro.org>
You should list yourself as maintaining a file you add upstream, plus
I'm pretty sure that's not Stan's current email address.
However, looking at this I think you should just add a new compat to
Documentation/devicetree/bindings/media/qcom,msm8996-venus.yaml since
the rest of the file is 1:1
---
bod
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node
2024-04-29 16:17 ` [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node Marc Gonzalez
@ 2024-04-29 23:16 ` Bryan O'Donoghue
0 siblings, 0 replies; 11+ messages in thread
From: Bryan O'Donoghue @ 2024-04-29 23:16 UTC (permalink / raw
To: Marc Gonzalez, Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio,
Stanimir Varbanov, Vikash Garodia
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 29/04/2024 17:17, Marc Gonzalez wrote:
> From: Pierre-Hugues Husson <phhusson@freebox.fr>
>
> Now that the venus clocks are fixed, we can add the DT node.
>
> Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
> ---
> arch/arm64/boot/dts/qcom/msm8998.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> index 5f5b90a6e2bf1..3d3b1f61c0690 100644
> --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
> @@ -3010,6 +3010,54 @@ mdss_dsi1_phy: phy@c996400 {
> };
> };
>
> + venus: video-codec@cc00000 {
> + compatible = "qcom,msm8998-venus";
> + reg = <0x0cc00000 0xff000>;
> + interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
interconnects are not present on 8998 eek !
> + power-domains = <&mmcc VIDEO_TOP_GDSC>;
> + clocks = <&mmcc VIDEO_CORE_CLK>,
> + <&mmcc VIDEO_AHB_CLK>,
> + <&mmcc VIDEO_AXI_CLK>,
> + <&mmcc VIDEO_MAXI_CLK>;
> + clock-names = "core", "iface", "bus", "mbus";
> + iommus = <&mmss_smmu 0x400>,
> + <&mmss_smmu 0x401>,
> + <&mmss_smmu 0x40a>,
> + <&mmss_smmu 0x407>,
> + <&mmss_smmu 0x40e>,
> + <&mmss_smmu 0x40f>,
> + <&mmss_smmu 0x408>,
> + <&mmss_smmu 0x409>,
> + <&mmss_smmu 0x40b>,
> + <&mmss_smmu 0x40c>,
> + <&mmss_smmu 0x40d>,
> + <&mmss_smmu 0x410>,
> + <&mmss_smmu 0x421>,
> + <&mmss_smmu 0x428>,
> + <&mmss_smmu 0x429>,
> + <&mmss_smmu 0x42b>,
> + <&mmss_smmu 0x42c>,
> + <&mmss_smmu 0x42d>,
> + <&mmss_smmu 0x411>,
> + <&mmss_smmu 0x431>;
> + memory-region = <&venus_mem>;
> + status = "disabled";
> +
> + video-decoder {
> + compatible = "venus-decoder";
> + clocks = <&mmcc VIDEO_SUBCORE0_CLK>;
> + clock-names = "core";
> + power-domains = <&mmcc VIDEO_SUBCORE0_GDSC>;
> + };
> +
> + video-encoder {
> + compatible = "venus-encoder";
> + clocks = <&mmcc VIDEO_SUBCORE1_CLK>;
> + clock-names = "core";
> + power-domains = <&mmcc VIDEO_SUBCORE1_GDSC>;
> + };
> + };
> +
So without interconnects I guess the tip-of-tree kernel is not very
usable for 8998 but, that's not specific to this patch.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
bod
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 3/3] media: venus: add MSM8998 support
2024-04-29 16:19 ` [PATCH v1 3/3] media: venus: add MSM8998 support Marc Gonzalez
@ 2024-04-29 23:19 ` Bryan O'Donoghue
2024-04-30 14:14 ` Marc Gonzalez
0 siblings, 1 reply; 11+ messages in thread
From: Bryan O'Donoghue @ 2024-04-29 23:19 UTC (permalink / raw
To: Marc Gonzalez, Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio,
Stanimir Varbanov, Vikash Garodia
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 29/04/2024 17:19, Marc Gonzalez wrote:
> From: Pierre-Hugues Husson <phhusson@freebox.fr>
>
> Add the missing bits for MSM8998 support.
>
> Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
> ---
> drivers/media/platform/qcom/venus/core.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index ce206b7097541..42e0c580e093d 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -587,6 +587,47 @@ static const struct venus_resources msm8996_res = {
> .fwname = "qcom/venus-4.2/venus.mbn",
> };
>
> +static const struct freq_tbl msm8998_freq_table[] = {
> + { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
> + { 972000, 520000000 }, /* 4k UHD @ 30 */
> + { 489600, 346666667 }, /* 1080p @ 60 */
> + { 244800, 150000000 }, /* 1080p @ 30 */
> + { 108000, 75000000 }, /* 720p @ 30 */
> +};
> +
> +/*
> + * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi
Nice touch.
Does encoding/decoding work on -next sans interconnect support ? I think
we discussed on IRC it does but I'll ask again just to confirm.
> + */
> +static const struct reg_val msm8998_reg_preset[] = {
> + { 0x80124, 0x00000003 },
> + { 0x80550, 0x01111111 },
> + { 0x80560, 0x01111111 },
> + { 0x80568, 0x01111111 },
> + { 0x80570, 0x01111111 },
> + { 0x80580, 0x01111111 },
> + { 0x80588, 0x01111111 },
> + { 0xe2010, 0x00000000 },
> +};
> +
> +static const struct venus_resources msm8998_res = {
> + .freq_tbl = msm8998_freq_table,
> + .freq_tbl_size = ARRAY_SIZE(msm8998_freq_table),
> + .reg_tbl = msm8998_reg_preset,
> + .reg_tbl_size = ARRAY_SIZE(msm8998_reg_preset),
> + .clks = { "core", "iface", "bus", "mbus" },
> + .clks_num = 4,
> + .vcodec0_clks = { "core" },
> + .vcodec1_clks = { "core" },
> + .vcodec_clks_num = 1,
> + .max_load = 2563200,
> + .hfi_version = HFI_VERSION_3XX,
> + .vmem_id = VIDC_RESOURCE_NONE,
> + .vmem_size = 0,
> + .vmem_addr = 0,
> + .dma_mask = 0xddc00000 - 1,
> + .fwname = "qcom/venus-4.4/venus.mbn",
> +};
> +
> static const struct freq_tbl sdm660_freq_table[] = {
> { 979200, 518400000 },
> { 489600, 441600000 },
> @@ -893,6 +934,7 @@ static const struct venus_resources sc7280_res = {
> static const struct of_device_id venus_dt_match[] = {
> { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, },
> { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, },
> + { .compatible = "qcom,msm8998-venus", .data = &msm8998_res, },
> { .compatible = "qcom,sdm660-venus", .data = &sdm660_res, },
> { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, },
> { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, },
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
2024-04-29 23:06 ` Bryan O'Donoghue
@ 2024-04-30 7:54 ` Krzysztof Kozlowski
2024-04-30 10:16 ` Konrad Dybcio
1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-30 7:54 UTC (permalink / raw
To: Marc Gonzalez, Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio,
Stanimir Varbanov, Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 29/04/2024 18:15, Marc Gonzalez wrote:
> Add YAML binding for Qualcomm MSM8998 Venus HW video encode and decode.
> (Based on qcom,msm8996-venus.yaml)
>
> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
> ---
> Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++
> 1 file changed, 155 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
> new file mode 100644
> index 0000000000000..86a20954cb354
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
> @@ -0,0 +1,155 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/qcom,msm8998-venus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm MSM8998 Venus video encode and decode accelerators
> +
> +maintainers:
> + - Stanimir Varbanov <stanimir.varbanov@linaro.org>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The Venus IP is a video encode and decode accelerator present
> + on Qualcomm platforms
> +
> +allOf:
> + - $ref: qcom,venus-common.yaml#
> +
> +properties:
> + compatible:
> + const: qcom,msm8998-venus
> +
> + power-domains:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 4
> +
> + clock-names:
> + items:
> + - const: core
> + - const: iface
> + - const: bus
> + - const: mbus
> +
> + interconnects:
> + maxItems: 2
> +
> + interconnect-names:
> + items:
> + - const: video-mem
> + - const: cpu-cfg
> +
> + iommus:
> + maxItems: 20
> +
> + video-decoder:
> + type: object
> +
> + properties:
> + compatible:
> + const: venus-decoder
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: core
> +
> + power-domains:
> + maxItems: 1
> +
> + required:
> + - compatible
> + - clocks
> + - clock-names
> + - power-domains
> +
> + additionalProperties: false
> +
> + video-encoder:
> + type: object
> +
> + properties:
> + compatible:
> + const: venus-encoder
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: core
> +
> + power-domains:
> + maxItems: 1
> +
> + required:
> + - compatible
> + - clocks
> + - clock-names
> + - power-domains
> +
> + additionalProperties: false
In nested blocks, put it after the type:object, for readability.
> +
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus
2024-04-30 7:54 ` Krzysztof Kozlowski
@ 2024-04-30 10:16 ` Konrad Dybcio
0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2024-04-30 10:16 UTC (permalink / raw
To: Krzysztof Kozlowski, Marc Gonzalez, Bjorn Andersson, Jeffrey Hugo,
Stanimir Varbanov, Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 30.04.2024 9:54 AM, Krzysztof Kozlowski wrote:
> On 29/04/2024 18:15, Marc Gonzalez wrote:
>> Add YAML binding for Qualcomm MSM8998 Venus HW video encode and decode.
>> (Based on qcom,msm8996-venus.yaml)
>>
>> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
>> ---
[...]
>> +
>> + required:
>> + - compatible
>> + - clocks
>> + - clock-names
>> + - power-domains
>> +
>> + additionalProperties: false
>
> In nested blocks, put it after the type:object, for readability.
>
>> +
>
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
https://lore.kernel.org/linux-arm-msm/ba40de82-b308-67b1-5751-bb2d95f2b8a5@linaro.org/
We've since established that the video-encoder/decoder subnodes are bogus
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 3/3] media: venus: add MSM8998 support
2024-04-29 23:19 ` Bryan O'Donoghue
@ 2024-04-30 14:14 ` Marc Gonzalez
0 siblings, 0 replies; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-30 14:14 UTC (permalink / raw
To: Bryan O'Donoghue, Bjorn Andersson, Jeffrey Hugo,
Konrad Dybcio, Stanimir Varbanov, Vikash Garodia
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 30/04/2024 01:19, Bryan O'Donoghue wrote:
> On 29/04/2024 17:19, Marc Gonzalez wrote:
>
>> From: Pierre-Hugues Husson <phhusson@freebox.fr>
>>
>> Add the missing bits for MSM8998 support.
>>
>> Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
>> Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
>> ---
>> drivers/media/platform/qcom/venus/core.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 42 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
>> index ce206b7097541..42e0c580e093d 100644
>> --- a/drivers/media/platform/qcom/venus/core.c
>> +++ b/drivers/media/platform/qcom/venus/core.c
>> @@ -587,6 +587,47 @@ static const struct venus_resources msm8996_res = {
>> .fwname = "qcom/venus-4.2/venus.mbn",
>> };
>>
>> +static const struct freq_tbl msm8998_freq_table[] = {
>> + { 1944000, 520000000 }, /* 4k UHD @ 60 (decode only) */
>> + { 972000, 520000000 }, /* 4k UHD @ 30 */
>> + { 489600, 346666667 }, /* 1080p @ 60 */
>> + { 244800, 150000000 }, /* 1080p @ 30 */
>> + { 108000, 75000000 }, /* 720p @ 30 */
>> +};
>> +
>> +/*
>> + * https://git.codelinaro.org/clo/la/kernel/msm-4.4/-/blob/caf_migration/kernel.lnx.4.4.r38-rel/arch/arm/boot/dts/qcom/msm8998-vidc.dtsi
>
> Nice touch.
>
> Does encoding/decoding work on -next sans interconnect support ? I think
> we discussed on IRC it does but I'll ask again just to confirm.
(We have no use-case for encoding.)
Decoding works, of course.
I would not submit a broken feature :)
(vp9 2560x1440 59.940fps) decodes at x2 (122s for 240s)
(vp9 854x480 29.970fps) decodes at x15 ( 16s for 240s)
I find the performance quite decent.
Though I would have expected a larger performance ratio:
2560x1440 59.940fps = 221 Mpixel/s
854x480 29.970fps = 12 Mpixel/s
If 1440p decodes at x2, 480p should decode at x30 ?
Or maybe the bottleneck is elsewhere :)
Regards
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc)
2024-04-29 16:14 [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
` (2 preceding siblings ...)
2024-04-29 16:19 ` [PATCH v1 3/3] media: venus: add MSM8998 support Marc Gonzalez
@ 2024-04-30 15:53 ` Marc Gonzalez
3 siblings, 0 replies; 11+ messages in thread
From: Marc Gonzalez @ 2024-04-30 15:53 UTC (permalink / raw
To: Bjorn Andersson, Jeffrey Hugo, Konrad Dybcio, Stanimir Varbanov,
Vikash Garodia, Bryan O Donoghue
Cc: MSM, linux-media, DT, Pierre-Hugues Husson, Arnaud Vrac,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Superseded by
Message-ID: <ff646f97-68e3-4fef-9b56-2bd98f0cbe7d@freebox.fr>
Subject: [PATCH v2 0/3] Add support for qcom msm8998-venus (HW vdec / venc)
Date: Tue, 30 Apr 2024 17:28:46 +0200
On 29/04/2024 18:14, Marc Gonzalez wrote:
> Nothing to declare.
>
> Marc Gonzalez (3):
> dt-bindings: media: add qcom,msm8998-venus
> arm64: dts: qcom: msm8998: add venus node
> media: venus: add MSM8998 support
>
> Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml | 155 ++++++++++++++++++++++++++++
> arch/arm64/boot/dts/qcom/msm8998.dtsi | 48 +++++++++
> drivers/media/platform/qcom/venus/core.c | 42 ++++++++
> 3 files changed, 245 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8998-venus.yaml
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-04-30 15:53 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 16:14 [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
2024-04-29 16:15 ` [PATCH v1 1/3] dt-bindings: media: add qcom,msm8998-venus Marc Gonzalez
2024-04-29 23:06 ` Bryan O'Donoghue
2024-04-30 7:54 ` Krzysztof Kozlowski
2024-04-30 10:16 ` Konrad Dybcio
2024-04-29 16:17 ` [PATCH v1 2/3] arm64: dts: qcom: msm8998: add venus node Marc Gonzalez
2024-04-29 23:16 ` Bryan O'Donoghue
2024-04-29 16:19 ` [PATCH v1 3/3] media: venus: add MSM8998 support Marc Gonzalez
2024-04-29 23:19 ` Bryan O'Donoghue
2024-04-30 14:14 ` Marc Gonzalez
2024-04-30 15:53 ` [PATCH v1 0/3] Add support for qcom msm8998-venus (HW vdec / venc) Marc Gonzalez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).