Message ID | 20230228-topic-venus-v4-8-feebb2f6e9b8@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2154498vqr; Tue, 30 May 2023 05:50:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cCUrbx/nYvxmj04vVb805txrEVNxRaQH7OKYDm8dpxzYD3bYWMlE4dpN5mgyO0c54IFUz X-Received: by 2002:a05:6a20:3ca2:b0:105:4206:7062 with SMTP id b34-20020a056a203ca200b0010542067062mr2625690pzj.42.1685451002620; Tue, 30 May 2023 05:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685451002; cv=none; d=google.com; s=arc-20160816; b=hOdxnKn9agD42YAJVdSdgxcKs/BKyEarT/+hjmx5mYZFmPAZLMwvi0V1QmjPjI4uQA zORZ9bcPDso9Zh0Y0FxaNHss/tlJA+Pk6j3Uo3TYrtmMqtISBh32m2t7TxXPEcm5qziX QP3CSHdsTrZhVFK4o4q0daSI9kCw+L5F436LmwnJM6lq6qLeFvDTTTBgX9TjNY73eMeN WStBFAO/XdIfZez2t0mN+aWcGeLF5Vyd8Oe+3HwDZ0fOvlWcqxbn3l/GUg5WvAFcs2XK QfNUV9JoR8W8jWvVhxS9oDyZ1gBF0stdZko3EY/FuawoesEoLrGA3I90uTfBaonLN9pL DTTg== 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=txi3v40xeq1skICXUdS8mQdkH8Gx8cp0BEFL2/OQ3wI=; b=x9xfVkL0kCQqnjjPNwxaRhi/s6NxiUTJH5w+IHZX53dFdBblYO1Gz7q0obDmm5us/b kgtlmEw4cmsgb73+5EBwGZU9T3IP4eYjUPPjyU/Qf5ItUxMFDvlDlKeQ41axagIujU9J ysXizQlkB4DbSRmmKy/nFQ+pQViRqCjA+1fA3EGJcfi7Vuv9N2dbCNNlII3NoJnwHCiD 4dOUlcmXaW4uj+/CNvcGSCccUnbTTVY/suJVmGi/rG4o+omOHIppeECtCzEWUYYhWwVx faI/lSK7nM/RhCDTEghbsQPlu1UuDz4kMaRmmXGR2l8/W6weAo03iWBGFGK6Ou3oWkFQ G7cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a4GmkCT4; 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 y24-20020a637d18000000b0053f24deef0dsi2091628pgc.312.2023.05.30.05.49.48; Tue, 30 May 2023 05:50:02 -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=a4GmkCT4; 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 S230145AbjE3McH (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Tue, 30 May 2023 08:32:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbjE3Mbg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 30 May 2023 08:31:36 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C1FBE42 for <linux-kernel@vger.kernel.org>; Tue, 30 May 2023 05:31:16 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2af30a12e84so46128741fa.0 for <linux-kernel@vger.kernel.org>; Tue, 30 May 2023 05:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685449850; x=1688041850; 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=txi3v40xeq1skICXUdS8mQdkH8Gx8cp0BEFL2/OQ3wI=; b=a4GmkCT4FYKvoO1zaqw+4yWcxhEgBiClLH8HcvBwpREQ5avFR9IIYRArPe7tZhG5gE Ub25UHyTPR9LXH4cEDutwUYkwZBVSdy0f/e8w9uArEE2fVfYWOeLlQRD+JI1wSh3PXYt F9VYjSjKypFzWMNwbIZn7zZhkDSFCJfTGyRpd1Jd0KzF1QHYXBShmW4myLELyn9zVi2e b5bktQubb4FMN8SJ+oKpJ0trNhjxlpFf26CMBUg9vHf3owTyd9bd02+8OiX1InGkwS2Z uxE8UZEO5cRrIn5IeP3sdinQi4q4QzWDvhn6pOrCO72CFNsQcd7gp27nvF9wU2sIOtq+ 6a4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685449850; x=1688041850; 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=txi3v40xeq1skICXUdS8mQdkH8Gx8cp0BEFL2/OQ3wI=; b=GEnLTFShfUt4Vgz4Iu7gN2qxAvkJkyYoAvDdASCxR8WY0vkNvp83RhRz8T8Pa/d+Dl kJ4ClF4b1LxsCqDUNOhpcYahr+49dmAS1Y9BC6TlUyUba80N+Wwhz+Bg1WdlhhzG+2ST DucehszmzDzqrXgmYXu7y+RAPOy5w51eus9iW5Jrti5KMNvMMp51XnXOVHGsb+82s8te WjVosf+hZ95eqJ62dHJb61p5nnR/vgjtwkhCpHIhaePVPS1GZfBbJo/SiJgYKfTLFph/ lmWd8hIvJTa2gGpETaDLYhJmHZH7D9yLNlmuLgDIKsTvp3l/6r3SBvordk/K6q0owAru w19Q== X-Gm-Message-State: AC+VfDwAHCY3gjmdysfF+gCk/9YmvSqp/l8Tcgos2UrrvZDugVf3OF2o lWTHxFTCOGuc4xDg+vtfPds+tg== X-Received: by 2002:a2e:9884:0:b0:2ad:81ca:a52f with SMTP id b4-20020a2e9884000000b002ad81caa52fmr727410ljj.47.1685449850275; Tue, 30 May 2023 05:30:50 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id u18-20020a2e91d2000000b002a8b8baf542sm2854814ljg.126.2023.05.30.05.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 05:30:50 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Tue, 30 May 2023 14:30:42 +0200 Subject: [PATCH v4 08/17] media: venus: hfi_venus: Sanitize venus_halt_axi() per-VPU-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230228-topic-venus-v4-8-feebb2f6e9b8@linaro.org> References: <20230228-topic-venus-v4-0-feebb2f6e9b8@linaro.org> In-Reply-To: <20230228-topic-venus-v4-0-feebb2f6e9b8@linaro.org> To: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>, Vikash Garodia <quic_vgarodia@quicinc.com>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Dikshita Agarwal <dikshita@qti.qualcomm.com>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, Mansur Alisha Shaik <mansur@codeaurora.org>, Jonathan Marek <jonathan@marek.ca>, Hans Verkuil <hans.verkuil@cisco.com>, Dikshita Agarwal <quic_dikshita@quicinc.com> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Stanimir Varbanov <stanimir.varbanov@linaro.org>, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Marijn Suijten <marijn.suijten@somainline.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Vikash Garodia <quic_vgarodia@quicinc.com> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685449837; l=1056; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=CwRrKkc56gP78vWbwj31mgvh7BvEJbPxU0vhFKBwos8=; b=1VSC8LRy2Yd6gP8VcoQDaPeCC2ljSd5bhpTsKRED/3emZGSDqHWLGNiYO0Q17KO7iqKjeNsj/ 7CTpQpJKX3mDK80Z4kDPVuxdJt0M9+EP412kVhMcl+BwaI4W89RjpMe 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767323470600625376?= X-GMAIL-MSGID: =?utf-8?q?1767323470600625376?= |
Series |
Venus QoL / maintainability fixes
|
|
Commit Message
Konrad Dybcio
May 30, 2023, 12:30 p.m. UTC
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 <konrad.dybcio@linaro.org>
---
drivers/media/platform/qcom/venus/hfi_venus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 5/30/2023 6:00 PM, Konrad Dybcio wrote: > 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 <konrad.dybcio@linaro.org> Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com> > --- > 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 9e36ef9076a0..60252d05781e 100644 > --- a/drivers/media/platform/qcom/venus/hfi_venus.c > +++ b/drivers/media/platform/qcom/venus/hfi_venus.c > @@ -548,10 +548,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); >
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 9e36ef9076a0..60252d05781e 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -548,10 +548,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);