Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1073358rdh; Fri, 24 Nov 2023 04:53:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHZcaHa3sJcbRy+tX/MAjFkMtRhCD5SMYjCNNjtFaLj/6eSsXyLu/bi+4vnuzeVpNWnphy X-Received: by 2002:aa7:9f05:0:b0:6b8:69fa:a11 with SMTP id g5-20020aa79f05000000b006b869fa0a11mr2885988pfr.12.1700830428547; Fri, 24 Nov 2023 04:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700830428; cv=none; d=google.com; s=arc-20160816; b=bVOEDrAT9NTvZWcJCMwID+ENm26mYJYrM77lVl9KMwuhiarqsQRqhBnILMwdoasYSt KSonyWNCEvPaBviZqsS28Y1me0MYedSOhSDYF4l5GUdlWHVahksHsNbpV0CWBt14zS8u IRVVJw2qPhTYOWZMTCrlpxyC3esxp6lc/c8VBy3JOHiAXlL9cKNrwv7/MY9QF5RMf6AE x1bP27UyUAyOuZ4KfKLIm3O3PIMTlOQu/3sGZx8yuF9Th+mCHTXJyndjUGndjyqpKND5 nQXcoFRPQKjfYUApuzicqW1/QLqr70OwY0Km6Jrbd76zPDthA0Lhl3TIC2s5cfFcmQDY f43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HTgTZleeDU2G7HfMpR6mP5ubFLWz0FBut+wr32KncSQ=; fh=or3HOkN6iiaJTcLTOdQttta5MY386x2gT3gsxlS8AQ0=; b=DSzvn/iXTPGouWpJ98/zIkoabGspNSj0Oy+p3eietsemcQr9aTEeCeUAWzkKiGV1E6 rql5l4JWF+kiwkLKv6wfPm7O2UvIcT29InhiOkDDAth4dD0DLvkbKhryaxEN10cJquOy z/GHSarfajOZndqV/AFsWFFDb8dvLeMTGG/Yt0iiU/VVC90kaT8BoH7OZKHlFb2eqVJ1 6twX1G1BgLIpe+KeFgcqf4sip3fJ5kMFuKxRPH1Ykl6dWmxstOQpN+pThdKhZ1pkophN z6rQj4wfe8bp6Xshyrj280+P+szHHoGkuYyEUjfXATdDigJio1w9C/xBqD5AQ7KCdmO6 LeqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qczjxkkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id fd11-20020a056a002e8b00b006cb7f9dd0b6si3589835pfb.214.2023.11.24.04.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 04:53:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qczjxkkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B7148804C210; Fri, 24 Nov 2023 04:53:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbjKXMx1 (ORCPT + 99 others); Fri, 24 Nov 2023 07:53:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbjKXMxZ (ORCPT ); Fri, 24 Nov 2023 07:53:25 -0500 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF527193 for ; Fri, 24 Nov 2023 04:53:30 -0800 (PST) Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso1447320276.2 for ; Fri, 24 Nov 2023 04:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700830410; x=1701435210; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HTgTZleeDU2G7HfMpR6mP5ubFLWz0FBut+wr32KncSQ=; b=Qczjxkkdia9Ftmim+3rrN2TIIDT03r11LNoeL3wQcU1ia0qewKiGCAltehJ9bl8skO S2/Lq9dHhXiRzqIQw/c1o7ZW2H/y1IYRWlnBTuP9KkD0qL3YQ6OhzoLI3apUsvdJPPYk hOebeBCrQ3P+SLuTB7sRCd5nTsB6PtA/l0OMYgewTm12mDO/x9gfJwbYvCM1Q4UAvTxz 33qZcZG2G7qFzxaOLTnn8QIeGu4+JPQqH/sDjbGt+FVav/v652myvyuOy+QnPgO9msVl e2uTvHW8PCbGOr3gpj0YU7S722NCQZdpL34NGgFlVM55DUkPPDyUgtx8F+eEU/8LV8Bw jBTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700830410; x=1701435210; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HTgTZleeDU2G7HfMpR6mP5ubFLWz0FBut+wr32KncSQ=; b=xGlL+GEUg0d/24WqPMue+kSugVu3/fPkUxJA9BMHw6/nJWxbc+ZdsfBEHqzEaeu+HR Vca1PijEK9b+4XiWJx/tzEHjNY4QKI0ESO/RNnmsLSwKs2X4/JdPX/5WLlHoqNR8IdM+ QnV2QsqvH+oBB/th6QDkR8Ko6fJ46FS+c7lXXVxJSSIk4+cNmqxOrpFETzvQfhKWBA8Y OtZpX5BAIyV75drh06xLC2f5G45fFiD+3jeg+B0umo6fSnI31n2gZs4GMkK6cazvze87 6Qckv2eq0bcRcsAIro5MRQQ/FSDBKu9/iDeoyRUfRM2cLeXOx+MbFoqZzW/NLCkan/Vz T2uw== X-Gm-Message-State: AOJu0YyVBgptQHnLrMgJ+gS9W/vDodkaMjqurNN1BrF4F6MK7v+mAEj9 PGJeG+Z1MEflBiLJAk9U+v0VQUhguivHbeUQti7zqg== X-Received: by 2002:a25:e305:0:b0:da0:3d48:aa68 with SMTP id z5-20020a25e305000000b00da03d48aa68mr2189648ybd.50.1700830409952; Fri, 24 Nov 2023 04:53:29 -0800 (PST) MIME-Version: 1.0 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: From: Dmitry Baryshkov Date: Fri, 24 Nov 2023 14:53:19 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common To: Vikash Garodia Cc: Luca Weiss , Stanimir Varbanov , "Bryan O'Donoghue" , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , cros-qcom-dts-watchers@chromium.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 24 Nov 2023 04:53:45 -0800 (PST) On Fri, 24 Nov 2023 at 14:30, Vikash Garodia wrote: > > On 11/24/2023 5:05 PM, Luca Weiss wrote: > > 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 venus > >>>>> 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/arch/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; > >>>>> }; > >>>>> > >>>>> +&venus { > >>>>> + status = "okay"; > >>>>> + > >>>>> + video-firmware { > >>>>> + iommus = <&apps_smmu 0x21a2 0x0>; > >>>>> + }; > >>>>> +}; > >>>>> + > >>>>> &watchdog { > >>>>> status = "okay"; > >>>>> }; > >>>>> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/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 override 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 the > >> 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? > I was testing this on RB3 board which uses firmware [1]. There is something wrong here. RB3 board uses venus-5.2 RB5 board uses vpu-1.0 Only sc7280 uses vpu-2.0 > > Regards, > Vikash > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qcom/vpu-2.0 > > >> > >>>>> memory-region = <&video_mem>; > >>>>> > >>>>> + status = "disabled"; > >>>>> + > >>>>> video-decoder { > >>>>> compatible = "venus-decoder"; > >>>>> }; > >>>>> @@ -3748,10 +3750,6 @@ video-encoder { > >>>>> compatible = "venus-encoder"; > >>>>> }; > >>>>> > >>>>> - video-firmware { > >>>>> - iommus = <&apps_smmu 0x21a2 0x0>; > >>>>> - }; > >>>>> - > >>>>> venus_opp_table: opp-table { > >>>>> compatible = "operating-points-v2"; > >>>>> > >>>>> > >>>> Changes look good. Is this tested on SC7280 ? > >>> > >>> Hi Vikash, > >>> > >>> I didn't test it myself on sc7280 (just qcm6490-fp5) but dtx_diff > >>> reports no differences except for status = okay property being added, so > >>> there should be no change on those boards. See below. > >>> > >>> Regards > >>> Luca > >> > >> I tested on SC7280 (herobrine) and all good. > > > > Great, thanks! > > > > Regards > > Luca > > > >> > >> Regards, > >> Vikash > > > -- With best wishes Dmitry