From ef63372c881e04a25a202cb947883a2c775fa497 Mon Sep 17 00:00:00 2001 From: "Le.Ma" Date: Sat, 30 Sep 2017 14:25:33 +0800 Subject: [PATCH 1820/4131] drm/amdgpu: Fix for amd_pm_funcs moved to struct amd_powerplay The amd_pm_funcs has been moved from struct amdgpu_pm to struct amd_powerplay as patch below: - d9478ed drm/amdgpu: unify the interface of amd_pm_funcs Change-Id: Ia6eaee14372a2ce830c710b558d8ac14ea93a21c Signed-off-by: Le.Ma Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 0519f04..ebc0cdf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2647,12 +2647,9 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, if ((adev->vm_manager.n_compute_vms++ == 0) && (!amdgpu_sriov_vf(adev))) { /* First Compute VM: enable compute power profile */ - if (adev->pp_enabled) + if (adev->powerplay.pp_funcs->switch_power_profile) amdgpu_dpm_switch_power_profile(adev, AMD_PP_COMPUTE_PROFILE); - else if (adev->pm.funcs->switch_power_profile) - adev->pm.funcs->switch_power_profile(adev, - AMD_PP_COMPUTE_PROFILE); } mutex_unlock(&id_mgr->lock); } @@ -2725,12 +2722,9 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm) if ((--adev->vm_manager.n_compute_vms == 0) && (!amdgpu_sriov_vf(adev))) { /* Last Compute VM: enable graphics power profile */ - if (adev->pp_enabled) + if (adev->powerplay.pp_funcs->switch_power_profile) amdgpu_dpm_switch_power_profile(adev, AMD_PP_GFX_PROFILE); - else if (adev->pm.funcs->switch_power_profile) - adev->pm.funcs->switch_power_profile(adev, - AMD_PP_GFX_PROFILE); } mutex_unlock(&id_mgr->lock); } -- 2.7.4