From patchwork Sat May 20 12:19:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 96779 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp328873vqo; Sat, 20 May 2023 05:23:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5//VtjRylkkPgEAYJky/GSEuMaUr255CWLQEfnj7v7z51L6lBsSj5N40Id04AU0VGIfNjT X-Received: by 2002:a05:6a00:134c:b0:64c:9972:f742 with SMTP id k12-20020a056a00134c00b0064c9972f742mr7308318pfu.8.1684585398537; Sat, 20 May 2023 05:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684585398; cv=none; d=google.com; s=arc-20160816; b=PdIVGgW52W5qrioMMh5g/E34msSn5Tp+OSxqBze3eYu/tHXPLekTA3Ewk2NS/EfA4a Az6ZQ8RwsdEYLx8s+CJETVBDgML46jTjDbRNc6TL9VzLxJWVjrTea6ESXyyzmCuNUFXR ik8UdZWtm07zUJJhYRl4bReHVg8/3nIIhx8Dag3SpYkz+qASzA4s6iy0mFsnQQ1Uefpg /IcJ1h76g3FekaHrHpEEZNwMepDghjeQFvmDDzY6//Nr5/gZ/siVwR4ukyyWo5DJxPse z1lt9SNgwr4UnDzpoQ2sSCCH7giK1SzD+ENix2zFVbFL/lr4CoUsASi6xebJeKsC3ukc I8Hw== 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=6Ip+CXVuP7IS2/mYQVsL3Ja3H2zQ181XB1GCMW1tFs8=; b=DHRTWkLIRCC77R7TVwpaSw+4/PVE3fCwhV68omlGUvDYqjXyYVRgjS2x2AYl92f6X0 xaw3nSuva+VKCfmcOwVLKuHn4Y9xvJEIO/vrjgYKGarGFQt+MVqJCnANLBKkjKBFEgnu A5ML4c22KXGbALEtYoBZxuVqxuUqaUa2u3DVDK5AI7kdufDA+1SLOGtALIZBCmtmVkoh ZuyD7PThvKXLCnLs/Gw+Ho3nvHFJjibuXPDuxOgnpcc5epL3G44ttGWeXNJrc1jCK3fl hsurXyKsNYlByQHRWYgMqhS05A0WKqqhCulXwaJaSr5EzTiUBSJaOsQc8+oDA2DkbyNB sO8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V2JG2a5J; 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 w128-20020a623086000000b00648628d3103si1392680pfw.377.2023.05.20.05.23.06; Sat, 20 May 2023 05:23:18 -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=V2JG2a5J; 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 S231344AbjETMVW (ORCPT + 99 others); Sat, 20 May 2023 08:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231851AbjETMUv (ORCPT ); Sat, 20 May 2023 08:20:51 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B347610FD for ; Sat, 20 May 2023 05:20:11 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2af29b37bd7so12876841fa.1 for ; Sat, 20 May 2023 05:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684585210; x=1687177210; 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=6Ip+CXVuP7IS2/mYQVsL3Ja3H2zQ181XB1GCMW1tFs8=; b=V2JG2a5J5x3ayG/iRny1Ow5v+YHDpYewZWpqNN/sDR1hWsJVBfSBDECP6YrUzAtqY0 M5uHi1AfWgrb31dpuAXPMiqW20ruCogAeJVQgolKdgvYH0Kbe4VxuppmMgy39jJpzRjM 0GSwk14yzn/dHchFdgxdiVcPi96YCzkqPkOLHAKoV/L2kv5RqV/AoJqXywW2klb1DC+H qysSxO7p1mZjRMk6ui2aJe/Nqv/UKvONqPdPmcxKbYVLJShbA4CRDPZlFtUzQQBBymst Mf5Zyut55ftnSRRTKpdq3hYbR3n+VZXbYcNLLTmVvjIrdPWX6v8TcyWlUytkSb5hax8Q uFpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684585210; x=1687177210; 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=6Ip+CXVuP7IS2/mYQVsL3Ja3H2zQ181XB1GCMW1tFs8=; b=fUesAXCJJAttMcRy+8Zp/xCGOqIWbVhMIsxDhJicMNtKNAOisTZkooRGlmEVGFQc/c TdYNk4yyGW19UqnUJjedZrCA490t3eH4rCOcKfafwwJWykVPBQpagw9ABAMqeb39Dbzg xnw350YfMa1HCu4FBX3oE2QuMyqSl7X/+yA63vPRpcErFnrXTkkbTW3dn1keaYHdDVn7 zyDcG+pb14VorVLbFD7vd7RHjiF8D68OY5MSQh9i9ETlLkMG++CdIQa8y7P7qacOfpx4 jwLQ/cGJUwpGsery/0amWAZHLXbllaONkWIuEgnb9RKn+e4vhqOsR2b5Scuc9e9cUG7V QwYA== X-Gm-Message-State: AC+VfDwjma6hcFPZAzBwPaKhYVyTcjiUnzd3B4ndWGGv044rZx3mOlVp R5daul5L81lQrysoX7UXJu+X+g== X-Received: by 2002:a19:7018:0:b0:4f1:3d7d:409e with SMTP id h24-20020a197018000000b004f13d7d409emr1775263lfc.0.1684585209892; Sat, 20 May 2023 05:20:09 -0700 (PDT) Received: from [192.168.1.101] (abxi58.neoplus.adsl.tpnet.pl. [83.9.2.58]) by smtp.gmail.com with ESMTPSA id y6-20020ac24466000000b004f37bd02a89sm244766lfl.287.2023.05.20.05.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 05:20:09 -0700 (PDT) From: Konrad Dybcio Date: Sat, 20 May 2023 14:19:54 +0200 Subject: [PATCH v7 14/18] drm/msm/a6xx: Fix some A619 tunables MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v7-14-ecc7aab83556@linaro.org> References: <20230223-topic-gmuwrapper-v7-0-ecc7aab83556@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v7-0-ecc7aab83556@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=1684585186; l=1537; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=tiRhEnWKQorRchYKK0xFSXYxLCZIr0JF9605Ln4P3Mc=; b=6SwQwq/wcZwxW4yEQVOA5mZvDtrX7nHuyB/e5KLEInDWCrw81IDGPtjfjNDDBsSw+TJRba0C6 RUXiL0DgPMoA1WRZnBdKZCN2CiNHUN9aJms2zOdcWl8HZoWUpEdm69G 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,URIBL_BLOCKED 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?1766415819025675748?= X-GMAIL-MSGID: =?utf-8?q?1766415819025675748?= Adreno 619 expects some tunables to be set differently. Make up for it. Fixes: b7616b5c69e6 ("drm/msm/adreno: Add A619 support") 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 ca055bff23c8..9f296928c249 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1198,6 +1198,8 @@ static int hw_init(struct msm_gpu *gpu) gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00200200); else if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu)) gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00300200); + else if (adreno_is_a619(adreno_gpu)) + gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00018000); else if (adreno_is_a610(adreno_gpu)) gpu_write(gpu, REG_A6XX_PC_DBG_ECO_CNTL, 0x00080000); else @@ -1215,7 +1217,9 @@ static int hw_init(struct msm_gpu *gpu) a6xx_set_ubwc_config(gpu); /* Enable fault detection */ - if (adreno_is_a610(adreno_gpu)) + if (adreno_is_a619(adreno_gpu)) + gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x3fffff); + else if (adreno_is_a610(adreno_gpu)) gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x3ffff); else gpu_write(gpu, REG_A6XX_RBBM_INTERFACE_HANG_INT_CNTL, (1 << 30) | 0x1fffff);