Message ID | 20230223-topic-gmuwrapper-v4-6-e987eb79d03f@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1829497wrd; Tue, 14 Mar 2023 08:38:06 -0700 (PDT) X-Google-Smtp-Source: AK7set9QDIPGeozslMnopHRrOBSKSRzG7aw6DopSp5rU2HKUSltJPV+pxrUGEXr7u+6loMR/XSgy X-Received: by 2002:a05:6a20:1615:b0:d5:a476:b159 with SMTP id l21-20020a056a20161500b000d5a476b159mr1890492pzj.61.1678808286488; Tue, 14 Mar 2023 08:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678808286; cv=none; d=google.com; s=arc-20160816; b=DOe8adFDedJkoczWdAPPKqaE5FzL8Mtwi0xta+ZsWMqbyKClkDPm8DHaOBuhH3DqXU aRZf2pdg3yP4o6xpvmdZ2NG4TqOLxyC87wzgYRDIWy1As9+x1v/7rCwmjsrwwqLufp2F 2Xc6PXMYQ9NC6gcbnRAE4cj7+YQueEpsA+3fSSFn04t1w5wr+AIHF9I7yzF1VJEZ0WU7 q1nYrgMH+KtKihcWJulUaSGait7/2Inr6rKe1xGpiBfxH7nfYChv4s30P/+PzyqTA+XX 3/qgRLmFR4tjXqGY8zEHpm+K5GVNfY1O5VCRK5KXUlI1lMZPlSEzIHXoD9zNj9KJ4cvg xjfg== 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=159lZK1VC8AnArbTbfywvfz47MuAlqr+e0q9A9rUbAY=; b=NWKceH37HgJ7YKAYUtWo+P7Ee0Wjli+K3Mge1fvIgfo26Zl5WfhrcMWt1LTvuZCL4+ L9F+vVdt5ACweZWUB6WiLLUMVtt6qOWKr92B1VVXclerlVOLGy/wUzrEJ2Ez9ptNzHIu E5uIQiupxEmD64QkyyIIRG5GMF+BYkMKXq9LaWivIFoNljBV+0d6tjr4YdLquglE2gEC G56+FKCJtkOSvtn/XNznv8FiS1+LHONvlzVDkfNdfWOpjbGqQ8Yae9Jf+TDOljSAZN0E O/Yre6TzX04WS6zmuVr3a3k1NEnLzjRP9d0agRFzVnyAR3BejSZlW7qPNQsSWH9Lvu19 jQZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ybkS1ks8; 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 w189-20020a6382c6000000b005074f2e8480si2484691pgd.425.2023.03.14.08.37.50; Tue, 14 Mar 2023 08:38:06 -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=ybkS1ks8; 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 S231727AbjCNP3E (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 11:29:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbjCNP2y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 11:28:54 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E33A614E for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 08:28:48 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id g18so16449285ljl.3 for <linux-kernel@vger.kernel.org>; Tue, 14 Mar 2023 08:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678807728; 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=159lZK1VC8AnArbTbfywvfz47MuAlqr+e0q9A9rUbAY=; b=ybkS1ks85NwBg0oo4KVc4YOEPbJDHyxaTPYyY5Ix/0wWYBycqMFQxYFzrOVQ6wjypO fQmQycMbmWZvRFv7EduPzK10eesNeyMeiZJvpoHNqbbImGbWHlCu0F/fNvwSaVttOIlN JSbW0fOGV5ZttCFGvf6VYxPo8gUKcGGVxpMglgQDoUl30mV6R4KoNhgzpaQ2j9Glukbz RMENp5oNU5cfRTprvVqD6orxx+uicybh/W3zYauQtLBj6JZRMKQ45UVZCOvhq+SHvDd6 lJWX0KvsUlPjFe6eyjd21Ka+W3Hcqs8eiTJMKR6z32H0p0/HpJqW2tyDrqH1IaokaCXz +56A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678807728; 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=159lZK1VC8AnArbTbfywvfz47MuAlqr+e0q9A9rUbAY=; b=CeuBd5+9nv5ULJ+S9T2xQw3sM9sjsWjQD6HQWdSef1bXcFBzg4vwO+ND+fsLlzhVHi mRRjYMqJres6BxFNhfhhMMp6Eo4HooGV7ZvXEZIJ/A8w2iT6sqw50Z+FsRHvL+6VKr3+ A4CEjy3HJOrB/OfWs9/MXrglVl0plbWxDnS/4fW8qRMAuv8/hRyJxr3j1fst4iz1wlo6 sMVPgc3Up7wIk62tHZvLwojY3/r3FgzFyetxDO8ToqkLumv2xqkzarKHVWJJZVtSzfEz iGj3p66yYKe4fiB47uS0le4xpLpChBiQ3yS5KX2RTk17RJ+53dkqnt9LrxjS77YSffMS tjKw== X-Gm-Message-State: AO0yUKXIYE/pOdO4khJJXIV6b+DBrY8o5JvAhYdHceeKgS4B+XmysvvH Hi8oMByFV+76aNsPspMFGbqlVQ== X-Received: by 2002:a05:651c:1059:b0:295:b96e:ca99 with SMTP id x25-20020a05651c105900b00295b96eca99mr14017598ljm.50.1678807728292; Tue, 14 Mar 2023 08:28:48 -0700 (PDT) Received: from [192.168.1.101] (abyj16.neoplus.adsl.tpnet.pl. [83.9.29.16]) by smtp.gmail.com with ESMTPSA id 27-20020a2e165b000000b002986a977bf2sm491529ljw.90.2023.03.14.08.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 08:28:48 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Tue, 14 Mar 2023 16:28:37 +0100 Subject: [PATCH v4 06/14] 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-v4-6-e987eb79d03f@linaro.org> References: <20230223-topic-gmuwrapper-v4-0-e987eb79d03f@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v4-0-e987eb79d03f@linaro.org> To: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Akhil P Oommen <quic_akhilpo@quicinc.com> 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 <robdclark@chromium.org>, Marijn Suijten <marijn.suijten@somainline.org>, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678807716; l=1251; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=SQf5xqv6dgkFv8lqaRaSsqR3oatLGI4JEKv+JlvqW4k=; b=j0wqavMQyp9JVzEUb+dyZ3aehx3l+F1HEWpU/j8PV1u7+qyWbwNnPl8Ix1vohsIlZY8QP7XOf0G8 gFxAnV4NCSDkUzx+xsz2mPlEqsuMhpdcxfpQLRfk7YgDSyVTBnNy X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_SOCKS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760358077616801460?= X-GMAIL-MSGID: =?utf-8?q?1760358077616801460?= |
Series |
GMU-less A6xx support (A610, A619_holi)
|
|
Commit Message
Konrad Dybcio
March 14, 2023, 3:28 p.m. UTC
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.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On 14/03/2023 17:28, Konrad Dybcio wrote: > 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. > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index a90847a3379a..70e9bd21ba3b 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);