From patchwork Thu Jun 15 23:20:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 108752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp978461vqr; Thu, 15 Jun 2023 16:33:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6CxCtiZ7rD8lWyHcQWZrKofOT58dlhz9RxCIleK6ERdPBMy3BUxSF1ubSsrLoMnrDiXHdT X-Received: by 2002:a05:6a21:1506:b0:105:a24f:cff1 with SMTP id nq6-20020a056a21150600b00105a24fcff1mr901605pzb.24.1686872002416; Thu, 15 Jun 2023 16:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686872002; cv=none; d=google.com; s=arc-20160816; b=Bekq9qLhP8gRW2btDnr9M1SwdiWzoZX+XyAJ1oTYu0T6XPoVRMlED6+CXK8OgJNT2O 8KZLVhtLml4oq0mEQzIxbsOGAihmlKaESDj0wV/XJgm/MaVUSe6Zh99fno/hOuvVx0Lf VqaMn6Q46AwuuL/9ZC62ETDXfT9SnacQjlQWfBxu+78S4+TEWIdqBd5pdo3DyqKeqJB9 ei6ccVTozqtqk93X1+V3p2DuP6qVRt2Cnt4fYyk0aiYsNGHKXSG8ZO8oAUbljXUPaAyX WyHrhW80gc5EPZ8wUGQ7sV/IDmWmPA97Pakvts81grfhlK3Qzv5ENTHab3nEwGNwwUoo 8VhQ== 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=FfaunTIpb+/JoaE2P6J1QB9JUjqHG1mwiTPg5NcHdcQ=; b=cQMfkf9fMk2HyO85z9pIr5PR7b1FhpZVCYVKfD7NpadnVoAnFr3rAQRB+dpaQBb6aX 4A31ad0hYg+aURrzBbVM/ZxvPt7oG5sb1dEU8muUFtanYwhqYI3pav6lIL6xxqEGRs87 7EJWx9Ex7oamKBhw7UOZZasmcwWyNc6SQc9RC33YDDL6EqO6bT71ybx+KU8KTaDb+7QJ TE+bCaAxolR2OMjAHHMjibwERPn8aQmpU6+L+VpKKSpQ4Q77ncl6cmLu9N0LwQM3aQ14 wV/FXjyCfC4L00MTEHpdepJDUI1Z4tU1u23DZ/13fQQtdcar7iLYUo115rbY68UROsoR hK0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w3Kx1SA0; 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 l5-20020a63be05000000b00543a6cc74bfsi13758151pgf.634.2023.06.15.16.33.05; Thu, 15 Jun 2023 16:33:22 -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=w3Kx1SA0; 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 S240508AbjFOXWq (ORCPT + 99 others); Thu, 15 Jun 2023 19:22:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240149AbjFOXWJ (ORCPT ); Thu, 15 Jun 2023 19:22:09 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A74782D4A for ; Thu, 15 Jun 2023 16:21:44 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f6370ddd27so6089e87.0 for ; Thu, 15 Jun 2023 16:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686871303; x=1689463303; 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=FfaunTIpb+/JoaE2P6J1QB9JUjqHG1mwiTPg5NcHdcQ=; b=w3Kx1SA00eZlb6JC0PPb54L1DnPi9w4zvnnhpAM4RsVgwcvM+cTuGhIDGFnVNcPFsX 0bHAGRGFhrYQnk4ONN92/KJKJtCVvQSyj8ZGUxMEpmGO5B20ttqKKESQeRC5tENVpAg1 Csp8gZ++1lD8BYEEGNCeG4oNZlbWPn07J6k2Wx3HpeTv5ZkkhCLr9KpHSViaVSzzqwbd /uNuTTJvzJe+Sb57WYdd0uoGX8v7YwZrqVT+axJquq5knWSPdc4fYA+oSvLhUOM7hQ1F g0H7hmx6z0XHYhn2zY0bWEH1CF7uWRUkdoHfDgy4wyBikwGso6CRotxf/9Ywpi9Wdrix J51A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686871303; x=1689463303; 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=FfaunTIpb+/JoaE2P6J1QB9JUjqHG1mwiTPg5NcHdcQ=; b=bCL7UP4Bpk+PzoQTfMLtmsw5Nl2VZKqXz5dmKrdiPq9exxvtfOawe2DgiZXL406P+q z2j696e5p9MyPUhQkBfA5o01Lchaa6f48sHDPvLiXpSSne9p+Cxqyy3I3uQhPSjbkqIg PhgtsHfQvgNy+6Wi7pkMBLYB5LA7VMrk/WX38bVqkWiwn2f8MbnX47chMsOq9cHvFfU0 5MrRWzK5wT87byoOoxIn6IjQJHZ65PsFclEgJKa27heYzpA2Si5glcwbSE0Lai6LOVLN s0m5I+7iQ3hZFjpUIRHyMpQ4UblWBhxyiA4pf/H7BL8L1/yPnzRiMxtnkdLlt2k8eKzZ RzIA== X-Gm-Message-State: AC+VfDzjguKatIl+CeLP5N58359qiL50sKIRAu9WXybdjKJ218T+KsF9 Eyt+NWjLnv9LJ1e4jizl4mm7NA== X-Received: by 2002:a19:6d0b:0:b0:4f7:6388:5ec1 with SMTP id i11-20020a196d0b000000b004f763885ec1mr66782lfc.58.1686871302845; Thu, 15 Jun 2023 16:21:42 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id u25-20020a056512041900b004f24ee39661sm2744852lfk.137.2023.06.15.16.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 16:21:42 -0700 (PDT) From: Konrad Dybcio Date: Fri, 16 Jun 2023 01:20:57 +0200 Subject: [PATCH v9 16/20] drm/msm/a6xx: Fix some A619 tunables MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v9-16-890d8f470c8b@linaro.org> References: <20230223-topic-gmuwrapper-v9-0-890d8f470c8b@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v9-0-890d8f470c8b@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 , Conor Dooley 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=1686871277; l=1593; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=4Gkjo2VDVoi67z3y3hIRakJY3LPFFJYUf+088rGo/nQ=; b=plJVOj6DU3u87R7U6VX8KOxp/8dRK/42FlGKYQ7gNc1INHp6+QX8s1lmrdm+M4+MaPJrbMWvx ML+PsOizE9eB34tgy9ZV8Xxcz1cu5Tc/vi4y24gMwVwfEiFZ1VmlY1i 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 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?1768813496828175851?= X-GMAIL-MSGID: =?utf-8?q?1768813496828175851?= 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 Reviewed-by: Akhil P Oommen 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 47aafc9deaf8..97e261d33312 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1306,6 +1306,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 @@ -1323,7 +1325,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);