Message ID | 20230223-topic-gmuwrapper-v7-18-ecc7aab83556@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp337591vqo; Sat, 20 May 2023 05:40:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5I7tqwzh7e5S4z5NLEi801NRpgLCDn2ppnOjp0TIGe1CcOx7ONjQtzAVQK/+yDtuWq4UGo X-Received: by 2002:a17:90b:e8f:b0:253:4ae0:4256 with SMTP id fv15-20020a17090b0e8f00b002534ae04256mr5134727pjb.2.1684586424261; Sat, 20 May 2023 05:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684586424; cv=none; d=google.com; s=arc-20160816; b=XVQGkdpiREouyACDlHks+MDk0Y0YxKFxxftc+8Bnf23emhDewvRt9Jkm6GaVfY+6NV pxa6Nqjdhr4VqLw9wJF4zNUsBDF24MPoeMF59rbcmtXJXxHiJ2felpC/gtin7XlDfHqb w8rNhpJ0eU9kC+4/4LhyLxMtT/ON/Bo0KgtwchsLrFc9ccisOgvgnPtzCQC9LMcg/fR4 GnDVYUYVAgADQ2nkSTcRB/nRAJblc8n0mqX2W9Q3NhddJW5bIHa4OsV7PMU1qjfV7e5F AANIrtWPCycF3BKa1pwoCeN+KzyZmjKGY1nAf8zO3dTbsO9UbSu1JhnnyhLE5U55tGVz MFeg== 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=6euEkRodrQgx7ZE9t7r7K+NeHv1LqldRFjOFTB8bWyY=; b=Aq9Avs73E5ckVUdN//yh84a3cfpreSeNpCla/1T0xKbBBneluWWk4DhGlpRDJOYp/v qZjzc50fVkUHey58VoII7+RDpfq1en8uy1IZr7PNjFgAAlt28C423j4EDmYX7rSXV0gb zTewmneJGq9QcqzziAyU9fsSL2sUuGdw7N3l8kH/aft/jsoQUgmtgF7oiq4gqEYbXVlW 3WymeFWB0jcxlK4BLrR6+6PvIVREkbMO8aBeOHFZJpF6GFNd4A1l9xEdbNV3A2Ahmytm ANOv5Rjt7raCuM7D5spwCUJRJOSSsRBwkq4SM2y7AIsomgEQfvifrmDcNIFTgE1ihU79 ju8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BmrH/ZJT"; 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 cq3-20020a17090af98300b002536f332d07si3485751pjb.149.2023.05.20.05.40.10; Sat, 20 May 2023 05:40:24 -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="BmrH/ZJT"; 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 S232053AbjETMVt (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Sat, 20 May 2023 08:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbjETMU7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 20 May 2023 08:20:59 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6B221730 for <linux-kernel@vger.kernel.org>; Sat, 20 May 2023 05:20:20 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f3b4ed6fdeso749584e87.3 for <linux-kernel@vger.kernel.org>; Sat, 20 May 2023 05:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684585216; x=1687177216; 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=6euEkRodrQgx7ZE9t7r7K+NeHv1LqldRFjOFTB8bWyY=; b=BmrH/ZJTnlOU8B8MsGcUTxSs3ldt6wbdkha5Pku8nW8wiesMbU9mNfyY7MrN4V2Gqr RLM9scxRukJ/ONiVl2FsY6eDoLKRgfHlIFHVnW3yGkZxHqsyzkcOxFzg8TIpGA3BT8c9 nXHtqqFpJohjbQNeLqbPPGwTBeK/TU/btYx1zkZFbakqExv6o0z5JGy6ZhPC3MkoQRIr CZsWcSPBsbGhnU8JpbytXaPNh2weDBplzjO1VgucrO8AcidNHtppBnIsBiW2L/gbckAN dcFefXS2aEZ6Kq53K1na7IRRmYLvYbZohlo99vP8mSpdLLltZHx6ugzO+AwL6Mk6CKg+ AN4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684585216; x=1687177216; 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=6euEkRodrQgx7ZE9t7r7K+NeHv1LqldRFjOFTB8bWyY=; b=bro9HX5ZNt0UfE7bXsHh7hhKWqnVo64zK7vul55gcOxq1F1B6Ipkdwd22hL3wEpuao is8V4qwVmio8yyXlrvOsyOR3q9gSJSOsmcQCdEZBL9Tf2mLca0gNm2XsnNIOvmSgP+3U LU1JCy7cn+Vnq8e4hKpilSnUMnrvVPxKYQkYJuHhSQJOTlonl7x9DeBX7jJSkcbZrdJw k4ICj/SzNc1KaPwHyQpHVRpDzgHhvVg1rQ2M0dw0KswZrsDMSH0BNDKxpHlttrtbdmeM Z4uViQms6IX3N1cMuxYegowT2e0BSqaGCm3MYq1CF5W9KYpxVbA02TZCan9QpJD4eXbH EYRw== X-Gm-Message-State: AC+VfDy80M5u4FW7R1KZKi0xAQ0goyfh8IkqqTfRm/d2raIlH4qERxLa 8yvZemNL+8NDX0McsXsRPa4eSw== X-Received: by 2002:ac2:539a:0:b0:4cc:96f8:f9c6 with SMTP id g26-20020ac2539a000000b004cc96f8f9c6mr1835216lfh.5.1684585216004; Sat, 20 May 2023 05:20:16 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 05:20:15 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Sat, 20 May 2023 14:19:58 +0200 Subject: [PATCH v7 18/18] drm/msm/a6xx: Add A610 speedbin support MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230223-topic-gmuwrapper-v7-18-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 <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.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1684585186; l=1852; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=aYEnG9+HCzURuVCpcLpZTVlrArU+CPMAgc+RtQYPTAw=; b=cBGb71GEz6m+55DZbw5+CIlpa9bA2JR7ff/H/b1bxB27zpReX2GOg7AWcYOzBnWEkZtbP6mJc HaVYS9xm5/JBf1ihgp+IOvYeg1spOGFEwJmV78VNSn9B2Aj+MtEE37L 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=ham 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?1766416894240060551?= X-GMAIL-MSGID: =?utf-8?q?1766416894240060551?= |
Series |
GMU-less A6xx support (A610, A619_holi)
|
|
Commit Message
Konrad Dybcio
May 20, 2023, 12:19 p.m. UTC
A610 is implemented on at least three SoCs: SM6115 (bengal), SM6125 (trinket) and SM6225 (khaje). Trinket does not support speed binning (only a single SKU exists) and we don't yet support khaje upstream. Hence, add a fuse mapping table for bengal to allow for per-chip frequency limiting. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index c07b25fc2bd9..d004458ca783 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -2102,6 +2102,30 @@ static bool a6xx_progress(struct msm_gpu *gpu, struct msm_ringbuffer *ring) return progress; } +static u32 a610_get_speed_bin(u32 fuse) +{ + /* + * There are (at least) three SoCs implementing A610: SM6125 (trinket), + * SM6115 (bengal) and SM6225 (khaje). Trinket does not have speedbinning, + * as only a single SKU exists and we don't support khaje upstream yet. + * Hence, this matching table is only valid for bengal and can be easily + * expanded if need be. + */ + + if (fuse == 0) + return 0; + else if (fuse == 206) + return 1; + else if (fuse == 200) + return 2; + else if (fuse == 157) + return 3; + else if (fuse == 127) + return 4; + + return UINT_MAX; +} + static u32 a618_get_speed_bin(u32 fuse) { if (fuse == 0) @@ -2199,6 +2223,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_gpu *adreno_gpu, u3 { u32 val = UINT_MAX; + if (adreno_is_a610(adreno_gpu)) + val = a610_get_speed_bin(fuse); + if (adreno_is_a618(adreno_gpu)) val = a618_get_speed_bin(fuse);