Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3180394rwd; Mon, 29 May 2023 06:54:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xFozRRxLelBSG58Wix4vjquPccBNJAhA+kcuZQtLKRtJ70QCUpO43EL5nkQTCH2VKXOKA X-Received: by 2002:a17:902:7089:b0:1ae:3145:ab7a with SMTP id z9-20020a170902708900b001ae3145ab7amr10710678plk.9.1685368453299; Mon, 29 May 2023 06:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368453; cv=none; d=google.com; s=arc-20160816; b=AjKXBXmPXMM/ikmyNewXz1fTe4EYBzNKbEl0Mf0SuegrnoDyWI6aFNkXXyDTJtpjN6 Ln6FhLkFvcQcZQkp+rfCc4kTS1R2p1JDjuQ2+JATkKQ0N8MHAqozugve3blu/RB4cFwD l7gNLdIJA4VRxz0fzI2hXQa0Jp4GH6DFoHvrY6lIXFG3nnr9kFTe5O8v6CHjZPziRAf1 /tARPe4k+TrDsquDZw5b+M2naA0Xxl13TQfUCvrLt+A/eoJ9GOoRHwYzFuwiEpsHPlHX x88Mw9p96iPhSJnPBOPnX8lawAPhAnLXkN8HWGjLMbZU9OsZYF0A5+PzuetB9JY9ujvN DeoA== 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=jEG7D8dDSqo05e8UhKgqNHGqbXe0pvKNUFpleUKYXVg=; b=jvfFhZbWRPZ1yy7751z6gttpE629IgEhvKaxwyWSS/ItvSYcX9jkb/jhCUO93lOJT6 sc0bOEHO5PoIiJcyRSK4cPcdjGEQ80lMlGKQt5oKFQtyvMTXUjJD7FQdFAwQNm3vku06 hR6yzvHd9IZG+qVnLu0Tsyvuc9OhbrscHVinjkOt2n0GCGOcG92e2sGK1faKZWDgSHQv BUu3CwybA0s+dTtIszdOXTAYaMY7YId3Te+Y+TZbSDKTiMzCB+WhDapkW7G9iskizY3k CcSMt5nRKsNdxxycgYJJkSbJ9a9rmqG14PYXCdxkcArEDi6c0knyPzQpe+YjgNaW/Vmb 2CQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VYVTUh8p; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a170902c94900b001adfe96d41esi2702977pla.566.2023.05.29.06.53.58; Mon, 29 May 2023 06:54:13 -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=VYVTUh8p; 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 S230044AbjE2NxN (ORCPT + 99 others); Mon, 29 May 2023 09:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbjE2Nws (ORCPT ); Mon, 29 May 2023 09:52:48 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9070311B for ; Mon, 29 May 2023 06:52:38 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f3bb61f860so3744328e87.3 for ; Mon, 29 May 2023 06:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368357; x=1687960357; 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=jEG7D8dDSqo05e8UhKgqNHGqbXe0pvKNUFpleUKYXVg=; b=VYVTUh8pzTNgV/eVoCNaftcZqjFTRyjiCwc+8UsNxROQQ1N6C6dvlrpJi4JIs0Edjj uletisN22xYlC87IH39xVDiD6XTEe9HptbcoAY1ViLOWEOBkHiq8D0A29yBQr3b6DLCF macvNl41DoWq0xDMKH11Imwo2RvVmJYoJ5dfluBXrXyfbknaS2vHDWxRwVzsQ3cVoTDE naYDncIxqPghGlwhp0Ah7CEE6nV1RAEWt8ET51Nk5ijHzw7NJgzjzbgA4/+hSxvppdff ephadTzUZd4p9lMm3lDEjhV1L9sP+84mLko0VcoEsbkxh8NWLT1cKND8E+wjv2dFRntP 8wjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368357; x=1687960357; 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=jEG7D8dDSqo05e8UhKgqNHGqbXe0pvKNUFpleUKYXVg=; b=TA02TLtbXHJbg7m9AjFrGQs3xGIvz6qxQQMhSJSPiwjarV0Gyufeqm8DQH4bQPAKKi Y5xJEQ0pGyHoVwG8T3vMius8y/EpJJ3OB53Zj22ejQmjAQwejw9FAKocuOvEVKcAOcBX 7xHodlZNJyN8Me1HlMP5XO0RjZNGnUDYCsAlTD8BJ3TTe7q4YsPyVHZBmqFgbTigr2QY FpId1sD7irOq4hHMZXPbs6NJA6v66eXw77ez4dwtqG+a5b2HFypA685uEfm+iUuPd5VQ JjTXsd3r8sq5mlkEacyIFquU7U1IVPvSyyUOipfmYuSY9dmfkMk5sKdxcOiBMmySeyi8 pyqg== X-Gm-Message-State: AC+VfDx4q/CKW1o6w6nvuRksiv7RKNRKwt95gHymbVgEC/I6+V5RgMUj rNOWem0x9qLobEJ7xdxm4XouWw== X-Received: by 2002:ac2:4a84:0:b0:4f4:b05c:dbca with SMTP id l4-20020ac24a84000000b004f4b05cdbcamr3485700lfp.66.1685368356810; Mon, 29 May 2023 06:52:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 06:52:36 -0700 (PDT) From: Konrad Dybcio Date: Mon, 29 May 2023 15:52:27 +0200 Subject: [PATCH v8 08/18] drm/msm/a6xx: Remove both GBIF and RBBM GBIF halt on hw init MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230223-topic-gmuwrapper-v8-8-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=1283; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=JTiDWY7uw1D1PMKchNdprqbjJGR71Zsm7TruEBGJMeY=; b=xf73OwsERrXCMsq+Y+pf5PjUz5MTlKgqefICpZArCRq3AjzzRFz7lkqcF71SO/1SDRJfxrJKI cw21cRkAjsqALBfkZ1voAsLn2d2HMcmL6Z5gewnBdwHSDizkODWwhs+ 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 Currently we're only deasserting REG_A6XX_RBBM_GBIF_HALT, but we also need REG_A6XX_GBIF_HALT to be set to 0. This is typically done automatically on successful GX collapse, but in case that fails, we should take care of it. Also, add a memory barrier to ensure it's gone through before jumping to further initialization. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 083ccb5bcb4e..dfde5fb65eed 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1003,8 +1003,12 @@ static int hw_init(struct msm_gpu *gpu) a6xx_gmu_set_oob(&a6xx_gpu->gmu, GMU_OOB_GPU_SET); /* Clear GBIF halt in case GX domain was not collapsed */ - if (a6xx_has_gbif(adreno_gpu)) + if (a6xx_has_gbif(adreno_gpu)) { + gpu_write(gpu, REG_A6XX_GBIF_HALT, 0); gpu_write(gpu, REG_A6XX_RBBM_GBIF_HALT, 0); + /* Let's make extra sure that the GPU can access the memory.. */ + mb(); + } gpu_write(gpu, REG_A6XX_RBBM_SECVID_TSB_CNTL, 0); -- 2.40.1