Am 15.11.2016 um 11:11 schrieb Trigger Huang:
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.")

Signed-off-by: Trigger Huang <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/vi.c | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 9528072..d1c0abc 100755
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -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.

        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

Reply via email to