Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp652258pxm; Fri, 25 Feb 2022 16:17:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzAp/L/wz5S1CXRQiESUGDxY9IIa6WUIY9vgoW4+hE3AXM8Yf51EXD34Nm3r8CKcY3iKRmD X-Received: by 2002:a63:7a13:0:b0:376:334a:6b48 with SMTP id v19-20020a637a13000000b00376334a6b48mr5640532pgc.399.1645834625252; Fri, 25 Feb 2022 16:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645834625; cv=none; d=google.com; s=arc-20160816; b=SFnkmmZpoJbipq5FR1pa3ObpHDr3ejPQDSY4Ii4l+a0o88wkJhjgoHN1AFSpLuhFH8 TcP6ycI10zTisOwr+WJCXtrZmW4oSpnzNOyGyKsu1P+HOHw1IghGvEJJI4DE+FIpXAAg 9t9qPW9SqUglHEN/oTEznmu7bzT3nx7LXeYK5QNlGyUwzgKkddxtJM5Me953JGw6dFM/ FIpEWKMRmj+P7aykbpd56xI0afebF6++TqgQrQGu83R8q90j5W7DiVNvQXeaFHktiwJ2 CbrlBCRYh/4tudBXK2Wdjyka5zD98ESQ0cKNI+/Te/ijA9FuXMcf0uqRYRq5CVURm+/1 TXpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=7XIgIPMw1xaAU2PGzc80TV+xNkIU5RQN+WvgogiqyWQ=; b=xmYpio4NwL3g9phXBcmjyMzIdEZsE2CWSXXJ7tPjH7WPrLsqs9dspif0aXEMYoA2KP G0A8Kfp2hGiEQqoRGFa3N0CKEjCVtxWJMjoYMNzLgInaaaY47Mv7VGQxEYT/32LuHHa6 INq2nMs90cczXKd0/zsiL3JTvGhZnWUYcB5BWmFv8Q+TROY5/Q7IicY/EHxXOVz18t3A OAB7GBi3BSQw9JakOMVZBa4ckVrZAq+C3sTel/9GiJw3e51Qr6m2oR2vDEs6njMK8GvC p8lGBMq1jHB4upr/p26yXo2Tt7yE1Sm3T+vOwjSdRWk+GaQ/fbWdQAi0kC44CVwZ4vRz iBcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=HTLaNy94; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a056a00195300b004f10b31b838si3201386pfk.219.2022.02.25.16.16.49; Fri, 25 Feb 2022 16:17:05 -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=@mg.codeaurora.org header.s=smtp header.b=HTLaNy94; 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=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbiBYTWk (ORCPT + 99 others); Fri, 25 Feb 2022 14:22:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbiBYTWj (ORCPT ); Fri, 25 Feb 2022 14:22:39 -0500 Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by lindbergh.monkeyblade.net (Postfix) with UTF8SMTPS id 4F8B01AE67F for ; Fri, 25 Feb 2022 11:22:05 -0800 (PST) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1645816925; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=7XIgIPMw1xaAU2PGzc80TV+xNkIU5RQN+WvgogiqyWQ=; b=HTLaNy94GAqPM6tR0yu7R/CDVtAS+DxFTzkDhkSWgrkXPanOn+Y2+QNT+krh/ztmbzNbmVRX f3c8mYYPwPX8Y78yQajBtDeuT7iv/7VIRxuZQOlkUYggEKJlsztMEWCOVNP43ccWuqoKAWUa 82aLldVUEJ7T93wZGUnCHWbDfyI= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 62192c5d18892df15f9a8d45 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 25 Feb 2022 19:22:05 GMT Sender: quic_akhilpo=quicinc.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 14D2DC43638; Fri, 25 Feb 2022 19:22:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Received: from hyd-lnxbld559.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4F9DCC43619; Fri, 25 Feb 2022 19:21:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 4F9DCC43619 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=quicinc.com From: Akhil P Oommen To: freedreno , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , Dmitry Baryshkov , Bjorn Andersson Cc: Abhinav Kumar , Daniel Vetter , David Airlie , Douglas Anderson , Jonathan Marek , Jordan Crouse , Sean Paul , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] drm/msm/a6xx: Add support for 7c3 SKUs Date: Sat, 26 Feb 2022 00:51:30 +0530 Message-Id: <20220226005021.v2.3.I6e89c014eb17f090f716fba662bdd33073920804@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1645816893-22815-1-git-send-email-quic_akhilpo@quicinc.com> References: <1645816893-22815-1-git-send-email-quic_akhilpo@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for 7c3 SKU detection using speedbin fuse. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 17cfad64..f308a3f 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1736,6 +1736,18 @@ static u32 a618_get_speed_bin(u32 fuse) return UINT_MAX; } +static u32 adreno_7c3_get_speed_bin(u32 fuse) +{ + if (fuse == 0) + return 0; + else if (fuse == 117) + return 0; + else if (fuse == 190) + return 1; + + return UINT_MAX; +} + static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) { u32 val = UINT_MAX; @@ -1743,6 +1755,9 @@ static u32 fuse_to_supp_hw(struct device *dev, struct adreno_rev rev, u32 fuse) if (adreno_cmp_rev(ADRENO_REV(6, 1, 8, ANY_ID), rev)) val = a618_get_speed_bin(fuse); + if (adreno_cmp_rev(ADRENO_REV(6, 3, 5, ANY_ID), rev)) + val = adreno_7c3_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", -- 2.7.4