Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp885259rwr; Fri, 5 May 2023 06:27:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7d1VDuEpgzBo/8XzQFn9JDe4naYZZkep63a1D1VkuV0ybMfoxHm8Hrs+pZis7p8mHud0RB X-Received: by 2002:aa7:88c3:0:b0:641:1f51:bae2 with SMTP id k3-20020aa788c3000000b006411f51bae2mr2444900pff.6.1683293262223; Fri, 05 May 2023 06:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683293262; cv=none; d=google.com; s=arc-20160816; b=IaRUlle65EKd3zY7kuhP8gmOTIGRmDizILXGvFv3YSPFgRDClfehtVl/n4Mr/R4zaO AJE1YT2u3hK24+pZ7Npsue3g5jcH7eFUzxQFdF/cpwJIlcFFhcMuA7UJZfZ6frDNg0Wq IPDCEfjtrd4Vsn/jq4jCzUdzIf48mPkVNSSPyso/gurXrZnmrlVerzYrl76AJhI2Xpwl j40SArl55bhZku4gsBCEM7r0hs6uw6j7bWR/4y5ok1s9vzTm7RlwveS1aY5/hVewt1yE W0UkNO3mNzPAltR1jSJ+zZjgn53H+deO0jJ8BYMKcaf+nnWp15dbyKDAv3Gopm2sKaVW yDtg== 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=xpWpbthV44/sis8Gr11hrBiV7oIIZtWzEBHlWZoLyO0=; b=QcP+LIcfCjYYzp1LeVBlM0F5PHnuJJH/gGEmiC5O6UAs0KWrxjzJYONLRudLXMXS/H YmJP724ZKVFo8ryFPAof8jCZr5lMMquw4+ng2SDpUANkap1Jvb3w+O8kj69QoDBzZW1+ V/SmvS145c38JJqORoKA6VEJXxj/dYrc83w5Xrtl5VE/e8SGNGjPDIM5LcfoR4OApHbt tb4p4wNCkvEskCecRthAeHPVuQF4GjwnVXQOrMAZivSCJ61cPRxYDVU0/bWgWikHtgEY pQLZKWWWnftPtCVes8rrFARUYOaXSXUE5rpM2dDAE3p0jKV2x3omqH8no96TUakmu/JO 5m3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=I38GAAHR; 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 y28-20020aa7943c000000b006438a9c45b0si2057305pfo.109.2023.05.05.06.27.28; Fri, 05 May 2023 06:27:42 -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=I38GAAHR; 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 S232054AbjEEM6k (ORCPT + 99 others); Fri, 5 May 2023 08:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbjEEM6j (ORCPT ); Fri, 5 May 2023 08:58:39 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07C371E991; Fri, 5 May 2023 05:58:37 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 345CjKO4024500; Fri, 5 May 2023 12:58:06 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=xpWpbthV44/sis8Gr11hrBiV7oIIZtWzEBHlWZoLyO0=; b=I38GAAHRb+QAk/MKkFqsJVV/4CNQjPqpGpfOMgpCOP7LqIyZMnfE6naYKiM4sqCl0GAu 4fO9iTdrlyl007ngAcPxyUpUTELM7pe+6utYkuFJZ37UUdaS9/FijBioih2i1bmqudhh hgh0RtQAnRSIYyP+b674QN8JYsuWuMBnk2w73TfwN+//2fhQGdoNnRbJm6UJdHY5A39W 7IHxim1EPJ/2FMZkBn6S3mAaYRfJIAUTsePHsgGasg+plLZksrbr8M4Raj8dps0Ci9DI jgRhlz6BBCCz+3qJsMyMzTY3kB+xPjlg8xK2SIoFsflhQgJ7QKHG/FNYNNDFBxEQcgbt Dg== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qctfq0xrk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 May 2023 12:58:06 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 345Cw5Gw015856 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 May 2023 12:58:05 GMT Received: from [10.216.37.178] (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; Fri, 5 May 2023 05:58:00 -0700 Message-ID: Date: Fri, 5 May 2023 18:27:57 +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> From: Vikash Garodia In-Reply-To: <20230228-topic-venus-v2-6-d95d14949c79@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed 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: IL5qofjT3Thm3xI4SLtCuIZka4FwDU8w X-Proofpoint-ORIG-GUID: IL5qofjT3Thm3xI4SLtCuIZka4FwDU8w 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-05_20,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305050107 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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/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.. > > 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, >