Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp907745rdb; Fri, 1 Dec 2023 01:35:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEinIDLtksJ+ELG15d6GsnmQM++cH2Q84KbFKeWgwwWycI5l4ThFK9lUZqIDV71WMe2TFgX X-Received: by 2002:a17:902:e5c6:b0:1cf:de3e:e4ca with SMTP id u6-20020a170902e5c600b001cfde3ee4camr18801584plf.20.1701423299795; Fri, 01 Dec 2023 01:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701423299; cv=none; d=google.com; s=arc-20160816; b=MmTc8cnlJssw0gFdPFNIArvNQEq+YyvL22DCLPAc8ku97y9mtQarsQWhBIOHe/T3Jv vzdXZAWqmueGkOrrSh4kiSJuPlCvhS39tEN97h1KLktoXIAKcUL7Ka4dYb01kO8W0oIS ydp0j450jW9XmXhoa86nQcTYQ8UYi3o/zGl2Gb6MGDLCs52G1+znCCwg/cn2FNijjksa Q9QkjrczBZJ21i4LTcaA8L+FiTRtGEYfGGZ30cjFCudYBREPeehxLX9kES1kE4PsDnQd 0J/AMYEAdshR2vGIWOo+sAWGRZfO8XDXJX6YKPNvLkO2T4vvQXFAXL7Xqrh4bi/vMRHg 2ZFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=oZnkqmBniHnZdrQ3H0Htq6tTPHmc+KBhKFIvMd2nGfo=; fh=RbuVdAHdkZh3zmsnEBmnbXgcSPvehQVzUrpFzUODU6Y=; b=DbhZLGmIPrygCN8gX2ICC9fnDEv0MCUJGoJfkrKVnKaxB8ehsK4BCifrbc2xn64PM0 mw6F9MxdlKSbk6ir0EU4uWYZvsn5bhVZZfcttjfoGPGQP1jNlxX+2HQ4cAnWtlbzlG49 6rT6QDz0AgVF+qyit4uk6KePPFdfJKPpiSgris1bF5J1Hf7ILfEHsM3x4DGpE1VHhK3c BxIvFSgMDRiAG7nxxNB5jJw4CiV6fjYVqkxin82Y7kxzbRvvD4n9EgvuahN/2S1B9BSQ ps9iCONmPgEU1SG/wzZJ/xu95+PqkDOGu6YMzUmQBmEnF+HBpGc2ER2JqRW/71ZtbB2k QB/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b="3/USKZBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id l13-20020a170903120d00b001cfb316a183si3145142plh.141.2023.12.01.01.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 01:34:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b="3/USKZBT"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 51054833AB02; Fri, 1 Dec 2023 01:34:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378155AbjLAJee (ORCPT + 99 others); Fri, 1 Dec 2023 04:34:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378146AbjLAJeQ (ORCPT ); Fri, 1 Dec 2023 04:34:16 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCED93594 for ; Fri, 1 Dec 2023 01:33:46 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-54c6896a689so86594a12.2 for ; Fri, 01 Dec 2023 01:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1701423225; x=1702028025; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=oZnkqmBniHnZdrQ3H0Htq6tTPHmc+KBhKFIvMd2nGfo=; b=3/USKZBT9U5r3ON8z0C/0FP2StuPZ1WOGuqLuXknWK7ZRXXycnvwSRR05xuyomNL6x 1DekGSE/GKymCfwW/ZuzO6cYgq5En2Lq/9VBgm7OS60rUyqO28oy9etmS86EQuSPlAgw hTQoBR5nFNgKwD+HtlGOryGSgAdTkXdN568R4pTbt+PfudPgRErJ1lboNvwrmyxHNLcp GBjM1hjCPq9XiKyoKw0slZWrsvDa4CGrphUghhFRdJnL6b4/2mk29pjjeutobT9kIFEG 3jUfoTMSLr5teHPJ9eVotvPQnULCt0U/ub6/oYyBwnmLiDyNQjoSTzAgQZRonVTg41OD OemQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701423225; x=1702028025; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oZnkqmBniHnZdrQ3H0Htq6tTPHmc+KBhKFIvMd2nGfo=; b=Os9Fq+85RkcyZI7dpUC5erK60ARkwqyqdowq0rNWannRF3zr3SpeJ02eVNzLaZPVtH 0GAsIUhA7u5+AFtw5r+Hc5ntz+irDPey7ZjU/Io5tLclTpNmvhfylAKS29dj+h1Vol+s +rCmVUh3LVLAqHIi+JJnIuQbIUe8j3CYg9OzOpPICDgBgyXLn9vAF1DstoXS1Za1WtPL kdtO+MNgWs6Z+usqARlJ8BoAy5ubuqYHaHzJriRCxkj7tKABqZa+Ry7m7TUSA1ITYeAW REnCQHjtoMUILvuLD2FIhCdFJwTX1vuZXFmDBmkpVqfuLeC7k4o/IZg1ZASo1lpLvabn 6pLA== X-Gm-Message-State: AOJu0YzE7GsCAnCImL3/I207FNXGs8ppC+Uv+E+C/8Ozl/Ld7rC6KE+K g1tRX8253eb0+bM+WD3NTEdqfw== X-Received: by 2002:a50:d756:0:b0:54b:7e11:c1 with SMTP id i22-20020a50d756000000b0054b7e1100c1mr584027edj.10.1701423225346; Fri, 01 Dec 2023 01:33:45 -0800 (PST) Received: from otso.luca.vpn.lucaweiss.eu (dhcp-089-099-055-216.chello.nl. [89.99.55.216]) by smtp.gmail.com with ESMTPSA id b16-20020a05640202d000b0054bbc6b6580sm1423708edx.31.2023.12.01.01.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 01:33:44 -0800 (PST) From: Luca Weiss Date: Fri, 01 Dec 2023 10:33:19 +0100 Subject: [PATCH v3 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231201-sc7280-venus-pas-v3-2-bc132dc5fc30@fairphone.com> References: <20231201-sc7280-venus-pas-v3-0-bc132dc5fc30@fairphone.com> In-Reply-To: <20231201-sc7280-venus-pas-v3-0-bc132dc5fc30@fairphone.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , cros-qcom-dts-watchers@chromium.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: ~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, Luca Weiss X-Mailer: b4 0.12.4 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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 01 Dec 2023 01:34:57 -0800 (PST) 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. We also need to move the secure SID 0x2184 for iommu since (on some boards) we cannot touch that. 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 | 11 +++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 9 +++------ 2 files changed, 14 insertions(+), 6 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..459ff877df54 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi @@ -104,6 +104,17 @@ &scm { dma-coherent; }; +&venus { + iommus = <&apps_smmu 0x2180 0x20>, + <&apps_smmu 0x2184 0x20>; + + 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 326897af117a..0ff9a2484096 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -3836,10 +3836,11 @@ venus: video-codec@aa00000 { <&mmss_noc MASTER_VIDEO_P0 0 &mc_virt SLAVE_EBI1 0>; interconnect-names = "cpu-cfg", "video-mem"; - iommus = <&apps_smmu 0x2180 0x20>, - <&apps_smmu 0x2184 0x20>; + iommus = <&apps_smmu 0x2180 0x20>; memory-region = <&video_mem>; + status = "disabled"; + video-decoder { compatible = "venus-decoder"; }; @@ -3848,10 +3849,6 @@ video-encoder { compatible = "venus-encoder"; }; - video-firmware { - iommus = <&apps_smmu 0x21a2 0x0>; - }; - venus_opp_table: opp-table { compatible = "operating-points-v2"; -- 2.43.0