Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1350229rwr; Fri, 5 May 2023 12:43:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vgfYkaZWZqdf+JMO6KxA4tfUc2NOJQxCwe3Dc5M/v2EDyd8FZf6/chiPWB5hBUtHHdAS3 X-Received: by 2002:a17:902:eb4b:b0:1a6:7632:2b20 with SMTP id i11-20020a170902eb4b00b001a676322b20mr2626078pli.40.1683315796558; Fri, 05 May 2023 12:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683315796; cv=none; d=google.com; s=arc-20160816; b=o8XwxtBAA9c1hNqHSryHzV/ZC7ma/LqKFQXYn8Agn3vMtUfK1hTU/BhbzTNWhc8zEX SXgr3W6H97W4EtUiuv/BS/MU5LQlcvnHNZSgnjwMTZq1UT8zQ5wcChDhb3OyiX5IhIaK rTR1M7dm/OEAXx4LAihmsM3HYaWu5i8sY2zDEr/vhr/9lqV5teUdjD8p0eLwncOLKe0V Y7aKzvbRo3Uhs3VWRKLlzA8vy53JSdU23gfHknNlZdGS1NCSabtD+Hxh10O6YVHvppP/ 2YWT4CCEqv4vxb17Goy7KonmVZsnElOUPd8uXjAIRKZk1Nsr6LhpWEAXH/Ff9PUUzHhz d+FQ== 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=WFtYkfF8p6muyP6sCedXWbjjpL9Y5mT+RA/iKNtBB10=; b=qsGpY5Impm95ts6p4Kqtvv1Qsf5E5mqXIJbUQzhJE0evBHt/N82TM8izvCTOznU3dR QEyerCmQ2kN2nKRfw7Cg6d7UfPQsWH4HmvX8oYZMsT9GWsww6VsLghWl1271qhDJaM6w Q7yiewaF1eZvtFGMGw8MJzaPYkWCJwcEWWSS/hmnHUBnxzYzkHqoUxk9TaKT6unDZRSk pSu22HHg2iJF6E5pD4G7lN6V6Hi8zR3AySpYsRBJDBUF5xksrMLGbiV1zCl6jSUkXNgo acDc6v4xwc27bwB5uPvv6MNbZaj8ytcsR8nMdR7utfIeHAwg4MCpr1f5dg3oplAdFQEx AsxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VJ3LTdfp; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb22-20020a170903259600b001a6a636eb6dsi2188393plb.215.2023.05.05.12.43.01; Fri, 05 May 2023 12:43:16 -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=@linaro.org header.s=google header.b=VJ3LTdfp; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231636AbjEETYV (ORCPT + 99 others); Fri, 5 May 2023 15:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233092AbjEETYU (ORCPT ); Fri, 5 May 2023 15:24:20 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 021854ECE for ; Fri, 5 May 2023 12:24:16 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f004943558so2473547e87.3 for ; Fri, 05 May 2023 12:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683314654; x=1685906654; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WFtYkfF8p6muyP6sCedXWbjjpL9Y5mT+RA/iKNtBB10=; b=VJ3LTdfpRrRm4cs5dtmtqonfhNqUXH23FibixicFrTmZRVei3kjJhYv+BuKziaFbQW KLz5rSjmnkHN22BFCqt400ZTtqtKEvqlqxIlmfE/5DY4kFDiOWtpH/4cUcrPS4E3DX/v 8rM7/CU8GhkUd+Ck/CPQ5P8/eecBk/5Q6L6mPfQZY7DmeYjoIb5ChQ72HOtkimkfScXS h7NGPWVK37KTsQfX6kkLJlspagmr0NF/Fvf0CDE/8iEibJ69PL+5VOrNIkKZUWBWp7Sc 2GsGFUmlJ9mJo7xLvrUjc+ayGbFOi7UilS0bqbNCrCU6OL1ZRINKl7H4ZqmcCK9dI86c dvZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683314654; x=1685906654; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WFtYkfF8p6muyP6sCedXWbjjpL9Y5mT+RA/iKNtBB10=; b=Xim6/lKlXia9sTCBOHx4RlRJjA4wd9EhSuH66vyNoViG0I7xE+UHdhutLJflgDcYPq 59NGvwo2F35dfRMe3+cfZqR6gg8XYV0x2dbeO/wfbaTAzDkttFyLNrA7RLNXORRPQEDH X7n6aAPvPBIebD342Zhtk5YvUvbunxXfRYGvgWoqSDXS7qCqllF/PZkyMSoK7TrYXJDp 1RbS8LasKoLNilvCkGHLXDLNfjMpznpkRV02107FOgYOjC8270X9dFLwKHyQy35sgF2l WX/Ogr8XR9etFe1q3vjTgnm7aMXfM6fNqy8ceEJwPvWY05VW3/V18EtRxjJUtBXIOAEx M9lg== X-Gm-Message-State: AC+VfDzOzRCfq8jtiPFsmMYuAPrmC8icxYzAT28S4SHGn+m+WtCvvri4 pWdoi5Rcs2Dn1aH1rivoTHX/BA== X-Received: by 2002:ac2:5a5e:0:b0:4f1:3b3e:2143 with SMTP id r30-20020ac25a5e000000b004f13b3e2143mr693303lfn.38.1683314654273; Fri, 05 May 2023 12:24:14 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id z28-20020a05651c023c00b002ab59a09d75sm84477ljn.120.2023.05.05.12.24.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 May 2023 12:24:13 -0700 (PDT) Message-ID: <9acc7001-2b3a-f635-9814-95850a71f142@linaro.org> Date: Fri, 5 May 2023 21:24:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v2 06/18] media: venus: firmware: Leave a clue for homegrown porters Content-Language: en-US To: Vikash Garodia , 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 , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, 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> From: Konrad Dybcio In-Reply-To: <579f3480-1cbc-5688-7226-986205b5825e@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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, >>>