Message ID | 20230228-topic-venus-v1-9-58c2c88384e9@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3080350wrd; Tue, 28 Feb 2023 07:28:04 -0800 (PST) X-Google-Smtp-Source: AK7set9eu8EpDWd7B41Lesqy03h2kbha6rrSVK5yxDG9+x+Fpdn6IWeqIBHqFDjksECTY9ersdO6 X-Received: by 2002:a17:902:d504:b0:196:704e:2c9a with SMTP id b4-20020a170902d50400b00196704e2c9amr3482191plg.22.1677598084278; Tue, 28 Feb 2023 07:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677598084; cv=none; d=google.com; s=arc-20160816; b=MzhVeU8lEYS0PStpM7yWlweH91MPjItlM4J4vzxF28wL4eZz2c1RcdPlW4Pi+7x1dk huQjJ3Ij4BJhxAKzs3Ro1O7NeLgnwJ1Bj8Y05YsHHtr1JOAfNDl3S36OQvXJ5kuEq4Z+ jMyLfmYc8NE/mv7a9IETXz9vrb/CKgy5hM/0S+5pu7TWaq/Cw8ZM6yScF0R94twPEbVr xzOcT0M+IdVog9rqFAYT5zCENohLOtATcto8mkXdBvzEwbbgMxc6A804b2ASHpVlFLSz g13MN3cqvYu5KMcV5QZ/uDPbiwOvBOWetfPGiEA4QMc8H19qBPyEg1XmSl+jkPcbpfO0 Z01w== 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=5zJn479IcitDv9y2x8/xGaUK4fklDoWt49Sew7oDQTk=; b=e61uiOMCvXdZtkXxJ20Knw8hlDn8HkPfLju0duSiHzXg2jtYQ9ZBqM1k7V6SG2a3Jl dcfUiYU53UDHiYtfQLdE8BgNy0gBiTV6yvhzYWDhLCKTYccHPrXrUjvfLxkZN/ZQpQqV humIdyLV48xC3ifLDSaestwSHjxSyrTSa1xmEBVaDk4XX5lk2D30za819Q//teCZ/QNd jHTD5jDMGMQJMbkKIZOfemBPa2MMnRTkwn7NBMb42hz7g4cp4W55UsohEgLymYlAh93E 9wd62jPOB0/FaFwHIEJfgBAi31JEBhkqPy/L2ljQEw3Rx22Q+DXLX8AmiVNhMb4CopWi fU0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=awJOG1x6; 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 ku8-20020a170903288800b0019cec84f868si9701947plb.335.2023.02.28.07.27.50; Tue, 28 Feb 2023 07:28:04 -0800 (PST) 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=awJOG1x6; 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 S230054AbjB1PZW (ORCPT <rfc822;brysonjbanks@gmail.com> + 99 others); Tue, 28 Feb 2023 10:25:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230008AbjB1PYz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 28 Feb 2023 10:24:55 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9426B30E8A for <linux-kernel@vger.kernel.org>; Tue, 28 Feb 2023 07:24:50 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id n2so13656592lfb.12 for <linux-kernel@vger.kernel.org>; Tue, 28 Feb 2023 07:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677597889; 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=5zJn479IcitDv9y2x8/xGaUK4fklDoWt49Sew7oDQTk=; b=awJOG1x6vvDifU8IO+8pYduD09ixIs0ijf8kY0Lj9ZERnN0/d33XytUi3bfHwIAspP Zh1CexMr4O4vkLNRNuR7mtmxaFX1oNSdPuD/IZqLRY6LEXlMDL+U8BXO3xjXRGh8kZXP g/Fer7Y9BHi44jt04itYxiZcScRxOOtIqpUZhb204GwEm1MPU+rcXJ+oZBe7cUzRFrUX 5Nn+rNCUDMJFA2or8YIgp2Hetzz2aQLO8pMjEwavCMOtBVXhaB/Fr5x8hyzz/TsezJcz 2mdXUHy651+YdHU2l+1WLhxmA/JsODoR8m4t5KxASNTwedjcYQ/mZiUzJMmYPkTbNqTd jvxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677597889; 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=5zJn479IcitDv9y2x8/xGaUK4fklDoWt49Sew7oDQTk=; b=3dF3Pc3LJihyZboRi+kojoQfdXwNpuicKtt4sZ3Q1QjLiOvACTk8+x/uCGV9h7BPAM aVbe8AFuk7aXlJpNUcW1g84tJtNSGsnyZ62RYTvbfvjKdzx0iBW35pEmsuL9CicaF1GP bRUE/2VXmaWkUlB7JkI1xQ2K9Cf4Aj9VwcWafaLSP4GOuDk4dL9rnybMj4ggEwcBIWHp qURCRcJ0t/n/rx3ZSd1+coU8JDhOLrVm7AWDJnHtxk69bWGBPze1YwP/qh6TTiFU3/Ob 5+La4rKo1kjcnV6zWf5i00Lz+vBWlDOCLzYjJbmiu7Vd60nO9zwBDhDOwaTMAFICT6sR 3hvA== X-Gm-Message-State: AO0yUKVDFx6q1BXKJQ6GJ9psnJbmdz+V6QMduSND11RQx2RuhXXah1sW hRzeWIIGnQgZKf+yev5qLHjoIg== X-Received: by 2002:ac2:4159:0:b0:4dd:9f73:f3f7 with SMTP id c25-20020ac24159000000b004dd9f73f3f7mr770788lfi.64.1677597888954; Tue, 28 Feb 2023 07:24:48 -0800 (PST) Received: from [192.168.1.101] (abym99.neoplus.adsl.tpnet.pl. [83.9.32.99]) by smtp.gmail.com with ESMTPSA id h17-20020ac250d1000000b004db3aa3c542sm1363688lfm.47.2023.02.28.07.24.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 07:24:48 -0800 (PST) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Tue, 28 Feb 2023 16:24:33 +0100 Subject: [PATCH 09/18] media: venus: hfi_venus: Fix version checks in venus_isr() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230228-topic-venus-v1-9-58c2c88384e9@linaro.org> References: <20230228-topic-venus-v1-0-58c2c88384e9@linaro.org> In-Reply-To: <20230228-topic-venus-v1-0-58c2c88384e9@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>, Dikshita Agarwal <dikshita@codeaurora.org>, Mansur Alisha Shaik <mansur@codeaurora.org>, Jonathan Marek <jonathan@marek.ca> 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, Vikash Garodia <vgarodia@codeaurora.org>, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677597872; l=1416; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=0FyKqrw1Z2G70EdUUzUQkOOkBEgG1egwrSn1MIrNYrM=; b=UN8UtyczdV8UrzDPjLnovtj6Qv0MdUw/ClSqkBV90i2Hmtes5INpWmt+IHINqWRSxMRs3JHoxcLB d6Scg9q6BSWRjG5AEzM1IciXaVnlrNv2b+Jp+ZGk0ypDxaxpUEdo 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 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?1759089088733204209?= X-GMAIL-MSGID: =?utf-8?q?1759089088733204209?= |
Series |
Venus QoL / maintainability fixes
|
|
Commit Message
Konrad Dybcio
Feb. 28, 2023, 3:24 p.m. UTC
IS_V6 was used there IS_IRIS2(_1) should have been and the !IS_V6
condition was only correct by luck and for now. Replace them both
with VPU version checks.
Fixes: 24fcc0522d87 ("media: venus: hfi: Add 6xx interrupt support")
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 2/28/2023 8:54 PM, Konrad Dybcio wrote: > IS_V6 was used there IS_IRIS2(_1) should have been and the !IS_V6 > condition was only correct by luck and for now. Replace them both > with VPU version checks. > > Fixes: 24fcc0522d87 ("media: venus: hfi: Add 6xx interrupt support") > 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(-) > > diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c > index 0d137e070407..ecfbac36de20 100644 > --- a/drivers/media/platform/qcom/venus/hfi_venus.c > +++ b/drivers/media/platform/qcom/venus/hfi_venus.c > @@ -1136,7 +1136,7 @@ static irqreturn_t venus_isr(struct venus_core *core) > wrapper_base = hdev->core->wrapper_base; > > status = readl(wrapper_base + WRAPPER_INTR_STATUS); > - if (IS_V6(core)) { > + if (IS_IRIS2(core) || IS_IRIS2_1(core)) { > if (status & WRAPPER_INTR_STATUS_A2H_MASK || > status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 || > status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) > @@ -1148,7 +1148,7 @@ static irqreturn_t venus_isr(struct venus_core *core) > hdev->irq_status = status; > } > writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR); > - if (!IS_V6(core)) > + if (!(IS_AR50_LITE(core) || IS_IRIS2(core) || IS_IRIS2_1(core))) > writel(status, wrapper_base + WRAPPER_INTR_CLEAR); > > return IRQ_WAKE_THREAD; reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
On 3/7/2023 11:42 AM, Dikshita Agarwal wrote: > > On 2/28/2023 8:54 PM, Konrad Dybcio wrote: >> IS_V6 was used there IS_IRIS2(_1) should have been and the !IS_V6 >> condition was only correct by luck and for now. Replace them both >> with VPU version checks. >> >> Fixes: 24fcc0522d87 ("media: venus: hfi: Add 6xx interrupt support") >> 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(-) >> >> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c >> b/drivers/media/platform/qcom/venus/hfi_venus.c >> index 0d137e070407..ecfbac36de20 100644 >> --- a/drivers/media/platform/qcom/venus/hfi_venus.c >> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c >> @@ -1136,7 +1136,7 @@ static irqreturn_t venus_isr(struct venus_core >> *core) >> wrapper_base = hdev->core->wrapper_base; >> status = readl(wrapper_base + WRAPPER_INTR_STATUS); >> - if (IS_V6(core)) { >> + if (IS_IRIS2(core) || IS_IRIS2_1(core)) { >> if (status & WRAPPER_INTR_STATUS_A2H_MASK || >> status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 || >> status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) >> @@ -1148,7 +1148,7 @@ static irqreturn_t venus_isr(struct venus_core >> *core) >> hdev->irq_status = status; >> } >> writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR); >> - if (!IS_V6(core)) >> + if (!(IS_AR50_LITE(core) || IS_IRIS2(core) || IS_IRIS2_1(core))) >> writel(status, wrapper_base + WRAPPER_INTR_CLEAR); >> return IRQ_WAKE_THREAD; this change looks good to me , once base register values are fixed in other patch. reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 0d137e070407..ecfbac36de20 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1136,7 +1136,7 @@ static irqreturn_t venus_isr(struct venus_core *core) wrapper_base = hdev->core->wrapper_base; status = readl(wrapper_base + WRAPPER_INTR_STATUS); - if (IS_V6(core)) { + if (IS_IRIS2(core) || IS_IRIS2_1(core)) { if (status & WRAPPER_INTR_STATUS_A2H_MASK || status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 || status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) @@ -1148,7 +1148,7 @@ static irqreturn_t venus_isr(struct venus_core *core) hdev->irq_status = status; } writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR); - if (!IS_V6(core)) + if (!(IS_AR50_LITE(core) || IS_IRIS2(core) || IS_IRIS2_1(core))) writel(status, wrapper_base + WRAPPER_INTR_CLEAR); return IRQ_WAKE_THREAD;