Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sc7280: enable venus node
@ 2024-10-04 10:52 Vedang Nagar
  2024-10-06  3:32 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Vedang Nagar @ 2024-10-04 10:52 UTC (permalink / raw)
  To: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, Vedang Nagar

Enable the venus node on Qualcomm sc7280. It was made disabled
earlier to avoid bootup crash, which is fixed now with [1].

[1]
https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/

Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 3d8410683402fd4c03c5c2951721938fff20fc77..59dafbeeab1dfd6e1b021335ba1b04767d6c24e5 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -4288,8 +4288,6 @@ venus: video-codec@aa00000 {
 			iommus = <&apps_smmu 0x2180 0x20>;
 			memory-region = <&video_mem>;
 
-			status = "disabled";
-
 			video-decoder {
 				compatible = "venus-decoder";
 			};

---
base-commit: 81ee62e8d09ee3c7107d11c8bbfd64073ab601ad
change-id: 20241003-venus_sc7280-642a6b81afe1
prerequisite-change-id: 20240913-qcm6490-clock-configs-0239f30babb5:v1
prerequisite-patch-id: faac726ebdf08240ab0913132beb2c620e52a98a

Best regards,
-- 
Vedang Nagar <quic_vnagar@quicinc.com>


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-10-04 10:52 [PATCH] arm64: dts: qcom: sc7280: enable venus node Vedang Nagar
@ 2024-10-06  3:32 ` Bjorn Andersson
  2024-10-06  8:26 ` Krzysztof Kozlowski
  2024-10-06 19:50 ` Dmitry Baryshkov
  2 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2024-10-06  3:32 UTC (permalink / raw)
  To: Vedang Nagar
  Cc: cros-qcom-dts-watchers, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel

On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> Enable the venus node on Qualcomm sc7280. It was made disabled
> earlier to avoid bootup crash, which is fixed now with [1].
> 
> [1]
> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/

Please refer to commits by sha1 and subject, not by links to the patch.


Please also clarify in your commit message why venus should be enabled
by default at platform level.

Regards,
Bjorn

> 
> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index 3d8410683402fd4c03c5c2951721938fff20fc77..59dafbeeab1dfd6e1b021335ba1b04767d6c24e5 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -4288,8 +4288,6 @@ venus: video-codec@aa00000 {
>  			iommus = <&apps_smmu 0x2180 0x20>;
>  			memory-region = <&video_mem>;
>  
> -			status = "disabled";
> -
>  			video-decoder {
>  				compatible = "venus-decoder";
>  			};
> 
> ---
> base-commit: 81ee62e8d09ee3c7107d11c8bbfd64073ab601ad
> change-id: 20241003-venus_sc7280-642a6b81afe1
> prerequisite-change-id: 20240913-qcm6490-clock-configs-0239f30babb5:v1
> prerequisite-patch-id: faac726ebdf08240ab0913132beb2c620e52a98a
> 
> Best regards,
> -- 
> Vedang Nagar <quic_vnagar@quicinc.com>
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-10-04 10:52 [PATCH] arm64: dts: qcom: sc7280: enable venus node Vedang Nagar
  2024-10-06  3:32 ` Bjorn Andersson
@ 2024-10-06  8:26 ` Krzysztof Kozlowski
  2024-10-06 19:50 ` Dmitry Baryshkov
  2 siblings, 0 replies; 13+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-06  8:26 UTC (permalink / raw)
  To: Vedang Nagar, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel

On 04/10/2024 12:52, Vedang Nagar wrote:
> Enable the venus node on Qualcomm sc7280. It was made disabled
> earlier to avoid bootup crash, which is fixed now with [1].
> 
> [1]
> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> 
> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index 3d8410683402fd4c03c5c2951721938fff20fc77..59dafbeeab1dfd6e1b021335ba1b04767d6c24e5 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -4288,8 +4288,6 @@ venus: video-codec@aa00000 {
>  			iommus = <&apps_smmu 0x2180 0x20>;
>  			memory-region = <&video_mem>;
>  
> -			status = "disabled";

That's just wrong. It's already enabled in other places which makes them
redundant, so patch is incomplete.

But what is more important: this is just not correct, IMO. The node
looks incomplete. You cannot enable incomplete nodes. Please carefully
read how DTS files are being constructed/used.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-10-04 10:52 [PATCH] arm64: dts: qcom: sc7280: enable venus node Vedang Nagar
  2024-10-06  3:32 ` Bjorn Andersson
  2024-10-06  8:26 ` Krzysztof Kozlowski
@ 2024-10-06 19:50 ` Dmitry Baryshkov
  2024-11-12  6:17   ` Vedang Nagar
  2 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-10-06 19:50 UTC (permalink / raw)
  To: Vedang Nagar
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> Enable the venus node on Qualcomm sc7280. It was made disabled
> earlier to avoid bootup crash, which is fixed now with [1].

NAK, there might be other reasons to keep venus disabled, like the lack
of the vendor-signed firmware for the particular device.

> 
> [1]
> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> 
> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>  1 file changed, 2 deletions(-)

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-10-06 19:50 ` Dmitry Baryshkov
@ 2024-11-12  6:17   ` Vedang Nagar
  2024-11-12 13:13     ` Dmitry Baryshkov
  0 siblings, 1 reply; 13+ messages in thread
From: Vedang Nagar @ 2024-11-12  6:17 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel



On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
>> Enable the venus node on Qualcomm sc7280. It was made disabled
>> earlier to avoid bootup crash, which is fixed now with [1].
> 
> NAK, there might be other reasons to keep venus disabled, like the lack
> of the vendor-signed firmware for the particular device.
Can you pls elaborate more on this? Any device with sc7280 SOC can use
venus.mbn which is already present in linux-firmware git.

Regards,
Vedang Nagar
> 
>>
>> [1]
>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
>>
>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
>> ---
>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>>  1 file changed, 2 deletions(-)
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-12  6:17   ` Vedang Nagar
@ 2024-11-12 13:13     ` Dmitry Baryshkov
  2024-11-12 14:39       ` Vedang Nagar
  0 siblings, 1 reply; 13+ messages in thread
From: Dmitry Baryshkov @ 2024-11-12 13:13 UTC (permalink / raw)
  To: Vedang Nagar
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
>
>
>
> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> > On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> >> Enable the venus node on Qualcomm sc7280. It was made disabled
> >> earlier to avoid bootup crash, which is fixed now with [1].
> >
> > NAK, there might be other reasons to keep venus disabled, like the lack
> > of the vendor-signed firmware for the particular device.
> Can you pls elaborate more on this? Any device with sc7280 SOC can use
> venus.mbn which is already present in linux-firmware git.

Can it though if the device is fused to use vendor keys and to check
the trust chain?

>
> Regards,
> Vedang Nagar
> >
> >>
> >> [1]
> >> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> >>
> >> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> >> ---
> >>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
> >>  1 file changed, 2 deletions(-)
> >



-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-12 13:13     ` Dmitry Baryshkov
@ 2024-11-12 14:39       ` Vedang Nagar
  2024-11-12 15:19         ` Luca Weiss
  0 siblings, 1 reply; 13+ messages in thread
From: Vedang Nagar @ 2024-11-12 14:39 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel



On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
>>
>>
>>
>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
>>>> earlier to avoid bootup crash, which is fixed now with [1].
>>>
>>> NAK, there might be other reasons to keep venus disabled, like the lack
>>> of the vendor-signed firmware for the particular device.
>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
>> venus.mbn which is already present in linux-firmware git.
> 
> Can it though if the device is fused to use vendor keys and to check
> the trust chain?
Yes, infact the existing ones are signed and works with trustzone authentication.
> 
>>
>> Regards,
>> Vedang Nagar
>>>
>>>>
>>>> [1]
>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
>>>>
>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
>>>> ---
>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>>>>  1 file changed, 2 deletions(-)
>>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-12 14:39       ` Vedang Nagar
@ 2024-11-12 15:19         ` Luca Weiss
  2024-11-13  7:01           ` Vedang Nagar
  0 siblings, 1 reply; 13+ messages in thread
From: Luca Weiss @ 2024-11-12 15:19 UTC (permalink / raw)
  To: Vedang Nagar, Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel

Hi Vedang,

On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
>
>
> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
> > On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
> >>
> >>
> >>
> >> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> >>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> >>>> Enable the venus node on Qualcomm sc7280. It was made disabled
> >>>> earlier to avoid bootup crash, which is fixed now with [1].
> >>>
> >>> NAK, there might be other reasons to keep venus disabled, like the lack
> >>> of the vendor-signed firmware for the particular device.
> >> Can you pls elaborate more on this? Any device with sc7280 SOC can use
> >> venus.mbn which is already present in linux-firmware git.
> > 
> > Can it though if the device is fused to use vendor keys and to check
> > the trust chain?
> Yes, infact the existing ones are signed and works with trustzone authentication.

No, the venus firmware from linux-firmware does not work on a device
with secure boot on, like the (QCM6490) Fairphone 5 smartphone.

$ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
$ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst

leads to

[   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
[   10.863062] qcom-venus aa00000.video-codec: non legacy binding
[   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
[   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
[   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22

It's the same with e.g. adsp firmware, modem firmware, etc.

With secure boot off, yes, the hardware will load any firmware
regardless of the signature.

Regards
Luca

> > 
> >>
> >> Regards,
> >> Vedang Nagar
> >>>
> >>>>
> >>>> [1]
> >>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> >>>>
> >>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> >>>> ---
> >>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
> >>>>  1 file changed, 2 deletions(-)
> >>>
> > 
> > 
> > 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-12 15:19         ` Luca Weiss
@ 2024-11-13  7:01           ` Vedang Nagar
  2024-11-13  8:03             ` Luca Weiss
  0 siblings, 1 reply; 13+ messages in thread
From: Vedang Nagar @ 2024-11-13  7:01 UTC (permalink / raw)
  To: Luca Weiss, Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel, Vikash Garodia (QUIC)

Hi Luca,
On 11/12/2024 8:49 PM, Luca Weiss wrote:
> Hi Vedang,
> 
> On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
>>
>>
>> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
>>> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
>>>>
>>>>
>>>>
>>>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
>>>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
>>>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
>>>>>> earlier to avoid bootup crash, which is fixed now with [1].
>>>>>
>>>>> NAK, there might be other reasons to keep venus disabled, like the lack
>>>>> of the vendor-signed firmware for the particular device.
>>>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
>>>> venus.mbn which is already present in linux-firmware git.
>>>
>>> Can it though if the device is fused to use vendor keys and to check
>>> the trust chain?
>> Yes, infact the existing ones are signed and works with trustzone authentication.
> 
> No, the venus firmware from linux-firmware does not work on a device
> with secure boot on, like the (QCM6490) Fairphone 5 smartphone.
Are you saying even after applying this [1] you are seeing the same ?

[1]
https://patchwork.kernel.org/project/linux-media/patch/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> 
> $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
> $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst
> 
> leads to
> 
> [   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
> [   10.863062] qcom-venus aa00000.video-codec: non legacy binding
> [   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
> [   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
> [   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22
> 
> It's the same with e.g. adsp firmware, modem firmware, etc.
> 
> With secure boot off, yes, the hardware will load any firmware
> regardless of the signature.
> 
> Regards
> Luca
> 
>>>
>>>>
>>>> Regards,
>>>> Vedang Nagar
>>>>>
>>>>>>
>>>>>> [1]
>>>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
>>>>>>
>>>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
>>>>>> ---
>>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>>>>>>  1 file changed, 2 deletions(-)
>>>>>
>>>
>>>
>>>
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-13  7:01           ` Vedang Nagar
@ 2024-11-13  8:03             ` Luca Weiss
  2025-01-07  4:11               ` Vedang Nagar
  0 siblings, 1 reply; 13+ messages in thread
From: Luca Weiss @ 2024-11-13  8:03 UTC (permalink / raw)
  To: Vedang Nagar, Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel, Vikash Garodia (QUIC)

Hi Vedang,

On Wed Nov 13, 2024 at 8:01 AM CET, Vedang Nagar wrote:
> Hi Luca,
> On 11/12/2024 8:49 PM, Luca Weiss wrote:
> > Hi Vedang,
> > 
> > On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
> >>
> >>
> >> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
> >>> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
> >>>>
> >>>>
> >>>>
> >>>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> >>>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> >>>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
> >>>>>> earlier to avoid bootup crash, which is fixed now with [1].
> >>>>>
> >>>>> NAK, there might be other reasons to keep venus disabled, like the lack
> >>>>> of the vendor-signed firmware for the particular device.
> >>>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
> >>>> venus.mbn which is already present in linux-firmware git.
> >>>
> >>> Can it though if the device is fused to use vendor keys and to check
> >>> the trust chain?
> >> Yes, infact the existing ones are signed and works with trustzone authentication.
> > 
> > No, the venus firmware from linux-firmware does not work on a device
> > with secure boot on, like the (QCM6490) Fairphone 5 smartphone.
> Are you saying even after applying this [1] you are seeing the same ?
>
> [1]
> https://patchwork.kernel.org/project/linux-media/patch/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/

That patch has been in mainline since v6.9 and my tree is newer, so yes.

See e.g. Qualcomm doc KBA-161204232438 for some details.

Regards
Luca

> > 
> > $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
> > $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst
> > 
> > leads to
> > 
> > [   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
> > [   10.863062] qcom-venus aa00000.video-codec: non legacy binding
> > [   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
> > [   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
> > [   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22
> > 
> > It's the same with e.g. adsp firmware, modem firmware, etc.
> > 
> > With secure boot off, yes, the hardware will load any firmware
> > regardless of the signature.
> > 
> > Regards
> > Luca
> > 
> >>>
> >>>>
> >>>> Regards,
> >>>> Vedang Nagar
> >>>>>
> >>>>>>
> >>>>>> [1]
> >>>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> >>>>>>
> >>>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> >>>>>> ---
> >>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
> >>>>>>  1 file changed, 2 deletions(-)
> >>>>>
> >>>
> >>>
> >>>
> > 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2024-11-13  8:03             ` Luca Weiss
@ 2025-01-07  4:11               ` Vedang Nagar
  2025-01-07  7:32                 ` Luca Weiss
  2025-01-07 22:36                 ` Dmitry Baryshkov
  0 siblings, 2 replies; 13+ messages in thread
From: Vedang Nagar @ 2025-01-07  4:11 UTC (permalink / raw)
  To: Luca Weiss, Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel, Vikash Garodia (QUIC)

Hi Luca,

On 11/13/2024 1:33 PM, Luca Weiss wrote:
> Hi Vedang,
> 
> On Wed Nov 13, 2024 at 8:01 AM CET, Vedang Nagar wrote:
>> Hi Luca,
>> On 11/12/2024 8:49 PM, Luca Weiss wrote:
>>> Hi Vedang,
>>>
>>> On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
>>>>
>>>>
>>>> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
>>>>> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
>>>>>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
>>>>>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
>>>>>>>> earlier to avoid bootup crash, which is fixed now with [1].
>>>>>>>
>>>>>>> NAK, there might be other reasons to keep venus disabled, like the lack
>>>>>>> of the vendor-signed firmware for the particular device.
>>>>>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
>>>>>> venus.mbn which is already present in linux-firmware git.
>>>>>
>>>>> Can it though if the device is fused to use vendor keys and to check
>>>>> the trust chain?
>>>> Yes, infact the existing ones are signed and works with trustzone authentication.
>>>
>>> No, the venus firmware from linux-firmware does not work on a device
>>> with secure boot on, like the (QCM6490) Fairphone 5 smartphone.
>> Are you saying even after applying this [1] you are seeing the same ?
>>
>> [1]
>> https://patchwork.kernel.org/project/linux-media/patch/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> 
> That patch has been in mainline since v6.9 and my tree is newer, so yes.
> 
> See e.g. Qualcomm doc KBA-161204232438 for some details.
> 
> Regards
> Luca
> 
>>>
>>> $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
>>> $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst
>>>
>>> leads to
>>>
>>> [   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
>>> [   10.863062] qcom-venus aa00000.video-codec: non legacy binding
>>> [   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
>>> [   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
>>> [   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22
>>>
We have seen similar issue with older firmware present in
linux-firmware git due to a bug in singing of the firmware image.

This issue seems to be resolved with below change:
aeede7afb7a186b62f9e1f959c33fd5f2dea0f7a: qcom: update venus firmware file for SC7280

Can you pls give a try with latest firmware if you still see the same issue?
We tried internally and do not see any such failure now.

Regards,
Vedang Nagar

>>> It's the same with e.g. adsp firmware, modem firmware, etc.
>>>
>>> With secure boot off, yes, the hardware will load any firmware
>>> regardless of the signature.
>>>
>>> Regards
>>> Luca
>>>
>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Vedang Nagar
>>>>>>>
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
>>>>>>>>
>>>>>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
>>>>>>>> ---
>>>>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
>>>>>>>>  1 file changed, 2 deletions(-)
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2025-01-07  4:11               ` Vedang Nagar
@ 2025-01-07  7:32                 ` Luca Weiss
  2025-01-07 22:36                 ` Dmitry Baryshkov
  1 sibling, 0 replies; 13+ messages in thread
From: Luca Weiss @ 2025-01-07  7:32 UTC (permalink / raw)
  To: Vedang Nagar, Dmitry Baryshkov
  Cc: cros-qcom-dts-watchers, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	devicetree, linux-kernel, Vikash Garodia (QUIC)

Hi Vedang,

On Tue Jan 7, 2025 at 5:11 AM CET, Vedang Nagar wrote:
> Hi Luca,
>
> On 11/13/2024 1:33 PM, Luca Weiss wrote:
> > Hi Vedang,
> > 
> > On Wed Nov 13, 2024 at 8:01 AM CET, Vedang Nagar wrote:
> >> Hi Luca,
> >> On 11/12/2024 8:49 PM, Luca Weiss wrote:
> >>> Hi Vedang,
> >>>
> >>> On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
> >>>>
> >>>>
> >>>> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
> >>>>> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> >>>>>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> >>>>>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
> >>>>>>>> earlier to avoid bootup crash, which is fixed now with [1].
> >>>>>>>
> >>>>>>> NAK, there might be other reasons to keep venus disabled, like the lack
> >>>>>>> of the vendor-signed firmware for the particular device.
> >>>>>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
> >>>>>> venus.mbn which is already present in linux-firmware git.
> >>>>>
> >>>>> Can it though if the device is fused to use vendor keys and to check
> >>>>> the trust chain?
> >>>> Yes, infact the existing ones are signed and works with trustzone authentication.
> >>>
> >>> No, the venus firmware from linux-firmware does not work on a device
> >>> with secure boot on, like the (QCM6490) Fairphone 5 smartphone.
> >> Are you saying even after applying this [1] you are seeing the same ?
> >>
> >> [1]
> >> https://patchwork.kernel.org/project/linux-media/patch/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> > 
> > That patch has been in mainline since v6.9 and my tree is newer, so yes.
> > 
> > See e.g. Qualcomm doc KBA-161204232438 for some details.
> > 
> > Regards
> > Luca
> > 
> >>>
> >>> $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
> >>> $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst
> >>>
> >>> leads to
> >>>
> >>> [   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
> >>> [   10.863062] qcom-venus aa00000.video-codec: non legacy binding
> >>> [   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
> >>> [   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
> >>> [   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22
> >>>
> We have seen similar issue with older firmware present in
> linux-firmware git due to a bug in singing of the firmware image.
>
> This issue seems to be resolved with below change:
> aeede7afb7a186b62f9e1f959c33fd5f2dea0f7a: qcom: update venus firmware file for SC7280
>
> Can you pls give a try with latest firmware if you still see the same issue?
> We tried internally and do not see any such failure now.

Still same issue after

$ sudo rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
$ sudo cp ~/linux-firmware-aeede7afb7a186b62f9e1f959c33fd5f2dea0f7a/qcom/vpu/vpu20_p1.mbn /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn

[   10.260044] qcom-venus aa00000.video-codec: Adding to iommu group 13
[   10.260681] qcom-venus aa00000.video-codec: non legacy binding
[   10.406306] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
[   10.406681] qcom-venus aa00000.video-codec: fail to load video firmware
[   10.420897] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22

Did you try internally on a board with secure boot on or off? I can
imagine this image working fine on SB-off, but not on SB-on, as
mentioned before.

Because when I take that image from linux-firmware and run it through
sectools with the signing config for this device, that firmware
initializes fine.

./sectools/sectools.py secimage --sign --validate \
  --image_file=vpu20_p1.mbn --sign_id=venus --chipset=kodiak \
  --output_dir=out-signed --cfg_selected_cert_config=my_sign_config

[   10.624885] qcom-venus aa00000.video-codec: Adding to iommu group 13
[   10.632036] qcom-venus aa00000.video-codec: non legacy binding

$ cat /sys/kernel/debug/qcom_socinfo/video/name
14:video-firmware.1.0-ed457c183307eff1737608763ca0f23656c95b53
$ cat /sys/kernel/debug/qcom_socinfo/video/oem
:hw-skotecha-hyd
$ cat /sys/kernel/debug/qcom_socinfo/video/variant
PROD

Regards
Luca

>
> Regards,
> Vedang Nagar
>
> >>> It's the same with e.g. adsp firmware, modem firmware, etc.
> >>>
> >>> With secure boot off, yes, the hardware will load any firmware
> >>> regardless of the signature.
> >>>
> >>> Regards
> >>> Luca
> >>>
> >>>>>
> >>>>>>
> >>>>>> Regards,
> >>>>>> Vedang Nagar
> >>>>>>>
> >>>>>>>>
> >>>>>>>> [1]
> >>>>>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> >>>>>>>>
> >>>>>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> >>>>>>>> ---
> >>>>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
> >>>>>>>>  1 file changed, 2 deletions(-)
> >>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node
  2025-01-07  4:11               ` Vedang Nagar
  2025-01-07  7:32                 ` Luca Weiss
@ 2025-01-07 22:36                 ` Dmitry Baryshkov
  1 sibling, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2025-01-07 22:36 UTC (permalink / raw)
  To: Vedang Nagar
  Cc: Luca Weiss, cros-qcom-dts-watchers, Bjorn Andersson,
	Konrad Dybcio, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, devicetree, linux-kernel, Vikash Garodia (QUIC)

On Tue, Jan 07, 2025 at 09:41:56AM +0530, Vedang Nagar wrote:
> Hi Luca,
> 
> On 11/13/2024 1:33 PM, Luca Weiss wrote:
> > Hi Vedang,
> > 
> > On Wed Nov 13, 2024 at 8:01 AM CET, Vedang Nagar wrote:
> >> Hi Luca,
> >> On 11/12/2024 8:49 PM, Luca Weiss wrote:
> >>> Hi Vedang,
> >>>
> >>> On Tue Nov 12, 2024 at 3:39 PM CET, Vedang Nagar wrote:
> >>>>
> >>>>
> >>>> On 11/12/2024 6:43 PM, Dmitry Baryshkov wrote:
> >>>>> On Tue, 12 Nov 2024 at 08:17, Vedang Nagar <quic_vnagar@quicinc.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On 10/7/2024 1:20 AM, Dmitry Baryshkov wrote:
> >>>>>>> On Fri, Oct 04, 2024 at 04:22:31PM GMT, Vedang Nagar wrote:
> >>>>>>>> Enable the venus node on Qualcomm sc7280. It was made disabled
> >>>>>>>> earlier to avoid bootup crash, which is fixed now with [1].
> >>>>>>>
> >>>>>>> NAK, there might be other reasons to keep venus disabled, like the lack
> >>>>>>> of the vendor-signed firmware for the particular device.
> >>>>>> Can you pls elaborate more on this? Any device with sc7280 SOC can use
> >>>>>> venus.mbn which is already present in linux-firmware git.
> >>>>>
> >>>>> Can it though if the device is fused to use vendor keys and to check
> >>>>> the trust chain?
> >>>> Yes, infact the existing ones are signed and works with trustzone authentication.
> >>>
> >>> No, the venus firmware from linux-firmware does not work on a device
> >>> with secure boot on, like the (QCM6490) Fairphone 5 smartphone.
> >> Are you saying even after applying this [1] you are seeing the same ?
> >>
> >> [1]
> >> https://patchwork.kernel.org/project/linux-media/patch/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> > 
> > That patch has been in mainline since v6.9 and my tree is newer, so yes.
> > 
> > See e.g. Qualcomm doc KBA-161204232438 for some details.
> > 
> > Regards
> > Luca
> > 
> >>>
> >>> $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn
> >>> $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn.zst
> >>>
> >>> leads to
> >>>
> >>> [   10.848191] qcom-venus aa00000.video-codec: Adding to iommu group 13
> >>> [   10.863062] qcom-venus aa00000.video-codec: non legacy binding
> >>> [   10.909555] qcom-venus aa00000.video-codec: error -22 initializing firmware qcom/qcm6490/fairphone5/venus.mbn
> >>> [   10.910099] qcom-venus aa00000.video-codec: fail to load video firmware
> >>> [   10.910849] qcom-venus aa00000.video-codec: probe with driver qcom-venus failed with error -22
> >>>
> We have seen similar issue with older firmware present in
> linux-firmware git due to a bug in singing of the firmware image.
> 
> This issue seems to be resolved with below change:
> aeede7afb7a186b62f9e1f959c33fd5f2dea0f7a: qcom: update venus firmware file for SC7280
> 
> Can you pls give a try with latest firmware if you still see the same issue?
> We tried internally and do not see any such failure now.


Have you been trying it on the FP5 (or any other vendor-fused device) or
on the RB3gen2, fused to accept any CA key?

> 
> Regards,
> Vedang Nagar
> 
> >>> It's the same with e.g. adsp firmware, modem firmware, etc.
> >>>
> >>> With secure boot off, yes, the hardware will load any firmware
> >>> regardless of the signature.
> >>>
> >>> Regards
> >>> Luca
> >>>
> >>>>>
> >>>>>>
> >>>>>> Regards,
> >>>>>> Vedang Nagar
> >>>>>>>
> >>>>>>>>
> >>>>>>>> [1]
> >>>>>>>> https://lore.kernel.org/linux-media/20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com/
> >>>>>>>>
> >>>>>>>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
> >>>>>>>> ---
> >>>>>>>>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 --
> >>>>>>>>  1 file changed, 2 deletions(-)
> >>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-01-07 22:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 10:52 [PATCH] arm64: dts: qcom: sc7280: enable venus node Vedang Nagar
2024-10-06  3:32 ` Bjorn Andersson
2024-10-06  8:26 ` Krzysztof Kozlowski
2024-10-06 19:50 ` Dmitry Baryshkov
2024-11-12  6:17   ` Vedang Nagar
2024-11-12 13:13     ` Dmitry Baryshkov
2024-11-12 14:39       ` Vedang Nagar
2024-11-12 15:19         ` Luca Weiss
2024-11-13  7:01           ` Vedang Nagar
2024-11-13  8:03             ` Luca Weiss
2025-01-07  4:11               ` Vedang Nagar
2025-01-07  7:32                 ` Luca Weiss
2025-01-07 22:36                 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox