From patchwork Wed May 17 21:14:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 95552 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp57103vqo; Wed, 17 May 2023 14:15:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7WeQSrXB42+UFDSxyVSairCFWXAkbO3aLd6D+ZKoKmE1SkbcNy2Hwyv1D5cJzA2xDsGPmO X-Received: by 2002:a05:6a20:549c:b0:102:7aec:6dcc with SMTP id i28-20020a056a20549c00b001027aec6dccmr36819525pzk.27.1684358152813; Wed, 17 May 2023 14:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684358152; cv=none; d=google.com; s=arc-20160816; b=Csq5fKbH2WWLyB1+Q8rLfNn2nVnSz6v1l2fbgrPrKo56DIGlo8P+AeFST3D+EndcL6 fwENDnnyXH82fnycu3CVcJIu2OoEuDAT686V5dgza1pr0TiGCB0rNpNs/fazS2lDh3Q9 hA6HnurHU0g83y77Nb4R2YUspVxCi7NF1gHEqjxx5GJ+UXBhE7h9qO7k1wy78LuHhXnS OXQNQC3VRx/OEBkh5PKVBDkG6P6KIxu2MK9KBZe6pEm4q9Qh2qTxHCcXAeUA2a/FB5go Rwnq24eVaAgVDT0SFoq2H7jur5qxBrjhDmRD5ppxoCUfOGf+djB7lW9+9kkEWoz0W3eI JHIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=n8al+fUYTJ6+PEz9NPDS7tqKtmY4QMGdOMScxyZdTNw=; b=l4afY+EsOs0DnqusDB1pQc6M1OQqLXUhOu8bMqydwJUkeizbB4VbDzx9BDzDQjhyJw 2R8ul18L1QK6K4kfMEjn4UJq7h99ppfSxKpBjMjAUU0I3zDRlntXRo3Ni8WUZkwmVYEe QROt87d2VgY+pGToy7BIa/mxb0w2wz8NPc5DS09BJBvuPmo4BqZDHuCvWt7saHaCeer0 WJztK+S1/PeX3ZkRKFvs32AqzJn3Xlwx5qW+6WIk/HtyepRFo9J8K0zM6BLl5kFg94et UetGWK18r6U8MTsh6k6cFrox72y7G4Z4UohXYE9BY5PaNLvy3OKaXOOArVOP0l1wxVE7 MiMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x+Gfsd4u; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k67-20020a633d46000000b0053045acfebdsi20782528pga.34.2023.05.17.14.15.38; Wed, 17 May 2023 14:15:52 -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=x+Gfsd4u; 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 S229936AbjEQVPA (ORCPT + 99 others); Wed, 17 May 2023 17:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbjEQVOs (ORCPT ); Wed, 17 May 2023 17:14:48 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AEA46EB5 for ; Wed, 17 May 2023 14:14:40 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2ac7462d9f1so13514181fa.2 for ; Wed, 17 May 2023 14:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684358078; x=1686950078; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=n8al+fUYTJ6+PEz9NPDS7tqKtmY4QMGdOMScxyZdTNw=; b=x+Gfsd4ueg48vKx4TnKfLz/AwaIQz+3WaLfB0edEvFCJ6KjZp3mBk1PYpn0V4D9N0P XSVFtaEUsWL5fVkVJNFtt45wV5RsC1gHw90WwlVom79QDp3uJC5tqPlqUYdMDrmIy352 8mRaq6f44b4qhrq7GzjNCb6r0UzNZtHQ55eqSByQpcwKxkCxyYVp799MJa+FRXSr3cr1 zptJcnPDST4SusUTrzwyQ7uhBJjyST+Uaj0+vfPt0tp8Z4Et14Keb+AP57TVi8lH133c Bu0insZJ9lSSEctWwwQPrBykVhpCXJhor/iJH/AyV2OoxME9vOP1qmNaW1JOU3ymABQV uXFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684358078; x=1686950078; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n8al+fUYTJ6+PEz9NPDS7tqKtmY4QMGdOMScxyZdTNw=; b=U79ExGSiq/tTevWldr6uEg+abNET6r74rH5gWIz208dlE3vA4Do9M65H7FkqOQBhak tAZ8jqJhqAS5dFTY4qnMp5gVHz7M8Ql9fo6K12Lu/dkkHUZus7GYoaDZ/Vgfswm7KUIm tP80ZrwpCmQbhXQ9WTR59xHp0JWtZAs5vys29EuwmuPykxlgWgYn9fj1wFkDpw9YjMzQ sHYBfa62ea5IWscSwA8fBE9KP/wrgeUYPaL/9Un24+72M94GvoATFk/MhQ4nN/7J6K+R WyUghNAhy0wZ8iNRMn0biFjh8SnFO2Q5Q7OK8JDiCBE8yVK/oPA2b4diKac9aJmXxH1A musA== X-Gm-Message-State: AC+VfDyE/PHQNSxqiZJPE7AwYadCxcm2d6FOElglOFKKvN32/Ns+VXXI 3a1oH+5VlEZ2ATnxa7vMcYWUmw== X-Received: by 2002:a05:651c:1045:b0:2aa:40dd:7a55 with SMTP id x5-20020a05651c104500b002aa40dd7a55mr10338038ljm.8.1684358078270; Wed, 17 May 2023 14:14:38 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id l5-20020a2e8345000000b002ac88e29049sm4781142ljh.43.2023.05.17.14.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 14:14:37 -0700 (PDT) From: Konrad Dybcio Date: Wed, 17 May 2023 23:14:21 +0200 Subject: [PATCH v3 08/17] media: venus: hfi_venus: Sanitize venus_halt_axi() per-VPU-version MIME-Version: 1.0 Message-Id: <20230228-topic-venus-v3-8-6092ae43b58f@linaro.org> References: <20230228-topic-venus-v3-0-6092ae43b58f@linaro.org> In-Reply-To: <20230228-topic-venus-v3-0-6092ae43b58f@linaro.org> To: Stanimir Varbanov , Vikash Garodia , 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 , Konrad Dybcio , Vikash Garodia X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1684358064; l=1056; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Ec1MN/ZRnQHIQIjMUfVoLM7+Of/DpbtvAPWcmBv7Ia8=; b=4d0CN7DjxeqmKugz1Y1UNz7adTZVr0CiA2yKMw2Fwg3Zt0sjASvd+QBwHLV5vbO0pG6ZUs1I6 Iwx0TvUt7cxApg5sSzXI4HW9fXzi93t7NY8PPAaA+veK0KpN4z1kMjz X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766177534566407046?= X-GMAIL-MSGID: =?utf-8?q?1766177534566407046?= Only IRIS2(_1) should enter the until-now-IS_V6() path and IRIS2_1 can be used instead of openly checking the number of VPP pipes. Use VPU version comparison in both of these cases instead. Signed-off-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/hfi_venus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 5af24e98caf0..9082a2def687 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -549,10 +549,10 @@ static int venus_halt_axi(struct venus_hfi_device *hdev) u32 mask_val; int ret; - if (IS_V6(hdev->core)) { + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) { writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6); - if (hdev->core->res->num_vpp_pipes == 1) + if (IS_IRIS2_1(hdev->core)) goto skip_aon_mvp_noc; writel(0x1, aon_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL);