Skip to contentSkip to conversation

drm/amdgpu: add smu 14.0.1 support

PATCH In review Alex Deucher 3 participants 5 messages Mar 5, 2024 – Mar 6, 2024

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/3 drm/amdgpu: add smu 14.0.1 support

From: Yifan Zhang <[email protected]>

This patch to add smu 14.0.1 support.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c      | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 5 +++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
index eedb9a4f7e2d6..246b211b1e85f 100644
@@ -712,6 +712,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
 		smu_v13_0_7_set_ppt_funcs(smu);
 		break;
 	case IP_VERSION(14, 0, 0):
+	case IP_VERSION(14, 0, 1):
 		smu_v14_0_0_set_ppt_funcs(smu);
 		break;
 	default:
@@ -1895,6 +1896,7 @@ static int smu_disable_dpms(struct smu_context *smu)
 		case IP_VERSION(13, 0, 4):
 		case IP_VERSION(13, 0, 11):
 		case IP_VERSION(14, 0, 0):
+		case IP_VERSION(14, 0, 1):
 			return 0;
 		default:
 			break;
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +5 -0
index 7ac9bc0df8fd7..a65c618c2f98e 100644
@@ -231,6 +231,10 @@ int smu_v14_0_check_fw_version(struct smu_context *smu)
 	case IP_VERSION(14, 0, 0):
 		smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
 		break;
+	case IP_VERSION(14, 0, 1):
+		smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
+		break;
+
 	default:
 		dev_err(adev->dev, "smu unsupported IP version: 0x%x.\n",
 			amdgpu_ip_version(adev, MP1_HWIP, 0));
@@ -734,6 +738,7 @@ int smu_v14_0_gfx_off_control(struct smu_context *smu, bool enable)
 	switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
 	case IP_VERSION(14, 0, 2):
 	case IP_VERSION(14, 0, 0):
+	case IP_VERSION(14, 0, 1):
 		if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
 			return 0;
 		if (enable)
Signature · 1 line
2.44.0
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu/soc21: add mode2 asic reset for SMU IP v14.0.1

From: lima1002 <[email protected]>

Set the default reset method to mode2 for SMU IP v14.0.1

---
 drivers/gpu/drm/amd/amdgpu/soc21.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/soc21.c +1 -0
index b92fd6760fa9c..581a3bd11481c 100644
@@ -388,6 +388,7 @@ soc21_asic_reset_method(struct amdgpu_device *adev)
 	case IP_VERSION(13, 0, 4):
 	case IP_VERSION(13, 0, 11):
 	case IP_VERSION(14, 0, 0):
+	case IP_VERSION(14, 0, 1):
 		return AMD_RESET_METHOD_MODE2;
 	default:
 		if (amdgpu_dpm_is_baco_supported(adev))
Signature · 1 line
2.44.0
author maintainer
#2 lore raw

PATCH 3/3 drm/amd/pm: wait for completion of the EnableGfxImu message

In reply to Alex Deucher

From: Tim Huang <[email protected]>

Wait for completion of sending the EnableGfxImu message when using the PSP FW loading for SMU ip v14.0.

---
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +9 -2
index a65c618c2f98e..b06a3cc433054 100644
@@ -53,6 +53,8 @@
 
 MODULE_FIRMWARE("amdgpu/smu_14_0_2.bin");
 
+#define ENABLE_IMU_ARG_GFXOFF_ENABLE		1
+
 int smu_v14_0_init_microcode(struct smu_context *smu)
 {
 	struct amdgpu_device *adev = smu->adev;
@@ -1633,11 +1635,16 @@ int smu_v14_0_baco_exit(struct smu_context *smu)
 int smu_v14_0_set_gfx_power_up_by_imu(struct smu_context *smu)
 {
 	uint16_t index;
+	struct amdgpu_device *adev = smu->adev;
+
+	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
+		return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_EnableGfxImu,
+						       ENABLE_IMU_ARG_GFXOFF_ENABLE, NULL);
+	}
 
 	index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
 					       SMU_MSG_EnableGfxImu);
-	/* Param 1 to tell PMFW to enable GFXOFF feature */
-	return smu_cmn_send_msg_without_waiting(smu, index, 1);
+	return smu_cmn_send_msg_without_waiting(smu, index, ENABLE_IMU_ARG_GFXOFF_ENABLE);
 }
 
 int smu_v14_0_set_default_dpm_tables(struct smu_context *smu)
Signature · 1 line
2.44.0
#3 lore raw
In reply to Alex Deucher

[AMD Official Use Only - General]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, March 5, 2024 11:25 PM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu: add smu 14.0.1 support

From: Yifan Zhang <[email protected]>

This patch to add smu 14.0.1 support.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c      | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 5 +++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
index eedb9a4f7e2d6..246b211b1e85f 100644
@@ -712,6 +712,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
                smu_v13_0_7_set_ppt_funcs(smu);
                break;
        case IP_VERSION(14, 0, 0):
+       case IP_VERSION(14, 0, 1):
                smu_v14_0_0_set_ppt_funcs(smu);
                break;
        default:
@@ -1895,6 +1896,7 @@ static int smu_disable_dpms(struct smu_context *smu)
                case IP_VERSION(13, 0, 4):
                case IP_VERSION(13, 0, 11):
                case IP_VERSION(14, 0, 0):
+               case IP_VERSION(14, 0, 1):
                        return 0;
                default:
                        break;
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +3 -0
index 7ac9bc0df8fd7..a65c618c2f98e 100644
@@ -231,6 +231,10 @@ int smu_v14_0_check_fw_version(struct smu_context *smu)
        case IP_VERSION(14, 0, 0):
                smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
                break;
+       case IP_VERSION(14, 0, 1):
+               smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
+               break;

[kevin]:

There is a typo or share the same version with 14.0.0 ?

Best Regards,
Kevin
+

        default:
                dev_err(adev->dev, "smu unsupported IP version: 0x%x.\n",
                        amdgpu_ip_version(adev, MP1_HWIP, 0)); @@ -734,6 +738,7 @@ int smu_v14_0_gfx_off_control(struct smu_context *smu, bool enable)
        switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
        case IP_VERSION(14, 0, 2):
        case IP_VERSION(14, 0, 0):
+       case IP_VERSION(14, 0, 1):
                if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
                        return 0;
                if (enable)

--
2.44.0

#4 lore raw

[AMD Official Use Only - General]

I think it is intentional re-use of smu 14.0.0 interface and will be updated later.

Best Regards,
Yifan

-----Original Message-----
From: Wang, Yang(Kevin) <[email protected]>
Sent: Wednesday, March 6, 2024 11:09 AM
To: Deucher, Alexander <[email protected]>; [email protected]
Cc: Zhang, Yifan <[email protected]>; Deucher, Alexander <[email protected]>
Subject: RE: [PATCH 1/3] drm/amdgpu: add smu 14.0.1 support

[AMD Official Use Only - General]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, March 5, 2024 11:25 PM
To: [email protected]
Cc: Zhang, Yifan <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu: add smu 14.0.1 support

From: Yifan Zhang <[email protected]>

This patch to add smu 14.0.1 support.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c      | 2 ++
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 5 +++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
index eedb9a4f7e2d6..246b211b1e85f 100644
@@ -712,6 +712,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
                smu_v13_0_7_set_ppt_funcs(smu);
                break;
        case IP_VERSION(14, 0, 0):
+       case IP_VERSION(14, 0, 1):
                smu_v14_0_0_set_ppt_funcs(smu);
                break;
        default:
@@ -1895,6 +1896,7 @@ static int smu_disable_dpms(struct smu_context *smu)
                case IP_VERSION(13, 0, 4):
                case IP_VERSION(13, 0, 11):
                case IP_VERSION(14, 0, 0):
+               case IP_VERSION(14, 0, 1):
                        return 0;
                default:
                        break;
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c +3 -0
index 7ac9bc0df8fd7..a65c618c2f98e 100644
@@ -231,6 +231,10 @@ int smu_v14_0_check_fw_version(struct smu_context *smu)
        case IP_VERSION(14, 0, 0):
                smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
                break;
+       case IP_VERSION(14, 0, 1):
+               smu->smc_driver_if_version = SMU14_DRIVER_IF_VERSION_SMU_V14_0_0;
+               break;

[kevin]:

There is a typo or share the same version with 14.0.0 ?

Best Regards,
Kevin
+

        default:
                dev_err(adev->dev, "smu unsupported IP version: 0x%x.\n",
                        amdgpu_ip_version(adev, MP1_HWIP, 0)); @@ -734,6 +738,7 @@ int smu_v14_0_gfx_off_control(struct smu_context *smu, bool enable)
        switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
        case IP_VERSION(14, 0, 2):
        case IP_VERSION(14, 0, 0):
+       case IP_VERSION(14, 0, 1):
                if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
                        return 0;
                if (enable)

--
2.44.0