Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp878716rwr; Fri, 5 May 2023 06:22:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5FMMLrenZJ3TLnoYIcOGxbOtbNMqE1tZrzZ+bB3HXjzdjy3ShsuQN9NqfPxAxXo3/uXnPs X-Received: by 2002:a17:90b:4ac8:b0:24e:507:7408 with SMTP id mh8-20020a17090b4ac800b0024e05077408mr1510067pjb.37.1683292966411; Fri, 05 May 2023 06:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683292966; cv=none; d=google.com; s=arc-20160816; b=Hm6O628VeoJKk5T/HKHzPPXh3G7ptjttdo2o7F2f9kvRggQE81RIFbXVuYzFDUEevI yG/nriIxc17DafwLMchAf5V5flUI2SEtwVQHHBId7xhTBnInTC2fXmT15qLtVdF2+xfA MfG+VzG9dy3pC0r3Yh2hfUWWUSXV/dy2lu9FMDNhPa0TjKM//fr7ZvWtInZfVXtOi3Pm 6fN1lpaaNTm3YUf8gATqHfeEsgEwVmM7XK9LY7vhsSS+i8QBoANA3bu3Pr9/eudBNVJ7 so5qUmAOcv9nPFPHst0XW8qrZMe0wkntkYSb2WsIsqaAj871RXeHLrlOIvCOBdPrlHEC ANeQ== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=yppvM9mo+aLKslS+25R4RlpqOihLSCJGVrhyXbQmvrc=; b=d1ca3QbnZi8tdSzOQktXSQ+l5gPi4XG165aGBXYYJ/UV6fWXobzIQxl6I0zLqsp3ar 1eUU3zehsFqGnNiVWgy90yEhhvt7zn/zp4FqCPNFu4KO+VJ1QuCV8xLG1k7Lxfp1j5Lk A4w1dlgQ8SCJnjgJLi7P8mEBYTXwT3lHfdXcgCowIMZ79USEpoYPy9nzEGfrAMlHLOzx X8n+sCKoPrueJ7AjxjN3Hw9NW5yaandy34DunsV9rO60OrN3wBDw8IVA8D2qUriS5IMl AraS7HblTBsIwW9P2rkc8hL5/z66kfF63zGWiHesGZToJseFWkIB5pLO8nmyfkp26Kew 6EhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HloXgDBz; 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 e7-20020a17090301c700b001aaedf8d047si1810482plh.354.2023.05.05.06.22.33; Fri, 05 May 2023 06:22:46 -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=HloXgDBz; 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 S232302AbjEENBR (ORCPT + 99 others); Fri, 5 May 2023 09:01:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjEENBP (ORCPT ); Fri, 5 May 2023 09:01:15 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC56A1E988; Fri, 5 May 2023 06:01:14 -0700 (PDT) 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 345BmmTu030028; Fri, 5 May 2023 13:00:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=yppvM9mo+aLKslS+25R4RlpqOihLSCJGVrhyXbQmvrc=; b=HloXgDBzCnB++knWBwhtgy2fWpG7Z/E/1YWl/gMrjb1Lrh6C+EjMLF2y4wGhpbU+ZfLQ Gx0gHWHNG49LgYbwaVr4jm2GdjDphZIhplC8PnjxkBIASnu1Ub5F3Uh5dTfL8TOJm4OI hyLu4lZCasikEglQn7hxVsotVVfMKketqawvZQhjZ2A+9pnyypQ5fQcWIXEiRX8JSXaE eXKRtPDAaUNbDvlJQ+4OQmlbaSj5wNj4empAoTPiX6bKabWT7SRk/rBhjYvCrYKuolwe 4HypxzuRUE0WQ2+OVnqTAaz0mbdM84KWJ/d1X6830MGbZ9Itp4YEkFP4XJ449Yy6a2LI 9w== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qckf71mkg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 May 2023 13:00:42 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 345D0fMB008625 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 May 2023 13:00:41 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 06:00:36 -0700 Message-ID: <579f3480-1cbc-5688-7226-986205b5825e@quicinc.com> Date: Fri, 5 May 2023 18:30:33 +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 From: Vikash Garodia 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> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed 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: YIpR0oCdUPuyh5BPzjeJAS4uaiEDZiEa X-Proofpoint-ORIG-GUID: YIpR0oCdUPuyh5BPzjeJAS4uaiEDZiEa 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 clxscore=1015 spamscore=0 bulkscore=0 phishscore=0 adultscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305050108 X-Spam-Status: No, score=-7.1 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 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/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. >> 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, >>