]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/pm: Add VCN reset support for SMU v13.0.6
authorJesse.Zhang <Jesse.Zhang@amd.com>
Wed, 13 Aug 2025 02:40:18 +0000 (10:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Aug 2025 17:04:33 +0000 (13:04 -0400)
This commit implements VCN reset capability for SMU v13.0.6 with the following changes:

1. Added new PPSMC message ID (0x5B) for VCN reset in SMU firmware interface
2. Extended SMU capabilities to include VCN_RESET support
3. Implemented VCN reset support check:
   - Added smu_v13_0_6_reset_vcn_is_supported() function
4. Updated SMU v13.0.6 PPT functions to include VCN reset operations

v2: clean up debug info (Alex)
v3: remove unsupported message and split smu v13.0.6 changes to a separate patch (Lijo)
v4: simply the function (smu_v13_0_6_reset_vcn_is_supported) (Lijo)

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ruili Ji <ruiliji2@amd.com>
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.h

index 41f2683136134bf7eed9fa4befed962179a43434..63a088ef7169315b7eb02aec97602142c4eacf90 100644 (file)
@@ -94,9 +94,9 @@
 #define PPSMC_MSG_RmaDueToBadPageThreshold          0x43
 #define PPSMC_MSG_SetThrottlingPolicy               0x44
 #define PPSMC_MSG_ResetSDMA                         0x4D
-#define PPSMC_MSG_ResetVCN                          0x4E
 #define PPSMC_MSG_GetStaticMetricsTable             0x59
-#define PPSMC_Message_Count                         0x5A
+#define PPSMC_MSG_ResetVCN                          0x5B
+#define PPSMC_Message_Count                         0x5C
 
 //PPSMC Reset Types for driver msg argument
 #define PPSMC_RESET_TYPE_DRIVER_MODE_1_RESET        0x1
index 3b4bd7a34d04c8f2c5a3922c3beaa957f0a4da9a..cc59d884025ff8cc468b1fd84d8718867fbc772e 100644 (file)
@@ -436,6 +436,9 @@ static void smu_v13_0_6_init_caps(struct smu_context *smu)
            ((pgm == 0) && (fw_ver >= 0x00557900)) ||
            ((pgm == 4) && (fw_ver >= 0x4557000)))
                smu_v13_0_6_cap_set(smu, SMU_CAP(SDMA_RESET));
+
+       if ((pgm == 4) && (fw_ver >= 0x04557100))
+               smu_v13_0_6_cap_set(smu, SMU_CAP(VCN_RESET));
 }
 
 static void smu_v13_0_x_init_caps(struct smu_context *smu)
@@ -3200,6 +3203,11 @@ static int smu_v13_0_6_reset_sdma(struct smu_context *smu, uint32_t inst_mask)
        return ret;
 }
 
+static bool smu_v13_0_6_reset_vcn_is_supported(struct smu_context *smu)
+{
+       return smu_v13_0_6_cap_supported(smu, SMU_CAP(VCN_RESET));
+}
+
 static int smu_v13_0_6_reset_vcn(struct smu_context *smu, uint32_t inst_mask)
 {
        int ret = 0;
@@ -3888,6 +3896,7 @@ static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {
        .reset_sdma = smu_v13_0_6_reset_sdma,
        .reset_sdma_is_supported = smu_v13_0_6_reset_sdma_is_supported,
        .dpm_reset_vcn = smu_v13_0_6_reset_vcn,
+       .reset_vcn_is_supported = smu_v13_0_6_reset_vcn_is_supported,
 };
 
 void smu_v13_0_6_set_ppt_funcs(struct smu_context *smu)
index f39dbfdd7a2f2ba2c2d9315273851472f9e556ff..bcb8246c080425c239d5afb0bc902c1e1956acb4 100644 (file)
@@ -64,6 +64,7 @@ enum smu_v13_0_6_caps {
        SMU_CAP(RMA_MSG),
        SMU_CAP(ACA_SYND),
        SMU_CAP(SDMA_RESET),
+       SMU_CAP(VCN_RESET),
        SMU_CAP(STATIC_METRICS),
        SMU_CAP(HST_LIMIT_METRICS),
        SMU_CAP(BOARD_VOLTAGE),