mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
drm/radeon/dpm: enable dynamic vce state switching v2
enable vce states when vce is active. When vce is active, it adjusts the currently selected state (performance, battery, uvd, etc.) v2: add code comments Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
4233290519
commit
03afe6f648
4 changed files with 85 additions and 0 deletions
|
@ -968,6 +968,23 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
void radeon_dpm_enable_vce(struct radeon_device *rdev, bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
mutex_lock(&rdev->pm.mutex);
|
||||
rdev->pm.dpm.vce_active = true;
|
||||
/* XXX select vce level based on ring/task */
|
||||
rdev->pm.dpm.vce_level = RADEON_VCE_LEVEL_AC_ALL;
|
||||
mutex_unlock(&rdev->pm.mutex);
|
||||
} else {
|
||||
mutex_lock(&rdev->pm.mutex);
|
||||
rdev->pm.dpm.vce_active = false;
|
||||
mutex_unlock(&rdev->pm.mutex);
|
||||
}
|
||||
|
||||
radeon_pm_compute_clocks(rdev);
|
||||
}
|
||||
|
||||
static void radeon_pm_suspend_old(struct radeon_device *rdev)
|
||||
{
|
||||
mutex_lock(&rdev->pm.mutex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue