From patchwork Thu May 4 08:01:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 679253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57B04C77B78 for ; Thu, 4 May 2023 08:02:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbjEDICD (ORCPT ); Thu, 4 May 2023 04:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230079AbjEDIBv (ORCPT ); Thu, 4 May 2023 04:01:51 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6823E40D4 for ; Thu, 4 May 2023 01:01:42 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4f122ff663eso171396e87.2 for ; Thu, 04 May 2023 01:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683187300; x=1685779300; 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=wLWIf5AJktVcUGdZu7o/1TfCD4Dmn96OdaFzmDBQ/Dg=; b=Df4dlbvM8+/gwDtSxIjKjpEqaBK/y7rpL+azsxYVWnzuOrMjoh0Y1FMB8YH+n/oFvH b0Gy78TbyzYk2LC1Z8WPG0uilaC8GTcumgrVDL9BtoPF6NDun47JEvQ96OXWs21FtMQ8 ckWrvgncWcAV2VOcPK7NosS6acZ5nCFSHLB1JjKPcV0QCxDlIc+8h422QmDeTwRj7MJz 9TuCK3lfNkA2hepVj0oLa1ILq5+h2S2GPSaOMq9zUJa4bBI53bc62W71twV/ycGhMyS/ eKIvB+K/D0KGBGG6dw4nubBlG+YwI1IubyQt0vd+184diUsJ+cVuNssLy/oMD+bG2P1L aZ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683187300; x=1685779300; 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=wLWIf5AJktVcUGdZu7o/1TfCD4Dmn96OdaFzmDBQ/Dg=; b=ZneHUUSnQ3KQm5qh4aKgYuL3ogo8iXL2NSw/3UrFPOLXT/i1P59PIrzitQk86iKnhV RnpyhaHxf4gLeBUd+yt6G+eqT7FQk8kDXj+iRk5CgdR1h6UChlY2D/vvnP9RNdQ9/rA4 Te7hEZv/66JiixSWqztcxUaDcGoFZ9P6QG6R+6WDniLIqrI6kOJ9dlzI40QzYuRySsXp cu2Mv31cISHU9aEoiA9xhhmyHgEIOxiDSbCvjCmvAJM3Nh6GTwfQrg21wKZmUGfk2EsN 1d0EyeXQZZe0yQfEWuOG2kvyKt/AEgUM3srmiPvgPC3wn8poGDNF4iEvUJyMJFKQfpzI oDIg== X-Gm-Message-State: AC+VfDzCZrpxgxvfSt1vATAHWCXGtHtQNOipR6sxy/hZl1JFAiclbl9p rhHhML5lZ1+pjQyygEWFbh7vwg== X-Google-Smtp-Source: ACHHUZ6Ik23hnDj0QNZILPmdNF9TUFNthX8A5QSCFTIe4MaH/AB9MPD8spGlukcP2XF8Z0xKxEeYPA== X-Received: by 2002:a19:7417:0:b0:4eb:c12:df1c with SMTP id v23-20020a197417000000b004eb0c12df1cmr1520892lfe.65.1683187300652; Thu, 04 May 2023 01:01:40 -0700 (PDT) Received: from [192.168.1.101] (abyl248.neoplus.adsl.tpnet.pl. [83.9.31.248]) by smtp.gmail.com with ESMTPSA id n26-20020ac2491a000000b004edc512515fsm917165lfi.47.2023.05.04.01.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 01:01:40 -0700 (PDT) From: Konrad Dybcio Date: Thu, 04 May 2023 10:01:05 +0200 Subject: [PATCH v2 09/18] media: venus: hfi_venus: Fix version checks in venus_halt_axi() MIME-Version: 1.0 Message-Id: <20230228-topic-venus-v2-9-d95d14949c79@linaro.org> References: <20230228-topic-venus-v2-0-d95d14949c79@linaro.org> In-Reply-To: <20230228-topic-venus-v2-0-d95d14949c79@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=1683187284; l=1179; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2TN022IG90w1W+WW41ndXOwXiJsz29XNAp4fcB4/bxA=; b=zAqIh0c4vPxL8UYZPaH/GKZD5YzmAXx5SKQ26zh3K3OdP7Z2VReAs2NFUcC353sxLq2vDyDf4 DBb7zZZF9ckCQR+c5lfDna5ojcjDKQUtW+IoUz0Ax6PXQC2riY0nT3F X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Only IRIS2(_1) should enter the until-now-IS_V6() path and the condition for skipping part of it should be IS_IRIS2_1 and not the number of VPP pipes. Fix that. Fixes: 4b0b6e147dc9 ("media: venus: hfi: Add 6xx AXI halt logic") Fixes: 78d434ba8659 ("media: venus: hfi: Skip AON register programming for V6 1pipe") 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 9b840440a115..ca56b1a8eb71 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);