Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1058469rdh; Fri, 24 Nov 2023 04:31:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtqVWXd4ddU2f513NmquK9DS5Cagsn/hcKe417pOObHP16PDJToYs7z2kKmltGKoQPKI4s X-Received: by 2002:a05:6808:1282:b0:3b8:4dd1:9778 with SMTP id a2-20020a056808128200b003b84dd19778mr3543926oiw.12.1700829079838; Fri, 24 Nov 2023 04:31:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700829079; cv=none; d=google.com; s=arc-20160816; b=yvUVt7GQidG1Ku6i3XaM3JOg3O9Y3yoqGNXcO9qCRdvAP04ccSIePzexfEiGy09aFJ hJl9YmHf8QbwwSvXsSxQM0WngNO5qcOwoBx7RALt0OlnpMMfTAXgkOVJpp7V0fYe6cx/ LVnbZonBkxbn1zFJ9JM0TAx2JJxpvlHYx3uDHRpGhKnKSY9hL69CwDTkg1vMjZZtN8ZN pvCwY3XVqK88a8fhiRf/hyGAI48OnxeHXbY8Rs4LgVm70D5UmIgzUDOiaKyN5w31pdEa f6l48fd9PAjPPkZvKLRoA13MRHewwjFilJCWHe/V2G4prUFxxQEijlQTinH4eODgbUbj o5Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=E+uhhrwE0lBW1HCbABnxn7Q6DvKrVi6bSAwgVFhmrS0=; fh=sMel+Zbk5GsPVU20XG7g9y0Vs7og2qFK7xnwUyRPnu8=; b=N13m4l+jvo8DPvKHpLs42C/HZTSn7AoDdx+O82kudY3lCBJRJn/ZghlbCtGXvTAFQu Hn5B7pxCIrpIaBO2oWprmIjctrOWPGboPg6SyoKnj27IQnJLqkL4PLDbXNrG0FxDqj59 oPz7eJz+mEQG+W/UaRwXPWxJaX0JozH9kr3lUKCtuTnPXnG2uk0aBPFpEcTJ8AWxuG9e r0aJBzMIOH4ujadYQ41zHSu7QPGk49pIayB8EJD3niLjev+8Dqa4KsBwbkC8xtNPf9gm tXWPAb9W9HUHQhn0VOY7cTWYmOdMZl/fTPM8gW7XzHlHdoIXchbSfnk24CEwX22x2KlS FjYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fbToO+Yz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ay34-20020a056808302200b003b83399ca30si1240476oib.46.2023.11.24.04.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 04:31:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fbToO+Yz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id BBD918090784; Fri, 24 Nov 2023 04:30:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230418AbjKXM3z (ORCPT + 99 others); Fri, 24 Nov 2023 07:29:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbjKXM3y (ORCPT ); Fri, 24 Nov 2023 07:29:54 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51169B6; Fri, 24 Nov 2023 04:30:00 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AOAmVcP006462; Fri, 24 Nov 2023 12:29:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=E+uhhrwE0lBW1HCbABnxn7Q6DvKrVi6bSAwgVFhmrS0=; b=fbToO+YzZLMLBUjd+dPCzkgV+3JmgcUezpWyYrx7imjTX5CoCCdL4X8ywuIBrzkkX3DN cVQHh9ROjwxvreyHtkTnhYlAbEJO5X/iGo8uLQ2NFdsMDsW48pL8a2ujy2XTZ5JYQoIV +jtx/JFMUJpt3KZo+OcVihMzxuySTerCe9iyLRLkgEg6VOijKpAH2mpz5Tqg3RHnPLnn ArS6HcGtgr0CI1fO3qr4uIflfO+z/YWx4cqUyEzbfP7A+DRDHoB4VSvmZRQeVOj7T72V ijWR7KV2DitfT0VjCRKkEunozZwCLEzvHeXZBBfS1QhyR9i7ekDkpAxRu5ze0yTICxX9 uA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ujtd8g615-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 12:29:52 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AOCTqr0001683 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 12:29:52 GMT Received: from [10.216.35.253] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 24 Nov 2023 04:29:46 -0800 Message-ID: Date: Fri, 24 Nov 2023 17:59:43 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common Content-Language: en-US To: Luca Weiss , Stanimir Varbanov , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: <~postmarketos/upstreaming@lists.sr.ht>, , , , , 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> From: Vikash Garodia In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Ty8QG3gRwUxx8l7l2JZD7PyzeyMM1R1e X-Proofpoint-GUID: Ty8QG3gRwUxx8l7l2JZD7PyzeyMM1R1e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-23_15,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311240097 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 24 Nov 2023 04:30:15 -0800 (PST) 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]. 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 >