From patchwork Thu Feb 23 12:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 60934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp275375wrd; Thu, 23 Feb 2023 04:08:06 -0800 (PST) X-Google-Smtp-Source: AK7set/HLXWIYEQLA+xqBaLdN+iuNt9Vt2t/y6kVqCnZ799Lhe9ZSsp7B4ZFrcPQ8/NBvw6Okz/Q X-Received: by 2002:a05:6a20:7da9:b0:c7:7a94:f11 with SMTP id v41-20020a056a207da900b000c77a940f11mr14215892pzj.0.1677154086168; Thu, 23 Feb 2023 04:08:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677154086; cv=none; d=google.com; s=arc-20160816; b=Z3FdoIosQSW6APBaMYy74lm3jlnxvMmETpdGeV+X1G/frODoXoPusmaWfyYEMw9ikW v6LVIny0zQUviSdK2U2skOtqrr6pd9qrz642bKsM6FEfYYKKGYQfHTg6AuVPlTsqVws3 sxHingY6IM+lHqwYyNJKbYmldPYn5kakJTyogVJngOJKZJHgFqQwIRVYXsMNiW16FLPm m+ewlCQU5uFtPfCqHtM3u6umxo197qPm/z3wfObQZJfZFmYgR79+MiWLsKALXK5I5LLX 9EkbMIXTzpEHkzQFKDxpAlLoGzaaKD1aXLhoETRQfXY4nw2/1NI6FqA6AEZJuOioF+id AUSA== 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=Qf5HInxjG90aUJ6hCZyojCQwkimyt7Jgftn2UOCVowY=; b=C78vxI1UIZyEVbkWCJm4gZPUIcvif1Chk4ysQ4VBHUKEOak/+sZjjSCQuPNEj+lw3j /Ayi+uWeyHXDRIqSMN7D5ll2hmTcZ/Ruhcl2i2Vom8csg1CFQN/eZuCt2oh3mQJT7fRg bnJi99Qss5PwzQNsjaR/SROKRvq5XOgxgm/m6ALK2P1l+OCnf2NILwgl5EsV2Hs9Qupr 3QcZ+V8xIZO3zFa4TUf5+ZaH7Xd82WctgzzPQg9AmkstrS3yZaXvqjcseqRCZmsSkij9 K2MazVVElaXnMTolVxBJdYjmsmhXuj15T6IW5V8qq6insRL5Q9u2Hvyru/5zqCP4z9sI AWbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PblEPf/x"; 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 t186-20020a635fc3000000b00502d65e8491si9154434pgb.620.2023.02.23.04.07.52; Thu, 23 Feb 2023 04:08:06 -0800 (PST) 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="PblEPf/x"; 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 S234160AbjBWMHQ (ORCPT + 99 others); Thu, 23 Feb 2023 07:07:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233953AbjBWMHF (ORCPT ); Thu, 23 Feb 2023 07:07:05 -0500 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B66CA54A16 for ; Thu, 23 Feb 2023 04:06:56 -0800 (PST) Received: by mail-lj1-x22c.google.com with SMTP id b13so11569406ljf.6 for ; Thu, 23 Feb 2023 04:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Qf5HInxjG90aUJ6hCZyojCQwkimyt7Jgftn2UOCVowY=; b=PblEPf/xero1S5B6lz+EkjYQqQGaR3LqwLmbXZLAlwoNHm7ZalfNJZ2fHw1hwcF2VS 0d1LkH4gUzTpbyC+OYCy/89Uv0rUCxpXqd3xvPQf//Oa02qGtNswmtzmT1pde1TYMaGO Y96OQxy/OCX6jNOO6byWEp7EJr5BVZUUjrxa6dBnw7BCCbNg8fM9lEIFIhSDsTRTEGc0 sz+I7NIVt6lzuUL4MIlHoM1megdE+6rt2soWExAfh3JNU394tu2cW8YUswJ3NGNJDe8L 8QlgOA3NhMtuNN2mJGkKW2ar89bmgdBwmX5FuLAbNs+nW7PJddScFIkE51xF0P8ZvJa1 d1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Qf5HInxjG90aUJ6hCZyojCQwkimyt7Jgftn2UOCVowY=; b=gkd34AH4GWhczLLpmSgRP+FY5ma4p5Gq3ZZIYkhxeC9gTrm7k1NucLL8FdIOUtmhIl j6oIVOGOAsm87K8eEv7KF+c2iiLW3T+oksof1z8WQrFbXKtCg70TjeW49m5hEZIPXy8Z yh4QbE+cPp4ERf69kBVmHe7GGgh5kZ9Ifpw2ap/IauuzKWEbGrlul5BsgxzSEMelclw5 OiI4qMMD37WUnIsoFXg0y54y58c13JEK4bQ8oWboxQhgtNClBRYekxczHm2hyMjuB4nr UM65w3uw1U/KWfQ9vBfnl1WI8HnwcrLjPrwdXX0MRhFmGP8v1fdSursYPH+1MyhK6Izy wNUA== X-Gm-Message-State: AO0yUKXb8rZaYZsDMldRTQf16RaW+bJW5EQE3zSNaNZGhIfzD+SIEC5u fW2fVDYiwBHX5q3QtFRXkiKjAQ== X-Received: by 2002:a05:651c:109:b0:293:3d31:be8 with SMTP id a9-20020a05651c010900b002933d310be8mr4002640ljb.5.1677154015641; Thu, 23 Feb 2023 04:06:55 -0800 (PST) Received: from [192.168.1.101] (abxi151.neoplus.adsl.tpnet.pl. [83.9.2.151]) by smtp.gmail.com with ESMTPSA id h23-20020a2ea497000000b0029599744c02sm414838lji.75.2023.02.23.04.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 04:06:55 -0800 (PST) From: Konrad Dybcio Date: Thu, 23 Feb 2023 13:06:41 +0100 Subject: [PATCH v3 07/15] drm/msm/adreno: Disable has_cached_coherent in GMU wrapper configurations MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v3-7-5be55a336819@linaro.org> References: <20230223-topic-gmuwrapper-v3-0-5be55a336819@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v3-0-5be55a336819@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 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 , Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1677154003; l=1374; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=YYycR3bRJfKGsgGpgNOineZFPyZdnWytf23WfqsrBCk=; b=cLHqy1jK95xMtC2H769nOzM6xMSsaFAe/WGrn1IYO7julVHu5tBndfmxPVQn2i+HLOjV8ES2kW4E +nErpCukA7P3YzRQOH6OQqE7uQm5Kq+ROEkDvH0NLuZVuEw6UKS8 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 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?1758623522957214606?= X-GMAIL-MSGID: =?utf-8?q?1758623522957214606?= A610 and A619_holi don't support the feature. Disable it to make the GPU stop crashing after almost each and every submission - the received data on the GPU end was simply incomplete in garbled, resulting in almost nothing being executed properly. Extend the disablement to adreno_has_gmu_wrapper, as none of the GMU wrapper Adrenos that don't support yet seem to feature it. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/adreno_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 5142a4c72cfc..dfb43741ea32 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -540,7 +540,6 @@ static int adreno_bind(struct device *dev, struct device *master, void *data) config.rev.minor, config.rev.patchid); priv->is_a2xx = config.rev.core == 2; - priv->has_cached_coherent = config.rev.core >= 6; gpu = info->init(drm); if (IS_ERR(gpu)) { @@ -552,6 +551,10 @@ static int adreno_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; + if (config.rev.core >= 6) + if (!adreno_has_gmu_wrapper(to_adreno_gpu(gpu))) + priv->has_cached_coherent = true; + return 0; }