Skip to contentSkip to conversation

drm/amd/pm: disable gfxoff on the specific sku

PATCH In review Kenneth Feng 2 participants 2 messages Feb 26, 2025

Subsystems (3)
lore
Share & tools
lore

Kenneth Feng

author maintainer
#0 lore raw

PATCH 1/1 drm/amd/pm: disable gfxoff on the specific sku

disable gfxoff on the specific sku based on the requirement.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +6 -0
index 8cfb07549f54..bdff59026367 100644
@@ -781,6 +781,12 @@ static int smu_early_init(struct amdgpu_ip_block *ip_block)
 	r = smu_set_funcs(adev);
 	if (r)
 		return r;
+
+	if (amdgpu_ip_version(adev, MP1_HWIP, 0) ==
+		IP_VERSION(13, 0, 10) &&
+		!amdgpu_device_has_display_hardware(adev))
+		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
+
 	return smu_init_microcode(smu);
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 12 lines · Kenneth Feng

disable gfxoff on the specific sku based on the requirement.

---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
index 8cfb07549f54..bdff59026367 100644

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c static int smu_early_init(struct amdgpu_ip_block *ip_block) · line 789

Quoted 9 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +6 -0
@@ -781,6 +781,12 @@ static int smu_early_init(struct amdgpu_ip_block *ip_block)
 	r = smu_set_funcs(adev);
 	if (r)
 		return r;
+
+	if (amdgpu_ip_version(adev, MP1_HWIP, 0) ==
+		IP_VERSION(13, 0, 10) &&
+		!amdgpu_device_has_display_hardware(adev))
+		adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
+

Better to move this to smu_v13_0_0_set_ppt_funcs. That's the only IP specific call at this stage.

Thanks,
Lijo

Quoted 3 lines
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +0 -0
 	return smu_init_microcode(smu);
 }