From patchwork Tue May 30 02:42:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evan Quan X-Patchwork-Id: 100519 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1897075vqr; Mon, 29 May 2023 19:54:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5aidIzQEPDxNIKgpFvrdftQOOs4zzKmX6mCjrx5wrPh1K2WDWYhZMsLTjxZTkK6VeFdMqT X-Received: by 2002:a05:6a21:3993:b0:10b:d22e:d419 with SMTP id ad19-20020a056a21399300b0010bd22ed419mr796470pzc.35.1685415244916; Mon, 29 May 2023 19:54:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685415244; cv=pass; d=google.com; s=arc-20160816; b=nbox5xz6ixE8nvYCNXW8rp8EtcYUJlxX+aII+Ih5sl735jCB0VqQi2Ec2TsZAy6heU uFozpmhvyRTHW5JSESjTX5ebfjxBXZGoyUjW0rY0IMUfwFGDAZBxh2bHlXq6aARKU/dt WuETopGGj6FbJ+NoKZEs2lIty1i/qvTuqKqzXm8cLwzceUbX5GPVWtD+WD2MW868yN8f 02YGqazz7DjHVJPvco6jQAiEkuEUv11Hkm9gANDMRRGBm/CyoFlVDB/oshIRs3AgPNdD n/xSUoBSzE/8EXaWI5hFo9UQNoBtPqzELPCv0ewEKOjNu9LPW6piCY5HbJuKUSS05KxP Ui4Q== 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=x6yf5Wa0WlXsKSGJNNgGxWou9LG68YEysF5avKreUgM=; b=sxl8y7FKYeThgHFIOWOROk7ImT8QJrrWPW9BSzs9pwmm5SxgmRfbKS2vaxg7bcLKzO 9b/avFwLicq9qeLu6Bb//xT0PiIJAwbdjytVCenM9wcaiiYAIrdfhaXOMfU2435xx14O sQio4W4ASxuur1VoG4H9sdy0iOL7JmdKQe8TH67PQ9uhAZoU3ryFlqCdg/N4k227PaUb wWWXST8dYuuFoPM+xMbLbRqwgMRmibdYT8h7TRso82BpxGg53IJ0xECd7BiK9WTCL75i x6kUCZaMIpyA6rytuLtyqJuEZW0bVyhMvtX5z9IpaW9F0l7VyTFVnIG5AFriasvDaLPC PpwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gNGvZx0l; 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 71-20020a63004a000000b0053fb51b3d65si435905pga.504.2023.05.29.19.53.52; Mon, 29 May 2023 19:54:04 -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=gNGvZx0l; 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 S230233AbjE3Co2 (ORCPT + 99 others); Mon, 29 May 2023 22:44:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjE3CoT (ORCPT ); Mon, 29 May 2023 22:44:19 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2071.outbound.protection.outlook.com [40.107.237.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E309100; Mon, 29 May 2023 19:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J/A7fhD6UWNvgh0wyepohp6RF2oQGFe1vw0J4vla2zY/ykAl7bX7EVmU7CgT92MA4p7VXVcwR3cBCFo2zEFDD+c9zHM4uOggcEtKCo2/ZQ++WHTu3Nk2N4Vo1J7RobX4i8H/15omy2FPDx5+6nHfpGcH0RThnrvoxuzLxz/0uEFjTtLet1/CRIHoOfcw1eNaCglsXczMu5BJEGbh+V9QzFW7DMRnmEdpeuqTL3SJK+WM/v10qnA4DqP8dX85bZpmzSSFm/KbC6OW/+ZxZsLSOAT4fYoKEMIJ74KvOXl2+SlkQEPo31WCDwnGOLS0PhemoELyh+ZhBp1d3PSQDk8gtg== 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=x6yf5Wa0WlXsKSGJNNgGxWou9LG68YEysF5avKreUgM=; b=mwsHHBevXAcoErbmzkCBTWkfEdRwoVjMH12DNpSx7fIh1d9d1+4MG8/YBp2TEhWUQMAfdqK6OqNYVhsdJ8+MRr4Y7Qs+JTK5RyQxt1Ps2oajGDgZezvEwMJydS47qD20Oxef+rY19+j+7Th4XB/6DtbENWOsQ5yNKG1hZUbl6iu4YkVvLmd43tTTyqXJnxRBknH6uoHrHHh8ZmPZrlC90HAfwvN3W9RKHjLrBTuCB9Pi7pfzHE5upQSIVLvNdVzPHykfqqgaxchvFsGSoAVuU2aOMknLdYxaYgx89JwCfsGym9PFS6zWujXJnhq52cjImAv8BELOhfIpodTlRqD5aw== 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=x6yf5Wa0WlXsKSGJNNgGxWou9LG68YEysF5avKreUgM=; b=gNGvZx0l7x3zCTJyygZ2TpGC7RHerHGtYaZ8RlYqtDQS82P3pTxndRVfGIcazUUF+n8U9TF2roUVHAlWO6bi9TKqUbY7TKtiAKIwEXllQRYN8ETmwiZq/4iwzg5pr7de8BMBx8IWavPntdO9jKZnLW15RB5b7/Qj6vfYUlIU684= Received: from BN1PR14CA0023.namprd14.prod.outlook.com (2603:10b6:408:e3::28) by DS7PR12MB5768.namprd12.prod.outlook.com (2603:10b6:8:77::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.17; Tue, 30 May 2023 02:43:48 +0000 Received: from BN8NAM11FT075.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e3:cafe::9f) by BN1PR14CA0023.outlook.office365.com (2603:10b6:408:e3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23 via Frontend Transport; Tue, 30 May 2023 02:43:48 +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 BN8NAM11FT075.mail.protection.outlook.com (10.13.176.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6455.21 via Frontend Transport; Tue, 30 May 2023 02:43:47 +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; Mon, 29 May 2023 21:43:35 -0500 From: Evan Quan To: , , , , , , , , , , , , , , , , , CC: , , , , , , Subject: [PATCH 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Date: Tue, 30 May 2023 10:42:23 +0800 Message-ID: <20230530024227.2139632-6-evan.quan@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230530024227.2139632-1-evan.quan@amd.com> References: <20230530024227.2139632-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: BN8NAM11FT075:EE_|DS7PR12MB5768:EE_ X-MS-Office365-Filtering-Correlation-Id: 4482cd13-91e2-43ce-8f99-08db60b7b1b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6giuCOW/d0FOVgnLNcq7To0n6USSPtqzL5yjQNm7D2NYoMzWlklQBYLLoEMIxPybQjMUqGmTSv8gifGuSpGjKxoZj7lsovS15sGpq2O/bFFQ4RV5+UHxE3t71AO7F+dhHtmGOfgB8FRd7hfCKO7wJfgEGWA0VSRJfSYv94u32SsB6YQNH4YVIiNREN3mOxSPL+3MuWDjbxdgUbNTY6wKtgZlOV9oli9o/yBkaa2yykkuH0nIov4UCR/9eEZlKfhg2di0mW3LmhwmLKyuTpTLXhboSxzQ0JONrGOdNLGWKCRc2s0R/7hO2Dn6+ySXun5BPB2P91JXR5RLLs/+JdCaR1eb8JfQw6w99ov8CaXc1nW8h3m0cL+wTn1aQOopcrwHZC4Mkm32Xbzh/HfwpeD0r/9VOOoFCh4lanqhOJ0rsjPTrEIwqcX/hI4lXJUsLbBsFAXhdoF+bY313eTGWJLS2sNNK+3lRiHzAM5xYAM04LM8hWDirkpm6vyEeDcgFgfRRo7CJqW8GSu9iZbSvVVnjkuFyKgZAmvGSjnRPDrMc/r823M38D/vcRK8+rSHPOwlX+WgmpN2dHTNUX+8c0EQdibVJybGd0+KcmKZjoWllH6tmx7r7EMwphqmE8jzmAI7HC0vbNRzlGTBofXwwml9E6FJzY0w4Lz9wxnZnybS4szIwgLm+dtr5sPgmrPvvxVdEvJBjdr5GbwLB3VlsEjb6xApRB0XZkdq7cSLRjvSiC+GhYeMLaRCWUYpMVcFNMVCOjhr/rtLYcurHFA2Jc18egmdVIiXr926Wm4RljBmXyk= 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)(396003)(346002)(376002)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(316002)(36860700001)(40460700003)(336012)(5660300002)(1076003)(356005)(82740400003)(8676002)(921005)(26005)(8936002)(426003)(83380400001)(15650500001)(186003)(2616005)(2906002)(81166007)(16526019)(47076005)(7416002)(44832011)(40480700001)(4326008)(6666004)(6636002)(7696005)(41300700001)(36756003)(86362001)(70206006)(82310400005)(70586007)(110136005)(54906003)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2023 02:43:47.9310 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4482cd13-91e2-43ce-8f99-08db60b7b1b7 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: BN8NAM11FT075.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5768 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?1767285976061007064?= X-GMAIL-MSGID: =?utf-8?q?1767285976061007064?= Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan --- v1->v2: - update smu_v13_0_7_ppsmc.h to fit latest messages definitions --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +++++++++++++- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 14 +++++++++++++- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h | 3 ++- .../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h | 3 ++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h index b686fb68a6e7..d64188fb5839 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h @@ -388,6 +388,17 @@ typedef struct { EccInfo_t EccInfo[24]; } EccInfoTable_t; +typedef struct { + uint16_t LowFreq; + uint16_t HighFreq; +} WifiOneBand_t; + +typedef struct { + uint32_t WifiBandEntryNum; + WifiOneBand_t WifiBandEntry[11]; + uint32_t MmHubPadding[8]; +} WifiBandEntryTable_t; + //D3HOT sequences typedef enum { BACO_SEQUENCE, @@ -1592,7 +1603,8 @@ typedef struct { #define TABLE_I2C_COMMANDS 9 #define TABLE_DRIVER_INFO 10 #define TABLE_ECCINFO 11 -#define TABLE_COUNT 12 +#define TABLE_WIFIBAND 12 +#define TABLE_COUNT 13 //IH Interupt ID #define IH_INTERRUPT_ID_TO_DRIVER 0xFE diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h index 4c46a0392451..77483e8485e7 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h @@ -392,6 +392,17 @@ typedef struct { EccInfo_t EccInfo[24]; } EccInfoTable_t; +typedef struct { + uint16_t LowFreq; + uint16_t HighFreq; +} WifiOneBand_t; + +typedef struct { + uint32_t WifiBandEntryNum; + WifiOneBand_t WifiBandEntry[11]; + uint32_t MmHubPadding[8]; +} WifiBandEntryTable_t; + //D3HOT sequences typedef enum { BACO_SEQUENCE, @@ -1624,7 +1635,8 @@ typedef struct { #define TABLE_I2C_COMMANDS 9 #define TABLE_DRIVER_INFO 10 #define TABLE_ECCINFO 11 -#define TABLE_COUNT 12 +#define TABLE_WIFIBAND 12 +#define TABLE_COUNT 13 //IH Interupt ID #define IH_INTERRUPT_ID_TO_DRIVER 0xFE diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h index 10cff75b44d5..c98cc32d11bd 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h @@ -138,7 +138,8 @@ #define PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel 0x4A #define PPSMC_MSG_SetPriorityDeltaGain 0x4B #define PPSMC_MSG_AllowIHHostInterrupt 0x4C -#define PPSMC_Message_Count 0x4D +#define PPSMC_MSG_EnableUCLKShadow 0x51 +#define PPSMC_Message_Count 0x52 //Debug Dump Message #define DEBUGSMC_MSG_TestMessage 0x1 diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h index 6aaefca9b595..a6bf9cdd130e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_7_ppsmc.h @@ -134,6 +134,7 @@ #define PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel 0x4A #define PPSMC_MSG_SetPriorityDeltaGain 0x4B #define PPSMC_MSG_AllowIHHostInterrupt 0x4C -#define PPSMC_Message_Count 0x4D +#define PPSMC_MSG_EnableUCLKShadow 0x51 +#define PPSMC_Message_Count 0x52 #endif