aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 7235cd0b0fa9..0de8650c5d6e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -33,6 +33,8 @@
33#include <linux/hwmon.h> 33#include <linux/hwmon.h>
34#include <linux/hwmon-sysfs.h> 34#include <linux/hwmon-sysfs.h>
35#include <linux/nospec.h> 35#include <linux/nospec.h>
36#include "hwmgr.h"
37#define WIDTH_4K 3840
36 38
37static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev); 39static int amdgpu_debugfs_pm_init(struct amdgpu_device *adev);
38 40
@@ -1956,6 +1958,17 @@ void amdgpu_dpm_enable_uvd(struct amdgpu_device *adev, bool enable)
1956 amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_UVD, !enable); 1958 amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_UVD, !enable);
1957 mutex_unlock(&adev->pm.mutex); 1959 mutex_unlock(&adev->pm.mutex);
1958 } 1960 }
1961 /* enable/disable Low Memory PState for UVD (4k videos) */
1962 if (adev->asic_type == CHIP_STONEY &&
1963 adev->uvd.decode_image_width >= WIDTH_4K) {
1964 struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle;
1965
1966 if (hwmgr && hwmgr->hwmgr_func &&
1967 hwmgr->hwmgr_func->update_nbdpm_pstate)
1968 hwmgr->hwmgr_func->update_nbdpm_pstate(hwmgr,
1969 !enable,
1970 true);
1971 }
1959} 1972}
1960 1973
1961void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable) 1974void amdgpu_dpm_enable_vce(struct amdgpu_device *adev, bool enable)