Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp460207rwd; Thu, 1 Jun 2023 02:41:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/Ng7n5Pt+QxOI0XJafnhIXZW5zdWzXuYmmrZ6cSK37bgkCN07etXN/GvV77e0R+AtdoyV X-Received: by 2002:aca:f088:0:b0:383:e7c8:4000 with SMTP id o130-20020acaf088000000b00383e7c84000mr6005036oih.13.1685612465056; Thu, 01 Jun 2023 02:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685612465; cv=none; d=google.com; s=arc-20160816; b=YIw5vEi9t9C66dzX2i4PpfWP/BJR+RcboxLxVYNPdupxbWJldZbBuwVzZKjkxocu3x X9v2B3fbpLwd3DMbAmt3idVkMuLO7XJ2MmFQS3F82m1NIkBEa4rVOGthfKmWT0syRwgb QGnukYg0OuzdyGknh55F6P6MdSNfqbTT11/8VZTw+1w/pmsb14ObkZ4HIAI+kqIs3Nje i3aeXNA2MhmyMTCmCd9RPVxGNe/vK9IcPH0qJ4xZnu5qGF3oHS6eydC0ziWqHAzYG8lL OzhTQnN45V0P8WX7dDLikA0ohumDTCcpgFCx09pD2/T1qyTWOn8ar9svkS2ybkIhfKAK WW3A== 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=kLIUPfQmqnMIdi7e8ywqa+Rf72MzJTJnCXZYDDG6uqg=; b=bpeiYZkwF0ikH+mYl5ji0LQCnebcPjWRib0YEhyt5eda6YexZoyZEeCic8n0XNgxkW LZTjHzz0B3toHt6+2Vsps2Ryny9FfixEkebe311H68l3AT2OH/830qurXwgk+urWdv2s AA8kK2vjFpjr2r0PHZNbl4nApIIEOyugIl2GRfQC6oPuwaYrHz9aaXJwO90ovddRgkSq baGQO+id6VZbp1yHLpSbv62Gnq6l9Q9mmxkwOr7wBQw0BQ77sujFzvCd3daUj3Eb2wri IM9crSNXw4vU/teRikahZYi6f1bsQH40k1X5N79xHBgzCM/g4jm9WS3mpNzxm6K6aGl5 GP4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fV7PC7pT; 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 u78-20020a627951000000b0063b89234a5asi3557729pfc.371.2023.06.01.02.40.51; Thu, 01 Jun 2023 02:41:04 -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=fV7PC7pT; 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 S232411AbjFAJfZ (ORCPT + 99 others); Thu, 1 Jun 2023 05:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjFAJfX (ORCPT ); Thu, 1 Jun 2023 05:35:23 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEEA5AA; Thu, 1 Jun 2023 02:35:21 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3518fGjI012801; Thu, 1 Jun 2023 09:34:51 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=kLIUPfQmqnMIdi7e8ywqa+Rf72MzJTJnCXZYDDG6uqg=; b=fV7PC7pTQh6i+niQ6TYb6zYiwX/zIKu0jBKbW4Uf0SyS/FdgoXDUXSyGeKJ/ObRVBryQ zPmtoVXcyKyVErOacHL//6KNrkDpNiXz/8E0xbwz6LZY4FBSfdJledUhCk9+qYPUkzeJ upN6znFt/OMNGlAgf7yUOz16aLy1fk7bKaZ+hPL9YNeM8oOrr6/Qj5CyKeUA2KCkAjgt LwIToK2XRGXlUH1TcTqbJlaORxahI23DFAHS3yw789e/Ylj4BW5CwnukJvvgmNLmoLH9 Y56Ss0E/LPSIt3lldzTLv6gdW2HQ6jPAidh6s5nU+Xjg2xE9DgZsXogVM0V31+RBNbBA NQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qxqne85kh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 09:34:51 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3519Yphm024271 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Jun 2023 09:34:51 GMT Received: from [10.50.56.241] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Thu, 1 Jun 2023 02:34:45 -0700 Message-ID: <5fff8ba1-9cb3-e872-1a10-e44ee3af93df@quicinc.com> Date: Thu, 1 Jun 2023 15:04:42 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v4 12/17] media: venus: firmware: Sanitize per-VPU-version Content-Language: en-US To: Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , "Mauro Carvalho Chehab" , Dikshita Agarwal , Bryan O'Donoghue , Mansur Alisha Shaik , Jonathan Marek , Hans Verkuil CC: Mauro Carvalho Chehab , Stanimir Varbanov , , , , "Marijn Suijten" References: <20230228-topic-venus-v4-0-feebb2f6e9b8@linaro.org> <20230228-topic-venus-v4-12-feebb2f6e9b8@linaro.org> From: Dikshita Agarwal In-Reply-To: <20230228-topic-venus-v4-12-feebb2f6e9b8@linaro.org> 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 nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 6ArkyqZq3O9Zoe0gJQiz0nmhfNVPxptd X-Proofpoint-GUID: 6ArkyqZq3O9Zoe0gJQiz0nmhfNVPxptd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-01_06,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010085 X-Spam-Status: No, score=-2.9 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/30/2023 6:00 PM, Konrad Dybcio wrote: > Replace the general IS_V6 checks with more specific VPU version checks. > > Signed-off-by: Konrad Dybcio Reviewed-by: Dikshita Agarwal > --- > drivers/media/platform/qcom/venus/firmware.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c > index 572b649c56f3..ef07eea38d93 100644 > --- a/drivers/media/platform/qcom/venus/firmware.c > +++ b/drivers/media/platform/qcom/venus/firmware.c > @@ -29,7 +29,7 @@ static void venus_reset_cpu(struct venus_core *core) > u32 fw_size = core->fw.mapped_mem_size; > void __iomem *wrapper_base; > > - if (IS_V6(core)) > + if (IS_IRIS2_1(core)) > wrapper_base = core->wrapper_tz_base; > else > wrapper_base = core->wrapper_base; > @@ -41,7 +41,7 @@ static void venus_reset_cpu(struct venus_core *core) > writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR); > writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR); > > - if (IS_V6(core)) { > + if (IS_IRIS2_1(core)) { > /* Bring XTSS out of reset */ > writel(0, wrapper_base + WRAPPER_TZ_XTSS_SW_RESET); > } else { > @@ -67,7 +67,7 @@ int venus_set_hw_state(struct venus_core *core, bool resume) > if (resume) { > venus_reset_cpu(core); > } else { > - if (IS_V6(core)) > + if (IS_IRIS2_1(core)) > writel(WRAPPER_XTSS_SW_RESET_BIT, > core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET); > else > @@ -179,7 +179,7 @@ static int venus_shutdown_no_tz(struct venus_core *core) > void __iomem *wrapper_base = core->wrapper_base; > void __iomem *wrapper_tz_base = core->wrapper_tz_base; > > - if (IS_V6(core)) { > + if (IS_IRIS2_1(core)) { > /* Assert the reset to XTSS */ > reg = readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET); > reg |= WRAPPER_XTSS_SW_RESET_BIT; >