Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2893169rdg; Mon, 16 Oct 2023 19:56:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrkY4TarvnRVHdVn7iWts/HXSmoJYrDzWLG/AV6/XQzsCAqnaL4o0rOAvuCXnthHmgC3DA X-Received: by 2002:a17:90a:356:b0:27d:2054:27b1 with SMTP id 22-20020a17090a035600b0027d205427b1mr933391pjf.32.1697511407328; Mon, 16 Oct 2023 19:56:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697511407; cv=pass; d=google.com; s=arc-20160816; b=Nagy3tAQpMnbAWWPdouChcsHw0pjGmVTsU5Bp/w5VF6NYExoiCEQEx1wjDDsW3C94k eiLbpRaVT8H5nb5RRVI+CpfSMclzzSspYJ4nKf12rCkkiFfMjLWErbD8HG5Q5fBRchkW o1SYxWHp066ZT0bwh81mebmfhbY0no0b2si4BOjZKEmYGOMw5BnitP7shqF44EpoLmQl u+ptaoHXPva3Mx1K/aAFHHMznzWjho1vnbOiJVrHRvk8Kzelekvpz+nIre3h03apyOQg qQ2QV/W22yHG6CWV0eYcyRqbIk98NdLX+kmyYxse3ESE/SYx4e1yh5c3wH0ha7sF+j0p RXUA== 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=RfQtPhnWtP2arNM1ANS79IltxsqfCHSXpw+o9darUoc=; fh=7qYVagjf06Iuxk0RfQNsh9zjCiQ1YqeRICw8mLp4/sE=; b=nm41stWxb080OB7lGR7zWlybK7dZU97/LYGLwUCaBKXYSNJbyGl433O7yK4S7CF6ed uD3R4VxHOpAgYCZbZEJuyn1wuaQK+/vekzBruGtMXQFJRZTSVQhbhZokOR6rkmMYKlGl 2CEcsJqP6bJJFkkMKAHKTG5urQzKUNgVfGdTdHNPQ8BLSZXAitMcOuy+2UcvJ15Aoyq8 JPbyz39cddKrpoCjchi/slw02nYCXcXJfuYm/7SjEhLg6yYan2EHEzzj5Ytn2Sz6+GHo BUWADqsdkn2Kbfa/4ZX5WFSOXbBzebYpa6JVvSH6IkuDxbzGpXxVMZ/bPRIFZJdhfvxa SmjQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=fyqonwLS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id my15-20020a17090b4c8f00b00276571c0d34si793698pjb.6.2023.10.16.19.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 19:56:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=fyqonwLS; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 84265809926C; Mon, 16 Oct 2023 19:56:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234448AbjJQC4c (ORCPT + 52 others); Mon, 16 Oct 2023 22:56:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234469AbjJQC43 (ORCPT ); Mon, 16 Oct 2023 22:56:29 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2046.outbound.protection.outlook.com [40.107.92.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 536DED72; Mon, 16 Oct 2023 19:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CLf0iXk2g/2reyEMTtxb+LCFWA3vyFGXKPeiYgDrNo2ireC0uf3KfJqUJY6rcjmaY9LsSh9WvXLhlUMH4zcxiSFWMHpudgQHaIEgqhEOxNW0ULfaOsJnOSX4aumgnfrpkrhGQHKANwgkR1tEve3qiwQoGO+5nwRnWWY3QySF0ccDDn4o2WyW34P5OQSuO6aXRqtScZl1uxOFGDJF+ryPP2abJkjvFLoHgQn1Rbxd/Oe1vSgA4POoVXKg5KbTRFCs6FPDhtgsq3gsHFFwGQHPKa6DpxkymYdRJ2PW6s3vJoz9sxmGs0o8nht1JpLOYG4mOwxkhaPyKspNOq0jaeSDCg== 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=RfQtPhnWtP2arNM1ANS79IltxsqfCHSXpw+o9darUoc=; b=UJFEgPrxCjukqHo1bfUsv0MwdhyiaaOf/FRk5vgJXRn9KXWGL/cElfYvLY0G763b58GxcMePpyYkbyOjErfVTGReQjemyVhfRAtojV4g8CfKYYWDjoShYm7B/VUTSGoW9uTA6WlqB+75N7xlUw5xyG0F/9v6SLfvrvyZu37b9XFLEJ51OsIi6+g21GtV7ov+Fj1+i+ehnwYfO1PeA4w0e5zkEPjQ/XCzqLzKxw73xaZ2/Fl/Z7R40ob/y3gQ5h+cVyCn8R4ImoIMuaRB4f4A6YAMwvbm/GjjyO9bAvkYy8vXhVGJDdK1urUcqVmS8JiV9Gr0tx/0wQKjR9NdMZ4qKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.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=RfQtPhnWtP2arNM1ANS79IltxsqfCHSXpw+o9darUoc=; b=fyqonwLSsuj9wm+U5En4ud1LDvVKQjk0H4wrCNhXFcXxOVwsGzyfLGBoS2299cnsth4A3d1T5lOP6BGFgAaSPKie7dHfOnhml8ZBEnloxNKfW6w8zqcO/KjWWc0zw3NjOmhwgfWxrFMxF/w74Ql413o9jImo53KTn9XmhboZX5k= Received: from MW4PR03CA0309.namprd03.prod.outlook.com (2603:10b6:303:dd::14) by BL3PR12MB6548.namprd12.prod.outlook.com (2603:10b6:208:38f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Tue, 17 Oct 2023 02:55:51 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:303:dd:cafe::62) by MW4PR03CA0309.outlook.office365.com (2603:10b6:303:dd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36 via Frontend Transport; Tue, 17 Oct 2023 02:55:50 +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 MWH0EPF000989EC.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6907.20 via Frontend Transport; Tue, 17 Oct 2023 02:55:50 +0000 Received: from compile-server.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.2507.27; Mon, 16 Oct 2023 21:55:45 -0500 From: Ma Jun To: , , , , , , , , , CC: , , , , , , Evan Quan , Ma Jun Subject: [PATCH v12 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Date: Tue, 17 Oct 2023 10:53:57 +0800 Message-ID: <20231017025358.1773598-9-Jun.Ma2@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017025358.1773598-1-Jun.Ma2@amd.com> References: <20231017025358.1773598-1-Jun.Ma2@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: MWH0EPF000989EC:EE_|BL3PR12MB6548:EE_ X-MS-Office365-Filtering-Correlation-Id: 4cfb139c-b601-4f4b-418d-08dbcebc9224 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kU/7rg15dihG4rE1aEz0KtTSLWVCO5S3n20J8jL4k8h/SALR+SQZVzVNxX3mRPtq7nBkDzcI7F966IlCJPpooMQwO835TkLi8Lut0UJ/OQKK4sKvSr1OQ+P8MwUMnKa79WoqP/PuwtJYgg/47gEYj31L1GfPJSNuSh+zz+DooyDHpwkSHpFjCZGPvsrYe79TvaZqVm67rpY6j3cRCMu4X1n/pi6whxgQnHULRFgpNyDiQvf+O0YdjWWBsbQGUujUgi1ojeE7yrjpQYTTgRgawvsxlu3ThwfILz1iuIFPbpplkrKn94tAMHa4mMnszaOKHOef0p/drJVjtX6aT/MO69+nYLmIdySmDc8B44+3CQO9J3HIWk2gyb2LMZO9+NfKDq0/F6PgNWhq+RDelO0yY0WV9+Cb10EO39mwmbpipt6GorC0CFQ7p0TZ0c+7W/T6xFeyvDx+FP9t6wSsbqjV/mOSAGDZKl/y1cttNPXLBw3L/wOf5mOUHagGLDe9j/XHfFCnb6507gD2wcSY6ct82B3Kplo3Syunx+XOzR6wire1IYAzFNd0/mH9uR3qS55JZbTGx8nigQ+EP0KHatophdPw4/uVp2ujZ/5NCMtWR+fa6YtnP6si9YWUPNMFqspzHY3eGm4NqLXGWPcP9XOzaqXcK9bW4yuh0IBVPAPXOQHAL53TA19sEDW5nuUlMsJqTuBOU88Y+2bhNYQUtyTA+5IsAacAwylB8TKiFmvP8J/1uqmSl8xr2OIkAmR+0AdKJfexb5rClNiqDPfOtLWsj2HdkK5pcy42GGa4jhrdWto= 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:(13230031)(4636009)(136003)(39860400002)(396003)(376002)(346002)(230922051799003)(186009)(451199024)(64100799003)(1800799009)(82310400011)(40470700004)(36840700001)(86362001)(41300700001)(7416002)(5660300002)(8936002)(8676002)(4326008)(36756003)(2906002)(36860700001)(32650700002)(83380400001)(54906003)(336012)(426003)(316002)(6636002)(356005)(921005)(16526019)(26005)(2616005)(81166007)(1076003)(40480700001)(45080400002)(82740400003)(6666004)(40460700003)(70206006)(70586007)(110136005)(7696005)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2023 02:55:50.2361 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4cfb139c-b601-4f4b-418d-08dbcebc9224 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: MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6548 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 19:56:44 -0700 (PDT) From: Evan Quan Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun -- v10->v11: - downgrade the prompt level on message failure(Lijo) --- 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 d396a18fe0f3..6f88c352b53e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h @@ -325,6 +325,7 @@ enum smu_table_id SMU_TABLE_PACE, SMU_TABLE_ECCINFO, SMU_TABLE_COMBO_PPTABLE, + SMU_TABLE_WIFIBAND, SMU_TABLE_COUNT, }; @@ -1501,6 +1502,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 355c156d871a..dd70b56aa71e 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 @@ -299,5 +299,8 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu, uint32_t pcie_gen_cap, uint32_t pcie_width_cap); +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 9b62b45ebb7f..6a5cb582aa92 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 @@ -2472,3 +2472,12 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu, return 0; } + +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 0fb6be11a0cc..08ab19559c7b 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 @@ -154,6 +154,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] = { @@ -237,6 +238,7 @@ static struct cmn2asic_mapping smu_v13_0_0_table_map[SMU_TABLE_COUNT] = { TAB_MAP(I2C_COMMANDS), TAB_MAP(ECCINFO), TAB_MAP(OVERDRIVE), + TAB_MAP(WIFIBAND), }; static struct cmn2asic_mapping smu_v13_0_0_pwr_src_map[SMU_POWER_SOURCE_COUNT] = { @@ -496,6 +498,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) @@ -2607,6 +2612,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]) { + case IP_VERSION(13, 0, 0): + return smu->smc_fw_version >= 0x004e6300; + case IP_VERSION(13, 0, 10): + return smu->smc_fw_version >= 0x00503300; + default: + return false; + } +} + +static int smu_v13_0_0_set_wbrf_exclusion_ranges(struct smu_context *smu, + struct freq_band_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_warn(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, @@ -2686,6 +2743,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) -- 2.34.1