From patchwork Thu Mar 30 23:25:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 77463 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp199791vqo; Thu, 30 Mar 2023 16:27:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bQ6DgIIYms0r7ioieO/xhm1+BQKToc8rANs3LvOYeIVqld6rBSUjrci+g56HqWsPRyBKMg X-Received: by 2002:a05:6402:159:b0:501:caaf:1e5 with SMTP id s25-20020a056402015900b00501caaf01e5mr21244368edu.18.1680218867458; Thu, 30 Mar 2023 16:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680218867; cv=none; d=google.com; s=arc-20160816; b=X51HOAztwkBSoQpDa7fEyhNCoFhhdvM1YSPvymbc3lFP1f5NmfveolGuGCvnl6ByeJ uN7MG3T2TLFYd5ib0bAnvJm7/TQmo9WVgQ79oXinw12svEwWKecg3tr78xIn3y3OQVj4 RnA6U57iS88Ze8l0P2EXmeW99PWrmOxB+PUB5JpmBAPfINYqohyIhYPWNe9Ry5Eqz6LA +MATEmrSSuZI/m34FLWDibo64wzz+1/mbrdWrdvM94PyF9bCyZ0GSIOrhanUgmURYVgG OZ1H2XTUFqIPe9oAMWEYxB6JFVSPjASNGl/TIT59/ZnBkulJDsQNz0B7wD/5NeoUqvHw Oxpg== 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=UaQqSlW0Hu7wuwFuXxr7ZB+drxQgUbdgeqKDpKp7IHg=; b=H6wwUKZg3SzTTjJcobHZ0sqB9or6ZiY24OElZOszACR403aleZuK7VrM6Svzv9Y/bA Kq+plrGScDQXd7TN4AgCOI4pIrrao3bdXhzGNNbiCa6pJQsqK2IJ8ZITSlLvs+c5eExP 20ROz7RIIA2s6yKFzfgn1syam5op9DWJ55mubhujy/3wRJfRy3iPxGmCANFDlgWYZtgD azJsyzPuMciB5wQc6QmMTViqCn8e1JIHMQcRjMh2I29A7jVhyUaPNbeJNSEOexw2wVqf 960WBOb8tua+ihaJdDCsuCcx2mArhwcCAgiYhvVknNeIuUBk+6WMLDXzl4/7E4jem2P/ ULxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VoTrTlyv; 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 u1-20020a50eac1000000b004c21e05c798si804595edp.27.2023.03.30.16.27.23; Thu, 30 Mar 2023 16:27: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=VoTrTlyv; 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 S231627AbjC3X0S (ORCPT + 99 others); Thu, 30 Mar 2023 19:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbjC3XZo (ORCPT ); Thu, 30 Mar 2023 19:25:44 -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 D1E6A1206F for ; Thu, 30 Mar 2023 16:25:33 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id j11so26631116lfg.13 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=1680218733; 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=UaQqSlW0Hu7wuwFuXxr7ZB+drxQgUbdgeqKDpKp7IHg=; b=VoTrTlyva0/pRKXMl0hn4cMaA39/aoaR4/8ZZAh9o6WOKfKpR+gWirGoGwaSRDGqFz wZFmjn8nSY2p8xKPZA6lftR2MBAJQJMH27B6gJAaQA9y0t799nBnuBCVQNt1R0kuc8yh 8NaYDB4FQxsNk76tF+PLdXIZ7tdboZeL+M34QC/xXxHlaoq4CDmFx2+b1PQKAlr+FQeb xgTa6pjpqnN0quEsuz3cueAy8Y+NVJPCfynlVTG2xSkzY/r0Te9iCC7dt7JjL27XnWcL VVMyDrqZt1LBIUYz7hci1aBNAUCHySUNSDC6TYbybc8ciCZ8lGVZ0iEwlfj5zf9TXOo8 0Z3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680218733; 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=UaQqSlW0Hu7wuwFuXxr7ZB+drxQgUbdgeqKDpKp7IHg=; b=3V4yQ6bM06r3GGu06H75dhsDwndwLupnoFO+tHG6sWhYIw5+7brxOhynBDct+Bfy62 NRazEIS7PinvLxLIfhtA3xw7fznV4cshfFDRJzhK8tOCoZoLNSQrBBExJGuDL7anMGPR R7xabjHJ7vjafSou0zMByUNIisS8scmriL6I++JH/HUWSnlJcAxGK9t36KB7JLRmhmQh 7+y2J8KU4fdcSylsNUw8aogvcoxmzC6P087wQ1CQJXbcykNck7zK5qgm7RqHDK0TEUDn XweNhOYfL6x6KmHsTSbxwcE4l8nnu5MOm/f319p30VH6oCby85gEba5EqdEqpxKa10NB Ax1g== X-Gm-Message-State: AAQBX9f/6KEVzJ2CgLw3Qtnwi7x0pcju9WmdjPZ9CIVx/fx3z+soWuyX O98ocy3THU3Mc/zj7dkwyMy1Wg== X-Received: by 2002:ac2:4105:0:b0:4db:381d:4496 with SMTP id b5-20020ac24105000000b004db381d4496mr6099217lfi.51.1680218733408; Thu, 30 Mar 2023 16:25:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 16:25:33 -0700 (PDT) From: Konrad Dybcio Date: Fri, 31 Mar 2023 01:25:22 +0200 Subject: [PATCH v5 08/15] drm/msm/adreno: Disable has_cached_coherent in GMU wrapper configurations MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v5-8-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 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=1680218720; l=1374; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=pgsq2wrmx2dN+DhvHdVkqgJZhLfKKJzRqreYHhrCBpQ=; b=ZUd/VafLrjD0054XVcT6XP030VEirGQOXi/zbif+vu4oYlkpmNnSi/9Idamps4JWET8miFA8TTAL JVJVISW5AWVNY9mdNYozBMeaZK6UK7taSwr4866ybvsItP8zQM7E X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-0.2 required=5.0 tests=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?1761837179253464060?= X-GMAIL-MSGID: =?utf-8?q?1761837179253464060?= 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 745f59682737..2c6de326187b 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -545,7 +545,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)) { @@ -557,6 +556,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; }