Message ID | 20221213002423.259039-4-konrad.dybcio@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2547645wrr; Mon, 12 Dec 2022 16:27:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5LZVoiUbb56h4FKRZKBWhgxqQ6ZUvJNZ/BAtdKVwr6iqukGvMNOQBbmOvB8pp7rK5xcUfK X-Received: by 2002:a05:6402:1f87:b0:461:2396:fc5a with SMTP id c7-20020a0564021f8700b004612396fc5amr8816202edc.35.1670891221638; Mon, 12 Dec 2022 16:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670891221; cv=none; d=google.com; s=arc-20160816; b=iHnx+2pDoy5I/o0qDDDzKNq1XA4dPu2KHhVH9vXZ7Rd3LpKjI1Uu1w0lQgEuMTsO6I V+QGOwM9q7o2TcZfpbuLnUvsr+rVvnSAw3tEb8UVbd8SehL4NZ3QUs4lIk1cys6hj7Ni gkwm94fa2tN/Fs0F+77NTbrrOMZ+8/HmiY/GoN/LivU1Aye8KLo0e+IUAyTAzeASAcU1 oIVoP/2hKeX7jVD4PSmZNooiPw1+sJBqPX61n/ARmmrteCrZOovlSbVM/5jeMm417ObK gROk1mFOKMXI/jyHL7I9V3abepEt5R35u3ZxXhkxDXlWjku+btMlDpHXot88BmYOBycW X/zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EuRIOsbxJSRJCVkuwOFtkE5bn27vzsbdYBn710S1tsE=; b=QadWK0DTKNsKJrhqTpYPJwnjdhBqq6vVt8+2kwPh4/AMRfs4HmUobHEXrTKj+Tw/sm 2ztkG2Ea+baE8tuG4zMBJc5zfBkP6ia+o+vazaIjs05LJ2EpxWTl/zxwLsWlY2T+ZkAn ASpfXTkI1LPSZ7t5pqoWuPaiB88hX1bXjA14olom19LCTcmQdZ6xlE+AOVodaoXd5FSm 7axfPYRyAbUMM+eAGoRB/XKtaWwmrmZ1gpBcSd8Zmr1z4a2eMXGKJSNLWd57ANVWmeFT 5qqNoGb+yCQtb3g261RQNxqje15emUbeIuXu5c6HlCTpMEMbQUwbsut/wZshRNTAsHfH 0t0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lmwePmqS; 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 z9-20020a056402274900b0046b9715162csi9937861edd.21.2022.12.12.16.26.37; Mon, 12 Dec 2022 16:27:01 -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=lmwePmqS; 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 S233250AbiLMAZH (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Mon, 12 Dec 2022 19:25:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232791AbiLMAYg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 12 Dec 2022 19:24:36 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B66D60F2 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 16:24:34 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id c1so2306371lfi.7 for <linux-kernel@vger.kernel.org>; Mon, 12 Dec 2022 16:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EuRIOsbxJSRJCVkuwOFtkE5bn27vzsbdYBn710S1tsE=; b=lmwePmqSEsF3OnAp9cC6PduAdpMwYQXJYh2fNPY863g5M9oD9ZWSLPEBTqvp3ngl4o 9ySGQONxcxowsk7bT5fAzavUXJFT2Mm+pOmUafAwshUkw50rBcmP2m1ZHzBfyWvUtz0Q sDk7fOuV3OjsEv1vhYNCb3FY7izl6cNJg7dHscP3ev+wJlHMdNFYNc71G4Ld0ybIzEEi 0F9Grk4PBB8kEWXbSDxhmnT4EKJ/XMDY8X+odIVwZaTSvKTInZK6MGwuMXWXvBkbdVyf nALPrAHoNvXCh7amnOwUIcnLg6b5FyAoJ/kvP8QNoNHNogg5RzE1a5yhoyrkJJx0HNvp rTZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EuRIOsbxJSRJCVkuwOFtkE5bn27vzsbdYBn710S1tsE=; b=g1K2UYZrGwLaecAYc/3WOizmsIoiVOdmXBUAWeKi/VOzzZvH4i+FnMVxXpyFDGm5s6 xqRRsmv0LedA9lkiohxW2Dprf6ITmaYWp5legu46Bm70OtE0O4U4VLsJ2fq7N5hEqEI9 1ZZYpvW3citbZWp09goDZTAmwJGC3DR5kRwcpzEMfA0pNP+sodp5LMfXeEn9/a4AYMLS SQIL/9eK+ZC51Xn5tPdacgcXdsn70AmFDbuurrNnBipKUaPQqtsPH8nWcutboM4UY438 su7dzQYnuuQwW9mReAIo/PO3rwIM1kUghvg7TnB2zofNtYXk7/BQYnazqKWeTWdcXPYU 5bBQ== X-Gm-Message-State: ANoB5pl/qM5F9j+PjSnXVV7IGq2ZFVynV5LA4l4kwQnzR05wBcOSqJIW wJhh7qHTqnMknXn/3SJFEvOHKQ== X-Received: by 2002:a05:6512:150c:b0:4b4:b8fc:4ac5 with SMTP id bq12-20020a056512150c00b004b4b8fc4ac5mr5905858lfb.3.1670891072964; Mon, 12 Dec 2022 16:24:32 -0800 (PST) Received: from localhost.localdomain (abxh44.neoplus.adsl.tpnet.pl. [83.9.1.44]) by smtp.gmail.com with ESMTPSA id m23-20020ac24257000000b004978e51b691sm137352lfl.266.2022.12.12.16.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 16:24:32 -0800 (PST) From: Konrad Dybcio <konrad.dybcio@linaro.org> To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio <konrad.dybcio@linaro.org>, 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>, Akhil P Oommen <quic_akhilpo@quicinc.com>, Chia-I Wu <olvaffe@gmail.com>, Douglas Anderson <dianders@chromium.org>, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] drm/msm/a6xx: Add support for A640 speed binning Date: Tue, 13 Dec 2022 01:24:19 +0100 Message-Id: <20221213002423.259039-4-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221213002423.259039-1-konrad.dybcio@linaro.org> References: <20221213002423.259039-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=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?1752056433580851360?= X-GMAIL-MSGID: =?utf-8?q?1752056433580851360?= |
Series |
[1/7] dt-bindings: nvmem: Add compatible for SM8150
|
|
Commit Message
Konrad Dybcio
Dec. 13, 2022, 12:24 a.m. UTC
Add support for matching QFPROM fuse values to get the correct speed bin
on A640 (SM8150) GPUs.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
Comments
On 12/13/2022 5:54 AM, Konrad Dybcio wrote: > Add support for matching QFPROM fuse values to get the correct speed bin > on A640 (SM8150) GPUs. > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > index 36c8fb699b56..2c1630f0c04c 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c > @@ -1877,6 +1877,16 @@ static u32 a619_get_speed_bin(u32 fuse) > return UINT_MAX; > } > > +static u32 a640_get_speed_bin(u32 fuse) > +{ > + if (fuse == 0) > + return 0; > + else if (fuse == 1) > + return 1; > + > + return UINT_MAX; > +} > + > static u32 adreno_7c3_get_speed_bin(u32 fuse) > { > if (fuse == 0) > @@ -1902,6 +1912,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) > if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev)) > val = adreno_7c3_get_speed_bin(fuse); > > + if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev)) > + val = a640_get_speed_bin(fuse); > + > if (val == UINT_MAX) { > DRM_DEV_ERROR(dev, > "missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n", Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> -Akhil.
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 36c8fb699b56..2c1630f0c04c 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1877,6 +1877,16 @@ static u32 a619_get_speed_bin(u32 fuse) return UINT_MAX; } +static u32 a640_get_speed_bin(u32 fuse) +{ + if (fuse == 0) + return 0; + else if (fuse == 1) + return 1; + + return UINT_MAX; +} + static u32 adreno_7c3_get_speed_bin(u32 fuse) { if (fuse == 0) @@ -1902,6 +1912,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev)) val = adreno_7c3_get_speed_bin(fuse); + if (adreno_cmp_rev(ADRENO_REV(6, 4, 0, ANY_ID), rev)) + val = a640_get_speed_bin(fuse); + if (val == UINT_MAX) { DRM_DEV_ERROR(dev, "missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n",