summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/amd_powerplay.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 4a4f97b37dcb..51a36077b993 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -911,7 +911,8 @@ static int amd_pp_instance_init(struct amd_pp_init *pp_init,
amd_pp->pp_handle = handle;
- if (amdgpu_dpm == 0)
+ if ((amdgpu_dpm == 0)
+ || cgs_is_virtualization_enabled(pp_init->device))
return 0;
ret = hwmgr_init(pp_init, handle);
@@ -940,7 +941,8 @@ static int amd_pp_instance_fini(void *handle)
if (instance == NULL)
return -EINVAL;
- if (amdgpu_dpm != 0) {
+ if ((amdgpu_dpm != 0)
+ && !cgs_is_virtualization_enabled(instance->smu_mgr->device)) {
eventmgr_fini(instance->eventmgr);
hwmgr_fini(instance->hwmgr);
}
@@ -1004,7 +1006,8 @@ int amd_powerplay_reset(void *handle)
hw_init_power_state_table(instance->hwmgr);
- if (amdgpu_dpm == 0)
+ if ((amdgpu_dpm == 0)
+ || cgs_is_virtualization_enabled(instance->smu_mgr->device))
return 0;
if (eventmgr == NULL || eventmgr->pp_eventmgr_init == NULL)
OpenPOWER on IntegriCloud