From patchwork Thu Jun 15 23:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 108741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp974760vqr; Thu, 15 Jun 2023 16:23:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7QJzVKmFJv6cdeRRf/CKYifjacq1py+SFPwGX7+b7aHqk4scQv7XH2NU3ynQleqg3kJFA3 X-Received: by 2002:a05:6870:6182:b0:1a3:365:a8d5 with SMTP id a2-20020a056870618200b001a30365a8d5mr432189oah.48.1686871390451; Thu, 15 Jun 2023 16:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686871390; cv=none; d=google.com; s=arc-20160816; b=mf6F87JGQpx6b0/G446caBWOTANjRXBJm+Pq5JrzXmDqU+Mw8riAqTykVgdYJQZTnW wriFK3S13y9vpO2njPcu75f5FCVUrixxOwftWMT2LhhUDc6bmTnzKeHlmQL40W4qYXmh yl4YeAtxKBJyT4T1Pm1V2WxfkC7sFMgsCNRcZsVEov2S0fo+8tS7VPsg8lIIQlrDzk1C Nw4Db8nl3tGJ7fVE+kxUwRolAmtH5B89y2x+scMBwag32E+xJqEHhEflK6Pn5X6z220h GT66xFA0IJUNzkBIFAPIytDy4ZdLyVyK5PleHuVt0TTEj72ch185dowakjFyphlcRMuS uGgQ== 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=FPRMcWRdPNRhm7m7rFyZkdTr39iafUGR7Em1StRoccs=; b=aV4KERy1adYnJHzACgB8jASFBIgoUVqZfVAYakSZW/c3ZlW83WZ6XDEMO/w1RslSCi lINnXZ9s7zbUNHJvaghJ9sF0rwvZNZaY0ThMCiz1WNEPAvb8joYgL6Ed4xt1WP+fMzSR WBgI3bu0qAqjVOsT9jZSPz2nrmiR55UN00LOcVyLUHznlphCEYHIMisZokVXghDeVdKt oxXvfE6gN61JlF8bhRhLUgQSAfDvJ0OlWyM8Ay9eWJn2MLj8RPbBDzpYIkY+XeeJRc5l DS9VFMEsA9tk0cDRGRMJcJB3hSPhrIfDgAiSde7Rg5XmXgAAbG6e/1yQ3T+y/rdn8LWA FBiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YcfgUYjV; 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 b22-20020a637156000000b0054405481c73si13999741pgn.54.2023.06.15.16.22.54; Thu, 15 Jun 2023 16:23:10 -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=YcfgUYjV; 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 S239202AbjFOXV5 (ORCPT + 99 others); Thu, 15 Jun 2023 19:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239223AbjFOXVm (ORCPT ); Thu, 15 Jun 2023 19:21:42 -0400 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 024002D42 for ; Thu, 15 Jun 2023 16:21:31 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f769c37d26so3435966e87.1 for ; Thu, 15 Jun 2023 16:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686871289; x=1689463289; 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=FPRMcWRdPNRhm7m7rFyZkdTr39iafUGR7Em1StRoccs=; b=YcfgUYjVM7UOkgkcCmENJ1htERFxfeAzizRgAdyXb8MMoN+m8qs7nT5qIUfhoms1l1 noWA5RFKINggsK7GFdC/2KHQq/kHkA1hGfNW8Fhvm9YkRxsFHUdZNIW8W2bI/2FNpFf/ 5+2d1i5FVp9BpWUHiPmtnDPjvN/NC87P+mvwDcx88fGMjHJV+k76VnCmPLiKAvChbEWA 3/4zET4oxImGkAmfIgfiLgg8cXTle8uoafOBIw2a1IFxJFLPBFVT6IpuI/asCpMGJvR5 P2OJM6fhh8NdRm44jV8WaIRO/EyB7BPhNshd5YZsnJj43chwbs9OrgwzzHs41dfTtjQ9 fqzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686871289; x=1689463289; 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=FPRMcWRdPNRhm7m7rFyZkdTr39iafUGR7Em1StRoccs=; b=FyiQW+nZ0CFG1wHNGInMDjQTNWc5WPg1CbzHFGH6vVktGnv2vAZq8Lv9GD54GMi23o wiwVbRNnXHmwtSZX4PQ7xNWTsmzS+o65JVykcQUzAowv/0PTMZT7dqXn/Q3RK8DyDrZb OC+yMhlVvF7Nr/flhZ3kvj9ORI3vXSQ3YD4sEaqcXQnTCAlM+0nTUuHD68HTiUbn9EVQ VTOT6YAs0WRulsfdfDEyaR/TTs4LT94ngdhHziktIFkEy0kYQDw3eyX0fFVRxDAt/nf4 MSMXuSyKBjSnZDK36XWRvCaKtGi5pBlmpzU8NTm/OMiak4/8ORkhUtQJ3/S0HBednOPO tGxQ== X-Gm-Message-State: AC+VfDzZ/t44xyVSsJxk9ko10ahyPsPijAXaYKOwkq7lWorErdM//n2V HS7Tb0Raq5bo62rDLzo7LYzskQ== X-Received: by 2002:a19:e01e:0:b0:4f3:ac64:84d9 with SMTP id x30-20020a19e01e000000b004f3ac6484d9mr98518lfg.20.1686871289278; Thu, 15 Jun 2023 16:21:29 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id u25-20020a056512041900b004f24ee39661sm2744852lfk.137.2023.06.15.16.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 16:21:28 -0700 (PDT) From: Konrad Dybcio Date: Fri, 16 Jun 2023 01:20:48 +0200 Subject: [PATCH v9 07/20] drm/msm/a6xx: Improve a6xx_bus_clear_pending_transactions() MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v9-7-890d8f470c8b@linaro.org> References: <20230223-topic-gmuwrapper-v9-0-890d8f470c8b@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v9-0-890d8f470c8b@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Akhil P Oommen , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Clark , Marijn Suijten , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686871277; l=1415; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=DRGqhpFzhDNQhxx5j97tqEL/ORDaa2xLNnRcBrvxk+I=; b=20lGkYLKlOXNgAl41BoltFryorb2un2mRZZOBZExBSXPDrbKc/bg50HjamGPBK9owpvzNnkYT fCj5EZeMjQoC3pscJe3/j8131yDod+0deyTgWkdnBQyvwUsFSfbsd4S 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 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?1768812854882842241?= X-GMAIL-MSGID: =?utf-8?q?1768812854882842241?= Unify the indentation and explain the cryptic 0xF value. Reviewed-by: Akhil P Oommen Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index a48f4e3a754a..d5bd008c2947 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1705,17 +1705,18 @@ static void a6xx_llc_slices_init(struct platform_device *pdev, a6xx_gpu->llc_mmio = ERR_PTR(-EINVAL); } -#define GBIF_CLIENT_HALT_MASK BIT(0) -#define GBIF_ARB_HALT_MASK BIT(1) +#define GBIF_CLIENT_HALT_MASK BIT(0) +#define GBIF_ARB_HALT_MASK BIT(1) +#define VBIF_XIN_HALT_CTRL0_MASK GENMASK(3, 0) void a6xx_bus_clear_pending_transactions(struct adreno_gpu *adreno_gpu, bool gx_off) { struct msm_gpu *gpu = &adreno_gpu->base; if (!a6xx_has_gbif(adreno_gpu)) { - gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, 0xf); + gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, VBIF_XIN_HALT_CTRL0_MASK); spin_until((gpu_read(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL1) & - 0xf) == 0xf); + (VBIF_XIN_HALT_CTRL0_MASK)) == VBIF_XIN_HALT_CTRL0_MASK); gpu_write(gpu, REG_A6XX_VBIF_XIN_HALT_CTRL0, 0); return;