From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7B82A1C9 for ; Tue, 7 Jan 2025 07:32:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736235148; cv=none; b=hV+tUzR3ddOQJGitvRN+FoRZJRWQEh9Au1/jmJNWMmVRXOTA/5tKb1oge1APTHwFQV6mOtaxzi4ALgj+Asw3zN7UzFjl9MfKTAEapoTo8r74Ze6BeFg2CrP2VyZnC+oSakXFaf5czNP/QYVhrKrz7k0iKsUNgEVawWTlc4R9vdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736235148; c=relaxed/simple; bh=FZEtNKaj3JCG65ps3dFA2ZvHQeOB2XoV5OgwrT933a4=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=h0kDN1T91Hz5O0h2AW+s+1DyU9Wf5JdkS6RNSqyA2xtAmUVUK6sDzU8762LRBNvREWKMib8yRycY2NvEvAdTgs9lvnePF4MDPZT+bpULsJT46jck1F5u0zRyC/7PXiwug2KezKIp+oG9E8KAdLJXVXCyp2pcLmd2RZ419cZV480= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com; spf=pass smtp.mailfrom=fairphone.com; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b=EI5zPjId; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="EI5zPjId" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d88c355e0dso8303952a12.0 for ; Mon, 06 Jan 2025 23:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1736235143; x=1736839943; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QxsnqoaRjn1U+mzus62drupM2eeFUcVoVsGFZxoMwW4=; b=EI5zPjIdaqo/X6wk1NxQv+SadySQN/dkdNwMU/BqN5e+pexLJKv9wikPAROaTVRyNd /616Ime7Ey+7vjccBeSj3/4OUVuQGO/OoMYajH28nxF5N8DWcnbuc6hnFr3O/xGozJWE DcXe0FnmCfXh3ENqksFigG2EkdkXJLOuwKrzXRb0TPpCs4Ux2muqd1Lwp8+1A9MJelxW bCBTS7HKOPoahyij6Eh+SgRQ4X1Y6K9B53DWQ/DG+mU5IF7RVXk/DL9oI2OQCG09tq4b kBj/p+CAksc5M2evU9haoNCwimxSPCuKin+B5V7DwqCYrozN3Ygh/Md3VMaswEMES695 i7Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736235143; x=1736839943; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=QxsnqoaRjn1U+mzus62drupM2eeFUcVoVsGFZxoMwW4=; b=JZoNozS2UHQuCd1nNKyCGqdi3e6e427E5keMfOlItojtqx6vmO/6o59080JCqVa51s DfktbqZYr6G+u4lHjd6JbN2mDOl+1U6sdUvqWuR38CPUGoB4rN93d91rmVUvfbT3W3f0 UP2EfhczjLcljemnQjHp3YnnBiH6sUtbyOwxS+5JFN4ab2y8CMR5Yiw36OqPotluiP+t 7RHvVZgHteZaXVPcdJJORM9TJZU+gLIp7ei48rdoAxJrSZh0Ta+t3qMXnBYTm+tJ7cPp g5CoC13blEZXerGRWgBnYQ09Fxe5H/HOgm5shoSrMq7fHuMIbiulPkgd20BXgkNlel9U EvAQ== X-Forwarded-Encrypted: i=1; AJvYcCWpVLvCj/d+mDlmPZ/ngDcRVMkapUYWrN1AkARuCyYzL1sD0qQgc3V1MwHMiHEv2Zdl/DN34lJaCsJc7/4=@vger.kernel.org X-Gm-Message-State: AOJu0YzV+PFzXy+wGrxdCZsjtKD47WteQOqo4R6fh+J0q8973VkDiFv5 KwLgpcCNJF2MJjJlLoDBmkqEFBtM4lMOr4wbcDtwptMgLfEmNqIIIi43GFDJsRE= X-Gm-Gg: ASbGncv97cZNYsuIeZ8bGvMenjN1afe5OjNup/2SnhXSH2YlZ4edYuXfid+EX4fFnmO w6doXAH6XmBQqgjFUfC7oLATFpSzJ10vfwHbVPMlcCrtysmBqG269YHzd5mkDzoutWhH3Z+/rv7 EH6Zq/C6uQYkOiGNF4JphNGgvXC0zRTPUbgX7GEh9Zt6goBxlrj+1UyRi9bN5iP8jCkA/zGcfjA WlqXiHYzmHV7nWIQ8+Ckp0+FioP7F0kt68zwemTbT12y5qYQDL89cqOS+BXl5r4qGF6aixhr+Ok aEbE68+IqH/Rk7o= X-Google-Smtp-Source: AGHT+IHju/xJ5UhqcC+t1vi02NyMGzJzQ3AJeci3xy21v8rmZhpPHEDpgKZLgRB805M7NykexlqqDw== X-Received: by 2002:a05:6402:5256:b0:5d0:bdc1:75df with SMTP id 4fb4d7f45d1cf-5d81ddf7fa6mr55537562a12.24.1736235143078; Mon, 06 Jan 2025 23:32:23 -0800 (PST) Received: from localhost (31-151-138-250.dynamic.upc.nl. [31.151.138.250]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d8baa29afasm13368880a12.59.2025.01.06.23.32.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2025 23:32:22 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 07 Jan 2025 08:32:22 +0100 Message-Id: To: "Vedang Nagar" , "Dmitry Baryshkov" Cc: , "Bjorn Andersson" , "Konrad Dybcio" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , , , , "Vikash Garodia (QUIC)" Subject: Re: [PATCH] arm64: dts: qcom: sc7280: enable venus node From: "Luca Weiss" X-Mailer: aerc 0.18.2-0-ge037c095a049 References: <20241004-venus_sc7280-v1-1-4d7d8fd7e95b@quicinc.com> <78e6ff6b-efe1-496c-a1fb-c9a0a4aba2d2@quicinc.com> <39206687-6fb3-434f-b2ba-a028cf6f8ed3@quicinc.com> <26b3aee7-5729-447b-983a-cfa5951595ba@quicinc.com> In-Reply-To: <26b3aee7-5729-447b-983a-cfa5951595ba@quicinc.com> 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, > >=20 > > 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 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 th= e 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 chec= k > >>>>> the trust chain? > >>>> Yes, infact the existing ones are signed and works with trustzone au= thentication. > >>> > >>> 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/ > >=20 > > That patch has been in mainline since v6.9 and my tree is newer, so yes= . > >=20 > > See e.g. Qualcomm doc KBA-161204232438 for some details. > >=20 > > Regards > > Luca > >=20 > >>> > >>> $ rm /lib/firmware/qcom/qcm6490/fairphone5/venus.mbn > >>> $ cp /lib/firmware/qcom/vpu-2.0/venus.mbn.zst /lib/firmware/qcom/qcm6= 490/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 fir= mware > >>> [ 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 fil= e for SC7280 > > Can you pls give a try with latest firmware if you still see the same iss= ue? > 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/vp= u/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 firmw= are 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=3Dvpu20_p1.mbn --sign_id=3Dvenus --chipset=3Dkodiak \ --output_dir=3Dout-signed --cfg_selected_cert_config=3Dmy_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 > >>>>>>>> --- > >>>>>>>> arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 -- > >>>>>>>> 1 file changed, 2 deletions(-) > >>>>>>> > >>>>> > >>>>> > >>>>> > >>>