diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-08 17:56:09 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-08 23:40:42 +0200 |
commit | d0b54bdc93b4e0aaeed6313b4515aff391aae827 (patch) | |
tree | ba7b460b769c2601674e258d3d58599f6f07b4d9 /drivers/gpu/drm/radeon/cypress_dpm.c | |
parent | drm/radeon/dpm: implement vblank_too_short callback for 7xx (diff) | |
download | linux-d0b54bdc93b4e0aaeed6313b4515aff391aae827.tar.xz linux-d0b54bdc93b4e0aaeed6313b4515aff391aae827.zip |
drm/radeon/dpm: implement vblank_too_short callback for evergreen
Check if we can switch the mclk during the vblank time otherwise
we may get artifacts on the screen when the mclk changes.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/cypress_dpm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/cypress_dpm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c index 9ef840807dd1..9bcdd174780f 100644 --- a/drivers/gpu/drm/radeon/cypress_dpm.c +++ b/drivers/gpu/drm/radeon/cypress_dpm.c @@ -2174,3 +2174,16 @@ void cypress_dpm_fini(struct radeon_device *rdev) kfree(rdev->pm.dpm.ps); kfree(rdev->pm.dpm.priv); } + +bool cypress_dpm_vblank_too_short(struct radeon_device *rdev) +{ + struct rv7xx_power_info *pi = rv770_get_pi(rdev); + u32 vblank_time = r600_dpm_get_vblank_time(rdev); + u32 switch_limit = pi->mem_gddr5 ? 450 : 300; + + if (vblank_time < switch_limit) + return true; + else + return false; + +} |