Skip to contentSkip to conversation

drm/amdgpu: Disable DPM in virtualization

PATCH Superseded Trigger Huang 2 participants 2 messages Nov 15, 2016 1 message not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Disable DPM in virtualization

This patch is used for virtualization support. In virtualization, only SMU manager is needed, DPM should be disabled. This is a use case for commit 2f9346b6f984
("drm/amdgpu/powerplay: pp module only enable smu when dpm disabled.")

---
 drivers/gpu/drm/amd/amdgpu/vi.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +5 -0
index 9528072..d1c0abc 100755
@@ -1147,6 +1147,11 @@ static int vi_common_early_init(void *handle)
 	if (adev->asic_funcs->detect_hw_virtualization)
 		amdgpu_asic_detect_hw_virtualization(adev);
 
+	if (amdgpu_sriov_vf(adev)) {
+		/* For virtualization, we need to disable DPM */
+		amdgpu_dpm = 0;
+	}
+
 	if (amdgpu_smc_load_fw && smc_enabled)
 		adev->firmware.smu_load = true;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw
In reply to a message not in the archive

Am 15.11.2016 um 11:11 schrieb Trigger Huang:

Quoted 15 lines

This patch is used for virtualization support. In virtualization, only SMU manager is needed, DPM should be disabled. This is a use case for commit 2f9346b6f984
("drm/amdgpu/powerplay: pp module only enable smu when dpm disabled.")

---
  drivers/gpu/drm/amd/amdgpu/vi.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +0 -0
index 9528072..d1c0abc 100755

drivers/gpu/drm/amd/amdgpu/vi.c static int vi_common_early_init(void *handle) · line 1154

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/vi.c +5 -0
@@ -1147,6 +1147,11 @@ static int vi_common_early_init(void *handle)
  	if (adev->asic_funcs->detect_hw_virtualization)
  		amdgpu_asic_detect_hw_virtualization(adev);
 
+	if (amdgpu_sriov_vf(adev)) {
+		/* For virtualization, we need to disable DPM */
+		amdgpu_dpm = 0;
+	}
+

Don't mess with module parameters here, rather make that a dependency for when amdgpu_dpm is evaluated for VI.

Christian.

drivers/gpu/drm/amd/amdgpu/vi.c static int vi_common_early_init(void *handle) · line 1157

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/vi.c +0 -0
  	if (amdgpu_smc_load_fw && smc_enabled)
  		adev->firmware.smu_load = true;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx