Skip to content

Commit 4c709cc

Browse files
Jie1zhangalexdeucher
authored andcommitted
drm/amd/pm: Add VCN reset message support for SMU v13.0.12
This commit adds support for VCN reset functionality in SMU v13.0.12 by: 1. Adding two new PPSMC messages in smu_v13_0_12_ppsmc.h: - PPSMC_MSG_ResetVCN (0x5E) - Updates PPSMC_Message_Count to 0x5F to account for new messages 2. Adding message mapping for ResetVCN in smu_v13_0_12_ppt.c: - Maps SMU_MSG_ResetVCN to PPSMC_MSG_ResetVCN These changes enable proper VCN reset handling through the SMU firmware interface for compatible AMD GPUs. v2: Added fw version check to support vcn queue reset. Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 5886090 commit 4c709cc

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_12_ppsmc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
#define PPSMC_MSG_GetBadPageSeverity 0x5B
121121
#define PPSMC_MSG_GetSystemMetricsTable 0x5C
122122
#define PPSMC_MSG_GetSystemMetricsVersion 0x5D
123-
#define PPSMC_Message_Count 0x5E
123+
#define PPSMC_MSG_ResetVCN 0x5E
124+
#define PPSMC_Message_Count 0x5F
124125

125126
//PPSMC Reset Types for driver msg argument
126127
#define PPSMC_RESET_TYPE_DRIVER_MODE_1_RESET 0x1

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ const struct cmn2asic_msg_mapping smu_v13_0_12_message_map[SMU_MSG_MAX_COUNT] =
136136
MSG_MAP(RmaDueToBadPageThreshold, PPSMC_MSG_RmaDueToBadPageThreshold, 0),
137137
MSG_MAP(SetThrottlingPolicy, PPSMC_MSG_SetThrottlingPolicy, 0),
138138
MSG_MAP(ResetSDMA, PPSMC_MSG_ResetSDMA, 0),
139+
MSG_MAP(ResetVCN, PPSMC_MSG_ResetVCN, 0),
139140
MSG_MAP(GetStaticMetricsTable, PPSMC_MSG_GetStaticMetricsTable, 1),
140141
MSG_MAP(GetSystemMetricsTable, PPSMC_MSG_GetSystemMetricsTable, 1),
141142
};

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ static void smu_v13_0_12_init_caps(struct smu_context *smu)
353353
smu_v13_0_6_cap_set(smu, SMU_CAP(PLDM_VERSION));
354354
}
355355

356+
if (fw_ver > 0x04560900)
357+
smu_v13_0_6_cap_set(smu, SMU_CAP(VCN_RESET));
358+
356359
if (fw_ver >= 0x04560700) {
357360
if (fw_ver >= 0x04560900) {
358361
smu_v13_0_6_cap_set(smu, SMU_CAP(TEMP_METRICS));

0 commit comments

Comments
 (0)