From patchwork Fri Jun 9 07:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Quan X-Patchwork-Id: 105311 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp773034vqr; Fri, 9 Jun 2023 00:35:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5YGnsg6+mrdnPYkWZOuD/KglQObCyslKEOKLzKjZO4iSWiqoA8m41qQaFaTaJ+KTj7R99S X-Received: by 2002:a17:902:b702:b0:1b0:26f0:4c8e with SMTP id d2-20020a170902b70200b001b026f04c8emr313226pls.69.1686296142536; Fri, 09 Jun 2023 00:35:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686296142; cv=pass; d=google.com; s=arc-20160816; b=Ol1sL75XVfOIA6AJ4rPQin12kakYNkMlKSiyXDPWerE6L0LiN6FPptwhZ+BTUlSMam i3VPAOwbxhzI4bRDyg3LTRHVk+F+yRbS9G/Jq64h3RhYlZ+Bbz/OUPZg/r9E1859GYCF dRNVrwsVPu82A8huz6PnKF9d8vLv6WeJeUZ6QX/vYevu8NDbzb2T/P76+47hQuZo8fu2 O6h7NSq0gl7ofJfNadXAU6gZZjtL3j9/+ezBQyRphR0z7f7p2qGqGmMtnoHOwVLwTbJ7 tG3PjKRKrHqhiCRFbCIyUyhQG7h09+qrwJrd60oyH47kT+zQO8RQ9vbFbBLGGhAf4M2Q w4Zw== ARC-Message-Signature: i=2; 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=3TpqsnmXQ/as7v7o5Su1sHZlEz2ArTZf4xL5W0EvPxE=; b=GTUTnt7KAF6zWtWNL4P0eYNUj9wxfn7vkYTJeyzAJjNwqnVIE3og3wwJwtCS5msku8 POHrsRW3nXpIFhp3NQGZpl9ksut4iSGFToMKOpPM3V8BTdZG+Ws8MHIFbrMb8LwRc9m7 Hg1ryGupjrIWnOJpUcGs3tgi3YUJYYc5kPyTEP41wtI4cHeTZOFLJXtc0xEM5Mdk77DG iMHyYZSaIqf/gm4TXNFASvzyexH/13dYSSEA0PGGP6j2QVomgL/w/QGHlHLakWvPINyD 4/E9U17u8LLD/tXYmkXjqQEx4j3pVKXbgZfUL8Gm6b1loJUbNroXgyJfEyiEQFg9N8Ab VO0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ce4gjlts; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a170903120d00b001aaf1734d1dsi2298300plh.241.2023.06.09.00.35.29; Fri, 09 Jun 2023 00:35:42 -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=@amd.com header.s=selector1 header.b=ce4gjlts; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238874AbjFIHa5 (ORCPT + 99 others); Fri, 9 Jun 2023 03:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238866AbjFIHaC (ORCPT ); Fri, 9 Jun 2023 03:30:02 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA48A2D7B; Fri, 9 Jun 2023 00:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HjfWEUWqqToXd5wLTQJqoc6f4EG6BzxxnFQDgBv56U1e1MuFWd7cBg1LddTGah7kjAq9xhSVepgxxixdgxI5KjnwKiq+voPY9i8KacuyxiCDSUYBSAdqxfU2d/tLmoJgxCWZW9Eva9iLhL8/oUmHGgchoCtPusEOZLIwJN1dvRYuuN2czzYguIgDMkAnaeVpD0G3VKtKPv0RWkUnHgnWU4QywoCMvAmD3E0KcpBjRMnViUzLF/Y7yA2zViFkiiTUnBYabaC4nnkToVgh5AGtj/MGsAKduZ8TAjim1TNVOBtYLn6QFsUrSgBGxGe+zHY9TaokhStS0xYRk1kDkZfEyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3TpqsnmXQ/as7v7o5Su1sHZlEz2ArTZf4xL5W0EvPxE=; b=I7x4v/W53RIpTjKLbmkzdLA61XWR+spsKwhgNMi0+k3frxwhdEP8v3VkqWBx0+cDHv7kZyL/bVR7/HiVYTrswLl6MggPB2ovBzeuLNrQp6YIdCJBiQTDrr3VZchrm7Uk0SNPyCsJ4xYEmCLkx9Yt6Nfsi+DrieTywrfSo7BjPjucV755Q3v1onNcEgD77U1/FWUIsEmH2fK7fsmlEcjT8Pq5WM9vKl3DJbulCrRrhfrecV1hW8mwUraBZJ8oWvw3lWIPlZXrIGgjxRw+MKOZWf04/UU8/DxYCFM2ooW/Yg4P8sMkJcYRvAXMI6Q3g8S2/cJnxPruMmIzLbzWnUlguw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3TpqsnmXQ/as7v7o5Su1sHZlEz2ArTZf4xL5W0EvPxE=; b=ce4gjltsLssu/ua9E18JnTHKW+7Nm+/815mxBMR85bqCj/mF5TQ1Snd1PhBm/clDiDiZn/WTFH4X1Aw3ix70j42f2SnSlgHLgrgXWsQwH/b7QBc59S+Du3N9AeR604W3Qmo7ZlSQu+pN2USaVZQ2SHaoezj3xZ4n1ra5zSwrQnk= Received: from DS7PR03CA0262.namprd03.prod.outlook.com (2603:10b6:5:3b3::27) by PH7PR12MB8054.namprd12.prod.outlook.com (2603:10b6:510:27f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Fri, 9 Jun 2023 07:29:58 +0000 Received: from DM6NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b3:cafe::e7) by DS7PR03CA0262.outlook.office365.com (2603:10b6:5:3b3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.25 via Frontend Transport; Fri, 9 Jun 2023 07:29:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT048.mail.protection.outlook.com (10.13.173.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6477.27 via Frontend Transport; Fri, 9 Jun 2023 07:29:58 +0000 Received: from equan-buildpc.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 9 Jun 2023 02:29:52 -0500 From: Evan Quan To: , , , , , , , , , , , , , , , , CC: , , , , , Evan Quan Subject: [PATCH V2 6/7] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Date: Fri, 9 Jun 2023 15:28:45 +0800 Message-ID: <20230609072846.1552238-7-evan.quan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609072846.1552238-1-evan.quan@amd.com> References: <20230609072846.1552238-1-evan.quan@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT048:EE_|PH7PR12MB8054:EE_ X-MS-Office365-Filtering-Correlation-Id: c3d03a05-e96e-490f-175d-08db68bb542a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TSE55qVMaoYWcumQ/Lgi0i6NiqNbwq2iiqS1VeUTmgIrR9NdTBkcam4wL211Y9GhSPBsZIRWScqJpdqXHUqh2Kc0w1eLR2tcglUYROXsRhlbvNuygxUi6daaDWxeyXNYGn8InGWVq+2a240K6zQCtDXdYtuebniH4dATileX+w4SM+eNsPghTsPw6v2JKq7x5UP2ATLpuPpvf8pqwAeJdh4s3dkZcAKhKuJ2KtaxQB6ROsZiOpJoQRpTG/ZYz4yuv1Hc6I4z6IxDyG9hwBhWnTzHbFvDbIwlXjiQCUy+tykTh2KCwYD0yZWTEGmkgIgPhjxirZBEHPM7ZxoRiNShQepIVECGAE9NpE3dwnZxU9GPsjbDaybFhNkEvJ+Bm//uLyUd0x44BJjuQ/xbp1WWu4kZs0Maq3JePbL1WxSxqXn3HT/nXXTspCTg7z7GGBM3VUXNuHf7LmV9FQnzTFu3o5j7g8QbWLWNnAlgikU1yiKE9XhG+tWgH/X6HiNAL1AabIJ1sp1EhnX5FNcRs3yd4Ln6+F34a1VOwAzon8gymPeRjgEA9YaYD3Ew0pr91dVxaWNLskJcRgoqR091HrHUMb0TCcMdPZaMLoYEFQ/Jk6SeWnKsgWjGpBajWAngrf0Fwiv731OzYjbS/ZO+slGMqdoRAush4Ych8WFjL1HDoGy/btlUeoITMd601coCPwFsJ2kv556yd6ZrfSmal2fF+nkqghs7ppREPspugAAthBYoUIiaySPm+WsXdYO/nuo5Hw2t3pjTQKzow0TCVtc8QBa8QVTnoKXJ9xj55BP8+VY= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(39860400002)(346002)(396003)(451199021)(40470700004)(46966006)(36840700001)(186003)(1076003)(26005)(16526019)(2616005)(82740400003)(426003)(336012)(83380400001)(47076005)(7416002)(6666004)(36756003)(7696005)(54906003)(44832011)(2906002)(82310400005)(36860700001)(8676002)(110136005)(40480700001)(478600001)(8936002)(6636002)(41300700001)(316002)(40460700003)(5660300002)(4326008)(86362001)(81166007)(356005)(921005)(70586007)(70206006)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2023 07:29:58.2649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3d03a05-e96e-490f-175d-08db68bb542a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8054 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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?1768209664056419969?= X-GMAIL-MSGID: =?utf-8?q?1768209664056419969?= Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 + .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 9 +++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 60 +++++++++++++++++++ 5 files changed, 77 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h index aa63cc43d41c..a8a4be32cc59 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h @@ -323,6 +323,7 @@ enum smu_table_id SMU_TABLE_PACE, SMU_TABLE_ECCINFO, SMU_TABLE_COMBO_PPTABLE, + SMU_TABLE_WIFIBAND, SMU_TABLE_COUNT, }; @@ -1496,6 +1497,8 @@ enum smu_baco_seq { __dst_size); \ }) +#define HZ_IN_MHZ 1000000U + #if !defined(SWSMU_CODE_LAYER_L2) && !defined(SWSMU_CODE_LAYER_L3) && !defined(SWSMU_CODE_LAYER_L4) int smu_get_power_limit(void *handle, uint32_t *limit, diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h index 297b70b9388f..5bbb60289a79 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h @@ -245,7 +245,8 @@ __SMU_DUMMY_MAP(AllowGpo), \ __SMU_DUMMY_MAP(Mode2Reset), \ __SMU_DUMMY_MAP(RequestI2cTransaction), \ - __SMU_DUMMY_MAP(GetMetricsTable), + __SMU_DUMMY_MAP(GetMetricsTable), \ + __SMU_DUMMY_MAP(EnableUCLKShadow), #undef __SMU_DUMMY_MAP #define __SMU_DUMMY_MAP(type) SMU_MSG_##type diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h index df3baaab0037..b6fae9b92303 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h @@ -303,5 +303,8 @@ int smu_v13_0_get_pptable_from_firmware(struct smu_context *smu, uint32_t *size, uint32_t pptable_id); +int smu_v13_0_enable_uclk_shadow(struct smu_context *smu, + bool enablement); + #endif #endif diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c index 393c6a7b9609..8c2230d1d862 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c @@ -2453,3 +2453,12 @@ int smu_v13_0_mode1_reset(struct smu_context *smu) return ret; } + +int smu_v13_0_enable_uclk_shadow(struct smu_context *smu, + bool enablement) +{ + return smu_cmn_send_smc_msg_with_param(smu, + SMU_MSG_EnableUCLKShadow, + enablement, + NULL); +} diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c index 09405ef1e3c8..46000039e511 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c @@ -155,6 +155,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] = MSG_MAP(AllowGpo, PPSMC_MSG_SetGpoAllow, 0), MSG_MAP(AllowIHHostInterrupt, PPSMC_MSG_AllowIHHostInterrupt, 0), MSG_MAP(ReenableAcDcInterrupt, PPSMC_MSG_ReenableAcDcInterrupt, 0), + MSG_MAP(EnableUCLKShadow, PPSMC_MSG_EnableUCLKShadow, 0), }; static struct cmn2asic_mapping smu_v13_0_0_clk_map[SMU_CLK_COUNT] = { @@ -235,6 +236,7 @@ static struct cmn2asic_mapping smu_v13_0_0_table_map[SMU_TABLE_COUNT] = { TAB_MAP(DRIVER_SMU_CONFIG), TAB_MAP(ACTIVITY_MONITOR_COEFF), [SMU_TABLE_COMBO_PPTABLE] = {1, TABLE_COMBO_PPTABLE}, + TAB_MAP(WIFIBAND), TAB_MAP(I2C_COMMANDS), TAB_MAP(ECCINFO), }; @@ -472,6 +474,9 @@ static int smu_v13_0_0_tables_init(struct smu_context *smu) PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); SMU_TABLE_INIT(tables, SMU_TABLE_ECCINFO, sizeof(EccInfoTable_t), PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); + SMU_TABLE_INIT(tables, SMU_TABLE_WIFIBAND, + sizeof(WifiBandEntryTable_t), PAGE_SIZE, + AMDGPU_GEM_DOMAIN_VRAM); smu_table->metrics_table = kzalloc(sizeof(SmuMetricsExternal_t), GFP_KERNEL); if (!smu_table->metrics_table) @@ -2112,6 +2117,58 @@ static ssize_t smu_v13_0_0_get_ecc_info(struct smu_context *smu, return ret; } +static bool smu_v13_0_0_wbrf_support_check(struct smu_context *smu) +{ + struct amdgpu_device *adev = smu->adev; + + switch (adev->ip_versions[MP1_HWIP][0]) { + /* PMFWs supporting WBRF feature are not yet available */ + case IP_VERSION(13, 0, 0): + case IP_VERSION(13, 0, 10): + return false; + default: + return false; + } +} + +static int smu_v13_0_0_set_wbrf_exclusion_ranges(struct smu_context *smu, + struct exclusion_range *exclusion_ranges) +{ + WifiBandEntryTable_t wifi_bands; + int valid_entries = 0; + int ret, i; + + memset(&wifi_bands, 0, sizeof(wifi_bands)); + for (i = 0; i < ARRAY_SIZE(wifi_bands.WifiBandEntry); i++) { + if (!exclusion_ranges[i].start && + !exclusion_ranges[i].end) + break; + + /* PMFW expects the inputs to be in Mhz unit */ + wifi_bands.WifiBandEntry[valid_entries].LowFreq = + DIV_ROUND_DOWN_ULL(exclusion_ranges[i].start, HZ_IN_MHZ); + wifi_bands.WifiBandEntry[valid_entries++].HighFreq = + DIV_ROUND_UP_ULL(exclusion_ranges[i].end, HZ_IN_MHZ); + } + wifi_bands.WifiBandEntryNum = valid_entries; + + /* + * Per confirm with PMFW team, WifiBandEntryNum = 0 + * is a valid setting. So, there should be no direct + * return on that. + */ + + ret = smu_cmn_update_table(smu, + SMU_TABLE_WIFIBAND, + 0, + (void *)(&wifi_bands), + true); + if (ret) + dev_err(smu->adev->dev, "Failed to set wifiband!"); + + return ret; +} + static const struct pptable_funcs smu_v13_0_0_ppt_funcs = { .get_allowed_feature_mask = smu_v13_0_0_get_allowed_feature_mask, .set_default_dpm_table = smu_v13_0_0_set_default_dpm_table, @@ -2188,6 +2245,9 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = { .send_hbm_bad_channel_flag = smu_v13_0_0_send_bad_mem_channel_flag, .gpo_control = smu_v13_0_gpo_control, .get_ecc_info = smu_v13_0_0_get_ecc_info, + .is_asic_wbrf_supported = smu_v13_0_0_wbrf_support_check, + .enable_uclk_shadow = smu_v13_0_enable_uclk_shadow, + .set_wbrf_exclusion_ranges = smu_v13_0_0_set_wbrf_exclusion_ranges, }; void smu_v13_0_0_set_ppt_funcs(struct smu_context *smu)