Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1017992rdh; Fri, 24 Nov 2023 03:36:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IETOasKRBLchdh72ZjRBmt2ssTdeq8Mpm8EPJnHxoftDMNPrQQc2H+O4j/Es3s6UPvrQUi2 X-Received: by 2002:a05:6a00:93a4:b0:6cb:d28f:7a91 with SMTP id ka36-20020a056a0093a400b006cbd28f7a91mr2712483pfb.9.1700825783111; Fri, 24 Nov 2023 03:36:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700825783; cv=none; d=google.com; s=arc-20160816; b=ZkpWdKE22fyfvfLp3bmqORd03ZjO5Gnpg+ILZXjEG4tSWYO5bEfhGP6/W6xQD2YcDH lbiIknw/cfrQ/1ZvBPrCh34IVswUiIMmmue0fbyNFsiOojBhIzNhVrKCXEA3zTvWQGOY gh583S7s8H4F4IXwic9KAJJOcV3YPUQla1VppzC+SqIZTdn6P5VymIFhrhpow118eA8c DZuWjkFK+6Ls7tdrbE/ob5wR8/fQUMLIJPzfgXtu4RYkDwWLkegxlMHc/SIBgVgOOJeR xvDFxIMfnKEzENQoNvQs3Bz0pjz42os8OH8mzhjUTEYK6lRbtICst1QmmqSdG9qqx39c AjIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=mq/q+zSacFh9TwkvYjfDYYCeewexARu63HiKzNInzCg=; fh=CGKZvJiyPckEYreA7Fa8Bj59X5oCT5n3AwGyFedRQpI=; b=fa5Df0xbWaN2WDEBKLyJVlX273AyBQDaZz/FYRyO3pR6MnSxq/bfoXdGY5g0I+gRhE mSwQTNSTcJtR3Why+CriALSNj3CR9TVmd75ub2jo/iL3JQxQ6Iq8GzxFtH3ax9Nn3fLz xTNAxr1RXNaI20ixvvW+Smn2Jz7R2YbR4HOuP0aTaALaUj1gQ8DtG0qbEm3lfZVEDHOp DeEFdSe3phOmo3q3C31F9jbIlw2jPjsHW1ylGfw0PiFWRD/NiJyD7bQis3WvYDyBhVii U6RLjuvaz3qK0uKqWXveb0tHNa3knrk9qTk5RiSVt4x8/ti/RvHjDklIMCVALwxR7aOp qqFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=Axl8QWf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e14-20020a056a001a8e00b006cbe6618e79si3428907pfv.297.2023.11.24.03.36.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 03:36:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=Axl8QWf6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E8430804911C; Fri, 24 Nov 2023 03:35:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344684AbjKXLfR (ORCPT + 99 others); Fri, 24 Nov 2023 06:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbjKXLfP (ORCPT ); Fri, 24 Nov 2023 06:35:15 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DD221700 for ; Fri, 24 Nov 2023 03:35:19 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a013d22effcso242946666b.2 for ; Fri, 24 Nov 2023 03:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1700825718; x=1701430518; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mq/q+zSacFh9TwkvYjfDYYCeewexARu63HiKzNInzCg=; b=Axl8QWf6I1f5BuCSu7wW0hMwesL2O6Rw8Ie9uCcVSMVOK2iu+gLW9cr61REERY8qNR +vkXKXdxPmKTp/JUCsZ5qOyduf4PSqqM9wY0dnNqyUxeazCfKos95q+p8DpjmpHTxzag SXUiwBx28Vcg1WSndGJhp7kb7twJZcgNx+AKSWFAIB9Buqlp3j81glnresbLhWZD7VS9 DBTQhgbww6nvmJw5xjl6I4ef+rBUqVccmmhX/pohbH8/LbfzY/jFbokP/pZxRUzvheGJ Cs5qpTuFUCKG4ZLgna3TfcndL/BsvLl5h3GgcSL46oVnCQBm9JHQvUAUepC1bSt4CwVC 5T8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700825718; x=1701430518; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mq/q+zSacFh9TwkvYjfDYYCeewexARu63HiKzNInzCg=; b=QhZSbZHp5cw8AqawyRQqiCkcSReX6/Zx74EfJCPoPpdgqhM9iD/atVvJIBNqqQYbty lJQ3wbS1b6yo/iOasYyuRwKP9aPj15b0pWJQ5BBcQX1nTA3UpxafrSfFzSdnAVswmtnZ ZaMnI1sp5ibkvtjC8SyVctaYmkNwNSP3TDk1R4/sMeQWLN0D8FdPyP8jp0XhEeknsFBe UjifbRc//cqTPD1zihS+p8kb87x2GsWaWFmGXaCyRcRYJic32i0ivimdkkTf1xCXcjCs w5UAYckFOqG4K6LZDWbN9tO/QbvLHU3FzP1JE4kkvfXrBj0rOI0xkaU82V7k+moBPvri 3Pjw== X-Gm-Message-State: AOJu0YwiROo/SQ6Cp7AybM5V6kjXcubZ93pgUchNLkTclx0DeEGSYxmB D+mvVoQgnCf90FLE3+HFW174Dg== X-Received: by 2002:a17:906:3042:b0:9cf:36be:3b5d with SMTP id d2-20020a170906304200b009cf36be3b5dmr1620418ejd.61.1700825718401; Fri, 24 Nov 2023 03:35:18 -0800 (PST) Received: from localhost (dhcp-089-099-055-216.chello.nl. [89.99.55.216]) by smtp.gmail.com with ESMTPSA id uz2-20020a170907118200b00a098348d803sm495339ejb.141.2023.11.24.03.35.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Nov 2023 03:35:18 -0800 (PST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 Nov 2023 12:35:17 +0100 Message-Id: Cc: <~postmarketos/upstreaming@lists.sr.ht>, , , , , Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common From: "Luca Weiss" To: "Vikash Garodia" , "Stanimir Varbanov" , "Bryan O'Donoghue" , "Andy Gross" , "Bjorn Andersson" , "Konrad Dybcio" , "Mauro Carvalho Chehab" , , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" X-Mailer: aerc 0.15.2 References: <20231002-sc7280-venus-pas-v2-0-bd2408891317@fairphone.com> <20231002-sc7280-venus-pas-v2-2-bd2408891317@fairphone.com> <4cfad910-1821-3a31-c372-3f6b199e8f71@quicinc.com> In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 24 Nov 2023 03:35:32 -0800 (PST) On Fri Nov 24, 2023 at 7:38 AM CET, Vikash Garodia wrote: > > On 11/22/2023 7:50 PM, Luca Weiss wrote: > > On Wed Nov 22, 2023 at 2:17 PM CET, Vikash Garodia wrote: > >> > >> On 10/2/2023 7:50 PM, Luca Weiss wrote: > >>> If the video-firmware node is present, the venus driver assumes we're= on > >>> a system that doesn't use TZ for starting venus, like on ChromeOS > >>> devices. > >>> > >>> Move the video-firmware node to chrome-common.dtsi so we can use venu= s > >>> on a non-ChromeOS devices. > >>> > >>> At the same time also disable the venus node by default in the dtsi, > >>> like it's done on other SoCs. > >>> > >>> Reviewed-by: Bryan O'Donoghue > >>> Signed-off-by: Luca Weiss > >>> --- > >>> arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 8 ++++++++ > >>> arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 ++---- > >>> 2 files changed, 10 insertions(+), 4 deletions(-) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi b/arc= h/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi > >>> index 5d462ae14ba1..cd491e46666d 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi > >>> @@ -104,6 +104,14 @@ &scm { > >>> dma-coherent; > >>> }; > >>> =20 > >>> +&venus { > >>> + status =3D "okay"; > >>> + > >>> + video-firmware { > >>> + iommus =3D <&apps_smmu 0x21a2 0x0>; > >>> + }; > >>> +}; > >>> + > >>> &watchdog { > >>> status =3D "okay"; > >>> }; > >>> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/d= ts/qcom/sc7280.dtsi > >>> index 66f1eb83cca7..fa53f54d4675 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > >>> @@ -3740,6 +3740,8 @@ venus: video-codec@aa00000 { > >>> <&apps_smmu 0x2184 0x20>; > 0x2184 is a secure SID. I think qcm6490-fairphone-fp5.dts needs to overri= de the > iommus property as well to retain only the non secure SID i.e 0x2180 ? I = am > seeing below crash > > Call trace: > [ 47.663593] qcom_smmu_write_s2cr+0x64/0xa4 > [ 47.663616] arm_smmu_attach_dev+0x120/0x284 > [ 47.663647] __iommu_attach_device+0x24/0xf8 > [ 47.676845] __iommu_device_set_domain+0x70/0xd0 > [ 47.681632] __iommu_group_set_domain_internal+0x60/0x1b4 > [ 47.687218] iommu_setup_default_domain+0x358/0x418 > [ 47.692258] __iommu_probe_device+0x3e4/0x404 > > Could you please reconfirm if Video SID 0x2184 (and mask) is allowed by t= he > qcm6490-fairphone-fp5 hardware having TZ ? Hi, On FP5 it seems it's no problem to have both SIDs in there, probe and using venus appears to work fine. Are you using different firmware than QCM6490.LA.3.0 on the device where you tested this? > > >>> memory-region =3D <&video_mem>; > >>> =20 > >>> + status =3D "disabled"; > >>> + > >>> video-decoder { > >>> compatible =3D "venus-decoder"; > >>> }; > >>> @@ -3748,10 +3750,6 @@ video-encoder { > >>> compatible =3D "venus-encoder"; > >>> }; > >>> =20 > >>> - video-firmware { > >>> - iommus =3D <&apps_smmu 0x21a2 0x0>; > >>> - }; > >>> - > >>> venus_opp_table: opp-table { > >>> compatible =3D "operating-points-v2"; > >>> =20 > >>> > >> Changes look good. Is this tested on SC7280 ? > >=20 > > Hi Vikash, > >=20 > > I didn't test it myself on sc7280 (just qcm6490-fp5) but dtx_diff > > reports no differences except for status =3D okay property being added,= so > > there should be no change on those boards. See below. > >=20 > > Regards > > Luca > > I tested on SC7280 (herobrine) and all good. Great, thanks! Regards Luca > > Regards, > Vikash