diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-08 11:56:09 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-08 17:40:42 -0400 |
commit | d0b54bdc93b4e0aaeed6313b4515aff391aae827 (patch) | |
tree | ba7b460b769c2601674e258d3d58599f6f07b4d9 /drivers/gpu/drm | |
parent | b06195d9943d561273939e866b4bfc87beba18bc (diff) |
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')
-rw-r--r-- | drivers/gpu/drm/radeon/cypress_dpm.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 1 |
3 files changed, 15 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) | |||
2174 | kfree(rdev->pm.dpm.ps); | 2174 | kfree(rdev->pm.dpm.ps); |
2175 | kfree(rdev->pm.dpm.priv); | 2175 | kfree(rdev->pm.dpm.priv); |
2176 | } | 2176 | } |
2177 | |||
2178 | bool cypress_dpm_vblank_too_short(struct radeon_device *rdev) | ||
2179 | { | ||
2180 | struct rv7xx_power_info *pi = rv770_get_pi(rdev); | ||
2181 | u32 vblank_time = r600_dpm_get_vblank_time(rdev); | ||
2182 | u32 switch_limit = pi->mem_gddr5 ? 450 : 300; | ||
2183 | |||
2184 | if (vblank_time < switch_limit) | ||
2185 | return true; | ||
2186 | else | ||
2187 | return false; | ||
2188 | |||
2189 | } | ||
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index c3b2f9605f6d..e73026393a46 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -1519,6 +1519,7 @@ static struct radeon_asic evergreen_asic = { | |||
1519 | .print_power_state = &rv770_dpm_print_power_state, | 1519 | .print_power_state = &rv770_dpm_print_power_state, |
1520 | .debugfs_print_current_performance_level = &rv770_dpm_debugfs_print_current_performance_level, | 1520 | .debugfs_print_current_performance_level = &rv770_dpm_debugfs_print_current_performance_level, |
1521 | .force_performance_level = &rv770_dpm_force_performance_level, | 1521 | .force_performance_level = &rv770_dpm_force_performance_level, |
1522 | .vblank_too_short = &cypress_dpm_vblank_too_short, | ||
1522 | }, | 1523 | }, |
1523 | .pflip = { | 1524 | .pflip = { |
1524 | .pre_page_flip = &evergreen_pre_page_flip, | 1525 | .pre_page_flip = &evergreen_pre_page_flip, |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index ca219e9fc2b4..0ef8b4967b9c 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -545,6 +545,7 @@ void cypress_dpm_disable(struct radeon_device *rdev); | |||
545 | int cypress_dpm_set_power_state(struct radeon_device *rdev); | 545 | int cypress_dpm_set_power_state(struct radeon_device *rdev); |
546 | void cypress_dpm_display_configuration_changed(struct radeon_device *rdev); | 546 | void cypress_dpm_display_configuration_changed(struct radeon_device *rdev); |
547 | void cypress_dpm_fini(struct radeon_device *rdev); | 547 | void cypress_dpm_fini(struct radeon_device *rdev); |
548 | bool cypress_dpm_vblank_too_short(struct radeon_device *rdev); | ||
548 | int btc_dpm_init(struct radeon_device *rdev); | 549 | int btc_dpm_init(struct radeon_device *rdev); |
549 | void btc_dpm_setup_asic(struct radeon_device *rdev); | 550 | void btc_dpm_setup_asic(struct radeon_device *rdev); |
550 | int btc_dpm_enable(struct radeon_device *rdev); | 551 | int btc_dpm_enable(struct radeon_device *rdev); |