Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1111982rdh; Fri, 24 Nov 2023 05:37:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcX6tluE8Ub18FnPOfXv7uMQ7lRm21k3uXNBTlCpwLw8AVeRLFrtToKJvfm658gwVOl/eL X-Received: by 2002:a17:902:f60a:b0:1ce:6669:3260 with SMTP id n10-20020a170902f60a00b001ce66693260mr3865150plg.67.1700833052126; Fri, 24 Nov 2023 05:37:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700833052; cv=none; d=google.com; s=arc-20160816; b=bgbPZy+tGQedJVBn8a41wwlHn3KH7xo2K6nk4rftXI57sTaWpnmez2SS3MMdZPCUuD 8Oc4khfwnR4eCgMm0tm5ailq67n57NM6HM8JmDaoCGpB3jOo9/9BgOmjRM4PVno0SxSx seq7yTzYARlwQu7/x1BPVgobmbmHmW2+FpiPuUA0zJAFX4/jtNvyb58Ebebh6YP+M0Ic MMEEfCx+3oBV28zD/qpFJJZZqCKLv0wSz3ehpU3S/IYmF0GBdDvYB8WFLh0espgBPAFa ZFVP+DWd26nzn+RMBYBHzpBfe9a5MlA0m21lnID5Ps5VAusgtWSrIrRoaOzrvXrPZjw7 j/uw== 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=+R2Z2mui4vhi2W3BWLJFCXxNxKXVWypDUeYDVpwIypo=; fh=zsKO78Kt4zrl7b6Omavx1ZRNooKTd3f9YtU5u6uH7vg=; b=OQikHKMf46NPu74/JqATuHQaJWD885zA/Li02zNosU0KPqAOep9vJEo0dmOrcm1zNM KpsBLNRWyxhz6BIcmPrsSXaXvDBgeVSqcvrYLlseBGkVX9o2TkpMhQ9XDGObooRQh6Ao SlQ+yUMe5aXUBTWLItuDk9PRRR/ymTQBGy+JrQd4+2YUDrxRUH0nPpfF3k7vztcahr18 oxgQKDDtWnN0Z2YE1cvQJYMfIOKzmlfyz8c7hILA8GhqgPpTM5iWYIVltl6R1WvnmR+L LhkIXF+zBjsZKAig8WSELS76m75rJmoUHM+adY6CJx644BuXkyilZexTSYOCIxVbJYjw WCYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=F858Zkew; 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 ju12-20020a170903428c00b001cf58065627si3371614plb.303.2023.11.24.05.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 05:37:32 -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=F858Zkew; 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 CF2C4808D4BC; Fri, 24 Nov 2023 05:35:52 -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 S230450AbjKXNf2 (ORCPT + 99 others); Fri, 24 Nov 2023 08:35:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjKXNfO (ORCPT ); Fri, 24 Nov 2023 08:35:14 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2F41BDA; Fri, 24 Nov 2023 05:35:20 -0800 (PST) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AOB66Yc021975; Fri, 24 Nov 2023 13:35:10 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=+R2Z2mui4vhi2W3BWLJFCXxNxKXVWypDUeYDVpwIypo=; b=F858ZkewDQJhSnp9iBgQtQmDiD9R4DpEM7wb/4pTqNfLIOQPuoMu4PtlISgIe+TnOisn pG448+wfx5cveZovZ4FYN9nSyqN+cHknPfXY4ZB52c8Eizm+Ju/rLOM9zO9+JcObCGJR FOrA9MYsQGXWm/t/qpYJNI7GbyiBPLacPN5S9sS34eszRj7d3Q2eImznY+i//iB1xizH IDvF/WdCgf2P9k+/pjAAyKDZLh6x8vHE76JkC3ZQMAPupRLcaeimN4PAjec/nHgncqMq J0Djf9/u/xaGqxKZt97VxQsB6UY25oj60iHbaPgiSOAb/CF3huvcYr9DaUyVXnumVaEB 1A== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uhwmec377-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 13:35:10 +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 3AODZ9Tt025066 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Nov 2023 13:35:09 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 05:35:04 -0800 Message-ID: Date: Fri, 24 Nov 2023 19:05:00 +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: Dmitry Baryshkov CC: Luca Weiss , Stanimir Varbanov , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , , Rob Herring , Krzysztof Kozlowski , Conor Dooley , <~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: nasanex01a.na.qualcomm.com (10.52.223.231) 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-GUID: TSlz7DsFHz2MxteAoyLfcdPS2NtftLR4 X-Proofpoint-ORIG-GUID: TSlz7DsFHz2MxteAoyLfcdPS2NtftLR4 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 suspectscore=0 clxscore=1011 priorityscore=1501 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311240106 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 05:35:53 -0800 (PST) On 11/24/2023 6:23 PM, Dmitry Baryshkov wrote: > 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 Tested on QCM6490 IDP board, which is QCOM internal board similar to RB3 gen2. >> >> 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 >>> >> > >