From patchwork Mon May 29 13:52:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 100277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1533215vqr; Mon, 29 May 2023 06:59:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7UhA4m2rDM0J5ytxKBmdAYDK6OfR/irFr/ujqdkVsF4gPfYiIeH0C9BK2+LIizyxusyZjg X-Received: by 2002:a05:6a20:4289:b0:10c:5802:fce4 with SMTP id o9-20020a056a20428900b0010c5802fce4mr10694461pzj.48.1685368787753; Mon, 29 May 2023 06:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368787; cv=none; d=google.com; s=arc-20160816; b=Sv7ClNpEIOmnzUJNTSJ/T5pi9jgAmzx4chIQuxzeEPfefESq5wYAZNfYeWP4EMu8Ul YxhxxOIxNKPcKBF0yOaUYrJ/0ubQwmy6VIV1ZFBv/PcliemSaQanuDW3cLK0W0zJqbpn e7EEZJABO6rDRO2U6plrudnHRlkUwHcbGK9ogqUqGDvR2GbdhnUVUs5YX2VmBH50tn/z Pz/eVkwQFV9mn9y4xia+6PcFqx6G9Z8r1e5J3IiagiVYGNxaQbsL8FpPt13qxkNvzDpe FxH1HxsYLcLzf4SIgA34pXwGVeRG4ONUwssT95h22nf6BEsUQ3H7hklwna+coJgMhKom uhPw== 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=4I8zZOOwyp4NjNuH+/dpM0ZZysjD7tVsNkFj0zmZXZM=; b=oMN9NPJlYtdUl0YCDzBJe3uS7CyD/tznf/rb17VApCuBPzriFV0ySM+H5ksAt/mdRd s7sPf5ubgKHHKlttY3/2m+jjAO9deKiSEsXD/J1dHupAS1kipulmK2GkfpUbLw+VHHnJ V6vgzGDoTtyZxNlQw+KjcCQxVBFYIsIzCuwFPLka1uu6ruDSXbQq6snQCs/RYxFzcS5q Kj+eBmPPejYTAv05BiBIBiz6sf54PeHVasvKEfGMHRcp31CVggv6XibTgJfszYVCnKJB +WlfhKFyYlJe+gVJ6xpdIT243A4L1iFwMKQztJm+F1v/XBHiKCWDz6niQz1pjeBXcB9y 8CMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l+DkWo2Z; 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 g8-20020a636b08000000b005321c340960si9501800pgc.811.2023.05.29.06.59.35; Mon, 29 May 2023 06:59:47 -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=l+DkWo2Z; 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 S229998AbjE2NxD (ORCPT + 99 others); Mon, 29 May 2023 09:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229969AbjE2Nwq (ORCPT ); Mon, 29 May 2023 09:52:46 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85C76F1 for ; Mon, 29 May 2023 06:52:35 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f4e71a09a7so3601106e87.1 for ; Mon, 29 May 2023 06:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368354; x=1687960354; 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=4I8zZOOwyp4NjNuH+/dpM0ZZysjD7tVsNkFj0zmZXZM=; b=l+DkWo2ZhoNK9556YBMdFVNBkVeLpQfjuMUDlHntKSZyaetyXOnvUXuV7dvX86/wLJ ko/ffdFEImU13o1EPs2vDfO1747VHMw0bFEun9AyIv2flD76csOB6xZuC6dW+yV0cBv+ SisWIgBMQgy3/hw13dO5IgWBy6HMtBBBDS9kFFbJChiCrvEJisJlFxMOYzr0CYK5Lc4d Th6WgSpj8ufoace/gpxE99jT5m16k+z5TXXjJ/Toi7dk4b4z/k+rVfEM3FpjZoJ1lU58 EPbTwHrRgS4N1d/9ENYvq6OJ19Ok8HRdfNdZtVFH/3SnF6wc8b3Qcu1MZX1V0zS6OIQM Xn9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368354; x=1687960354; 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=4I8zZOOwyp4NjNuH+/dpM0ZZysjD7tVsNkFj0zmZXZM=; b=hhwOnrpaucKuYchOxxFjCCKtZ6uu9RigCLCvOliUPDITU/Y8jSmNJFMKCJsFbSkUa4 a0SxavlQk58BUn6e6fxx+ZmXaoPvGylJ6uImaXDKpfLEjXsf70AtekpYwF7rQqytCAX1 mlYckAl7vdkJi3iQ8pq1CO2+rajEiI2tersaijF3ut9f4uJPsrYGTN5noOxxfOGnbUvo 4BLc4fG84KBUzJlrpP5Bd+YsCCSOzfvwZe/GotrxginuhFiZ4HI1GfOtDQ/AOnGP500b eR32RQ4LUnxWFqPcNOP5yRpIaQcSpkO7xxvvGBGGkpcU6p5HPIGTGrCgsuBmNHMhuRP8 VL8Q== X-Gm-Message-State: AC+VfDyPYHh5MEawKOSoDX+kmxtJ4lz2zJDNG940MJvzZKbOrkKLGI9L 7HmwLxHvjYoxyYTypKs+tvNvWE7AkZ8PrqsakQw= X-Received: by 2002:ac2:52ae:0:b0:4f1:4898:d183 with SMTP id r14-20020ac252ae000000b004f14898d183mr3170767lfm.25.1685368353925; Mon, 29 May 2023 06:52:33 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id c16-20020ac25310000000b004f2532cfbc1sm4700lfh.81.2023.05.29.06.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 06:52:33 -0700 (PDT) From: Konrad Dybcio Date: Mon, 29 May 2023 15:52:25 +0200 Subject: [PATCH v8 06/18] drm/msm/a6xx: Improve a6xx_bus_clear_pending_transactions() MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v8-6-69c68206609e@linaro.org> References: <20230223-topic-gmuwrapper-v8-0-69c68206609e@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v8-0-69c68206609e@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=1685368343; l=1359; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=WRWN4WVkGFPt0it/wZ2I1vdoI21A135Lfips/fNYpFI=; b=mIpciuesV9A/22LuUm403HydwQAsP83RCVrbPN0KA4I+OL/+/dvEsyNBtqML4K0b0MbyVi3Ey veuPskNnSqgD7yRStu3erO8aeLxty6Ap3tGNO3y2CJ3Mc/Rb2nnWPVg 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?1767237262113406068?= X-GMAIL-MSGID: =?utf-8?q?1767237262113406068?= Unify the indentation and explain the cryptic 0xF value. Signed-off-by: Konrad Dybcio Reviewed-by: Akhil P Oommen --- 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 6bb4da70f6a6..e3ac3f045665 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1597,17 +1597,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;