Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5702747rwr; Tue, 9 May 2023 05:23:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ekryO9ikhhj7JvaQt76sZJeNvuACAeEfn7/GtVZ27/hVuBmxChcPfQsSZ44RFPNYtFzhu X-Received: by 2002:a05:6a20:9389:b0:ff:e397:cb7e with SMTP id x9-20020a056a20938900b000ffe397cb7emr12814777pzh.33.1683635004947; Tue, 09 May 2023 05:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683635004; cv=none; d=google.com; s=arc-20160816; b=rJmS3cVe7KWSPk9b//hsMeDi924qTOyyRCYT3ej08BpgKlfr3VdL5GZsDsXJFjeG0u tBQoi3u8B90f3pFGFBcveIZCrh8yXZLKjCj41nH/FUlNIprdG5vOWdjW1A/1yl7FElbm 16bkbGAJUgOjT+2QTRL/7btty5zRp6mpyJB0USIFckthY72Kqe4qMNsbLUI/ACfzO3x9 otzEKq2580HyBdzEwKZQGQWS0mnDf1OyS/dwQ/iIj6M1zYGQoy2PWHakx+UTXQrmSJQS HWNRgPivScKrGxX6QqhCeMnbRUop/9gzrurhVQ7lOcxF46unsdLpjOrHIK3zHLFwcj4g YFyQ== 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=rFWxx/yqlbgsjzLBRvryLMRgg6Bs28xakqZEhpRdvDk=; b=vo90kjqVwORuhYZw+BMr0PaR6Jkjkojnkihe8oScu8ed5K0Qn1iMbPGsIz5+PspiCc uOFNZwx41FfnKRrj0DPQ6gTRX0jz+SCHjADgV4lDgfY7td4zxIq4pILekh0YCUpCx/6U dqC03AYBXFa8IzWsAhw8I/d9ExgDPSFj3ahYpH0Pa3i90o/hTrQMvrLJXr0EB9HLmlee +t0TjwkpzDCi4r15AQRwgTeql1wO075kLQP9EJW4sCnynTwkvWZ66Ccze3zRy4uJ5rMp 2rIrRB98ucq/jq5/vTk4fwNLMkzW0no2BPNz5K7P5SondPLjC9gjBvgdxrA9rDcg3AiI SaKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=itoPX8Zi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l136-20020a633e8e000000b00528d90d40e4si1410507pga.88.2023.05.09.05.23.12; Tue, 09 May 2023 05:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=itoPX8Zi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235188AbjEIMBo (ORCPT + 99 others); Tue, 9 May 2023 08:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233995AbjEIMBk (ORCPT ); Tue, 9 May 2023 08:01:40 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEDBB1713; Tue, 9 May 2023 05:01:38 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 349ASFxM018918; Tue, 9 May 2023 12:01:04 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=rFWxx/yqlbgsjzLBRvryLMRgg6Bs28xakqZEhpRdvDk=; b=itoPX8Zik6FYry9BLDl31+MD2lHs5A+aI8LKqULHiXbdA+9l9X1i8xEI3Nx3aOD6M0YI sF25OVkf6TNnh6BHN24JWt7K9RvcFzGXuCtdBnvKXXqwC2PwzBdkxfqjl56f9zTKJ/Ha Ry+el3VLK0f6UEfyiw01Ju5WzhrdfbOcppOtwkItBwy1A7inAggEFxDX8IvCcGrEkWhr OpxYyibFe/Wjoi2Nv7SZ8pxLQ7IH3XQr+9iTvhIHL6fAab7b9nNp2XRplHUwuVZxn5VR VTFmMpm1i7PvGEQ1/yEdDUcn62YaybR92oifcxRJUloFXvd3j7o0062tTJZ3900l5Ps1 ag== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qf77g1pbm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 May 2023 12:01:03 +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 349C12xF029893 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 9 May 2023 12:01:02 GMT Received: from [10.216.61.171] (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.986.42; Tue, 9 May 2023 05:00:57 -0700 Message-ID: Date: Tue, 9 May 2023 17:30:54 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2 06/18] media: venus: firmware: Leave a clue for homegrown porters Content-Language: en-US To: Konrad Dybcio , Stanimir Varbanov , Andy Gross , "Bjorn Andersson" , Mauro Carvalho Chehab , Dikshita Agarwal , Bryan O'Donoghue , Mansur Alisha Shaik , Jonathan Marek , Hans Verkuil , Dikshita Agarwal CC: Mauro Carvalho Chehab , Stanimir Varbanov , , , , "Marijn Suijten" References: <20230228-topic-venus-v2-0-d95d14949c79@linaro.org> <20230228-topic-venus-v2-6-d95d14949c79@linaro.org> <579f3480-1cbc-5688-7226-986205b5825e@quicinc.com> <9acc7001-2b3a-f635-9814-95850a71f142@linaro.org> From: Vikash Garodia In-Reply-To: <9acc7001-2b3a-f635-9814-95850a71f142@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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-GUID: ccT-cbVLcZ4lCLkVG6q3EMx18l-HkrZs X-Proofpoint-ORIG-GUID: ccT-cbVLcZ4lCLkVG6q3EMx18l-HkrZs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-09_08,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 mlxscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305090096 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/6/2023 12:54 AM, Konrad Dybcio wrote: > > > On 5.05.2023 15:00, Vikash Garodia wrote: >> >> On 5/5/2023 6:27 PM, Vikash Garodia wrote: >>> >>> On 5/4/2023 1:31 PM, Konrad Dybcio wrote: >>>> Leave a clue about where the seemingly magic values come from, as it >>>> is not obvious and requires some digging downstream.. >> Rephrase the commit text. > Please be more specific, do you want me to use the > explanations you gave in the previous reply? Something which describes the patch like - Add comments to describe the arguments of the qcom_scm_mem_protect_video_var TZ call. The TZ call programs the video hardware with CP and non-CP VARs, and the comments describes these VARs. > Konrad >>>> Reviewed-by: Dikshita Agarwal >>>> Signed-off-by: Konrad Dybcio >>> Reviewed-by: Vikash Garodia >>>> --- >>>>   drivers/media/platform/qcom/venus/firmware.c | 7 +++++++ >>>>   1 file changed, 7 insertions(+) >>>> >>>> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c >>>> index cfb11c551167..a4cd919e1dbe 100644 >>>> --- a/drivers/media/platform/qcom/venus/firmware.c >>>> +++ b/drivers/media/platform/qcom/venus/firmware.c >>>> @@ -241,6 +241,13 @@ int venus_boot(struct venus_core *core) >>>>           return ret; >>>>         if (core->use_tz && res->cp_size) { >>>> +        /* >>>> +         * Clues for porting using downstream data: >>>> +         * cp_start = 0 >>>> +         * cp_size = venus_ns/virtual-addr-pool[0] (yes, addr not size) >>> >>> The field is the start address of ns context bank. Since the cp_start is 0, the start address for (next) non-secure context bank >>> >>> is interpreted as size of the (previous) content protection region. >>> >>>> +         * cp_nonpixel_start = venus_sec_non_pixel/virtual-addr-pool[0] >>>> +         * cp_nonpixel_size = venus_sec_non_pixel/virtual-addr-pool[1] >>>> +         */ >>>>           ret = qcom_scm_mem_protect_video_var(res->cp_start, >>>>                                res->cp_size, >>>>                                res->cp_nonpixel_start, >>>>