From patchwork Thu Mar 30 23:25:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 13195049 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B106C761AF for ; Thu, 30 Mar 2023 23:26:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1674910F0B4; Thu, 30 Mar 2023 23:26:13 +0000 (UTC) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by gabe.freedesktop.org (Postfix) with ESMTPS id A79FA10F0A8 for ; Thu, 30 Mar 2023 23:25:33 +0000 (UTC) Received: by mail-lf1-x12d.google.com with SMTP id y20so26699563lfj.2 for ; Thu, 30 Mar 2023 16:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680218732; 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=tBl7yKVCwhjc6yO5z/z3JPkwp8Wjhy3CVWsctbwDdiM=; b=J7ShoQYmlST31y9vYBnakfBjPumtRbVT2+SIx+XvGQGWIxuk7JkKCbQA7Xk5dA7I7L yZ7Re0fmWUaIlXxfUVhl61dmv4UTqVVwn0/71RSOC8CCQlcZIbtTiBESgNAnO/Puz2sn dt99mGqLsUiJ5OzFZ710eUgzsIVVs5WCwE8SA3uhPrfeqrHqJqq0xEXKqiG+coxQ1HXV jfYiChhzN3ApQ6Cb5Rpo99/IX34BPRwfuFJkXGHr8oG7RnlsFsj1eneyi6vhRqUerjDY gYuCVVRPlj97Y7Y0qgme6ECacS78PL8jQuPZJZ5mozwctG7FeA1QuVUwfFV7LGJpffaP 0Vwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680218732; 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=tBl7yKVCwhjc6yO5z/z3JPkwp8Wjhy3CVWsctbwDdiM=; b=vH8BCfWpQueimmKSvFmQkcCW6QikovCUM+zSLpS8OdXybQ7Ngi9SGIENYsyUWgP1Pa sAqh1xhGLp6Oa33JNkNH+4JUpfa4rnj7IUDUWcqDyHLI1/ib8RQgXVBK8qDdWIUgSQNs Bkx46ehjQgilZl3JdU5rGmP1WGtCkFcqpJjbnIcXwtdtT3e5ONwqbwh3ltxq/QqEikFY 0a9peKISCWs/9pbUvC0R0JUKZ5b2cMJm3luLCxftuFYfSotXGTxt5pZNM1+HuGqGDy7N BU8nQ/shHQHS/k4mxgWCx1ZvtNbeFNzylTdWUdNsGayTiKF9QcAIN/U+aj8eI7vVYXCK 4HAQ== X-Gm-Message-State: AAQBX9d6AURYfxcU1z1K6LsZjY0piOEPZnE6FIvt37J4iiMRljJuwplR BaV9CjQEjF4Q2sM2BOrk1eZ1NA== X-Google-Smtp-Source: AKy350YBpdsthEGRJfnncDpyCejjJFqgpBgwEfkchfFs55N+b/DdksqIwRWVvJPLXY6DeK1x4ozP7w== X-Received: by 2002:a05:6512:503:b0:4dc:823c:8127 with SMTP id o3-20020a056512050300b004dc823c8127mr7083593lfb.57.1680218732024; Thu, 30 Mar 2023 16:25:32 -0700 (PDT) Received: from [192.168.1.101] (abxj225.neoplus.adsl.tpnet.pl. [83.9.3.225]) by smtp.gmail.com with ESMTPSA id g26-20020ac2539a000000b004dda80cabf0sm127241lfh.172.2023.03.30.16.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 16:25:31 -0700 (PDT) From: Konrad Dybcio Date: Fri, 31 Mar 2023 01:25:21 +0200 Subject: [PATCH v5 07/15] drm/msm/a6xx: Remove both GBIF and RBBM GBIF halt on hw init MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v5-7-bf774b9a902a@linaro.org> References: <20230223-topic-gmuwrapper-v5-0-bf774b9a902a@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v5-0-bf774b9a902a@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 X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680218720; l=1312; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=hzdufW67WGWbz2ZzqJov4K9OFxkr5eIp/rEY9Lr23FQ=; b=jUpAGWsk1sjcau7+3KKia8exWl7xlfLIwI0u4knrO022fI0vktcWsJ0R7MQyEWT0sZmd1gp+64Ru JkqYnxAhC9bGuEEKKOY17qjaRgmcj95XUwAmqk/IC5lmDqAdZZnn X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , Marijn Suijten , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently we're only deasserting REG_A6XX_RBBM_GBIF_HALT, but we also need REG_A6XX_GBIF_HALT to be set to 0. For GMU-equipped GPUs this is done in a6xx_bus_clear_pending_transactions(), but for the GMU-less ones we have to do it *somewhere*. Unhalting both side by side sounds like a good plan and it won't cause any issues if it's unnecessary. Also, add a memory barrier to ensure it's gone through. 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 a7ecb0a87e98..30dae3ddc1c5 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1015,8 +1015,12 @@ static int hw_init(struct msm_gpu *gpu) } /* 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);