diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-01-16 13:13:42 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-06-27 19:16:17 -0400 |
commit | 98243917d7cd64be923aad76c563de7e23b0b386 (patch) | |
tree | e0da8be8089898d70775041ab530c929d13eb8d5 | |
parent | 84dd1928260fe82344c1d587900bce630c1e6e66 (diff) |
drm/radeon/dpm: add pre/post_set_power_state callbacks (6xx-eg)
For r6xx-evergreen, they are no-ops as they don't support
any dynamic state adjustment.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/radeon/r600_dpm.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 2 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_dpm.c b/drivers/gpu/drm/radeon/r600_dpm.c index c9f9647aece3..bcb1967cd3fb 100644 --- a/drivers/gpu/drm/radeon/r600_dpm.c +++ b/drivers/gpu/drm/radeon/r600_dpm.c | |||
@@ -662,6 +662,16 @@ void r600_stop_dpm(struct radeon_device *rdev) | |||
662 | r600_dynamicpm_enable(rdev, false); | 662 | r600_dynamicpm_enable(rdev, false); |
663 | } | 663 | } |
664 | 664 | ||
665 | int r600_dpm_pre_set_power_state(struct radeon_device *rdev) | ||
666 | { | ||
667 | return 0; | ||
668 | } | ||
669 | |||
670 | void r600_dpm_post_set_power_state(struct radeon_device *rdev) | ||
671 | { | ||
672 | |||
673 | } | ||
674 | |||
665 | bool r600_is_uvd_state(u32 class, u32 class2) | 675 | bool r600_is_uvd_state(u32 class, u32 class2) |
666 | { | 676 | { |
667 | if (class & ATOM_PPLIB_CLASSIFICATION_UVDSTATE) | 677 | if (class & ATOM_PPLIB_CLASSIFICATION_UVDSTATE) |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index a255d0a9fc58..3b8b4954af87 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -1152,7 +1152,9 @@ static struct radeon_asic rv6xx_asic = { | |||
1152 | .setup_asic = &rv6xx_setup_asic, | 1152 | .setup_asic = &rv6xx_setup_asic, |
1153 | .enable = &rv6xx_dpm_enable, | 1153 | .enable = &rv6xx_dpm_enable, |
1154 | .disable = &rv6xx_dpm_disable, | 1154 | .disable = &rv6xx_dpm_disable, |
1155 | .pre_set_power_state = &r600_dpm_pre_set_power_state, | ||
1155 | .set_power_state = &rv6xx_dpm_set_power_state, | 1156 | .set_power_state = &rv6xx_dpm_set_power_state, |
1157 | .post_set_power_state = &r600_dpm_post_set_power_state, | ||
1156 | .display_configuration_changed = &rv6xx_dpm_display_configuration_changed, | 1158 | .display_configuration_changed = &rv6xx_dpm_display_configuration_changed, |
1157 | .fini = &rv6xx_dpm_fini, | 1159 | .fini = &rv6xx_dpm_fini, |
1158 | .get_sclk = &rv6xx_dpm_get_sclk, | 1160 | .get_sclk = &rv6xx_dpm_get_sclk, |
@@ -1259,7 +1261,9 @@ static struct radeon_asic rs780_asic = { | |||
1259 | .setup_asic = &rs780_dpm_setup_asic, | 1261 | .setup_asic = &rs780_dpm_setup_asic, |
1260 | .enable = &rs780_dpm_enable, | 1262 | .enable = &rs780_dpm_enable, |
1261 | .disable = &rs780_dpm_disable, | 1263 | .disable = &rs780_dpm_disable, |
1264 | .pre_set_power_state = &r600_dpm_pre_set_power_state, | ||
1262 | .set_power_state = &rs780_dpm_set_power_state, | 1265 | .set_power_state = &rs780_dpm_set_power_state, |
1266 | .post_set_power_state = &r600_dpm_post_set_power_state, | ||
1263 | .display_configuration_changed = &rs780_dpm_display_configuration_changed, | 1267 | .display_configuration_changed = &rs780_dpm_display_configuration_changed, |
1264 | .fini = &rs780_dpm_fini, | 1268 | .fini = &rs780_dpm_fini, |
1265 | .get_sclk = &rs780_dpm_get_sclk, | 1269 | .get_sclk = &rs780_dpm_get_sclk, |
@@ -1379,7 +1383,9 @@ static struct radeon_asic rv770_asic = { | |||
1379 | .setup_asic = &rv770_dpm_setup_asic, | 1383 | .setup_asic = &rv770_dpm_setup_asic, |
1380 | .enable = &rv770_dpm_enable, | 1384 | .enable = &rv770_dpm_enable, |
1381 | .disable = &rv770_dpm_disable, | 1385 | .disable = &rv770_dpm_disable, |
1386 | .pre_set_power_state = &r600_dpm_pre_set_power_state, | ||
1382 | .set_power_state = &rv770_dpm_set_power_state, | 1387 | .set_power_state = &rv770_dpm_set_power_state, |
1388 | .post_set_power_state = &r600_dpm_post_set_power_state, | ||
1383 | .display_configuration_changed = &rv770_dpm_display_configuration_changed, | 1389 | .display_configuration_changed = &rv770_dpm_display_configuration_changed, |
1384 | .fini = &rv770_dpm_fini, | 1390 | .fini = &rv770_dpm_fini, |
1385 | .get_sclk = &rv770_dpm_get_sclk, | 1391 | .get_sclk = &rv770_dpm_get_sclk, |
@@ -1499,7 +1505,9 @@ static struct radeon_asic evergreen_asic = { | |||
1499 | .setup_asic = &cypress_dpm_setup_asic, | 1505 | .setup_asic = &cypress_dpm_setup_asic, |
1500 | .enable = &cypress_dpm_enable, | 1506 | .enable = &cypress_dpm_enable, |
1501 | .disable = &cypress_dpm_disable, | 1507 | .disable = &cypress_dpm_disable, |
1508 | .pre_set_power_state = &r600_dpm_pre_set_power_state, | ||
1502 | .set_power_state = &cypress_dpm_set_power_state, | 1509 | .set_power_state = &cypress_dpm_set_power_state, |
1510 | .post_set_power_state = &r600_dpm_post_set_power_state, | ||
1503 | .display_configuration_changed = &cypress_dpm_display_configuration_changed, | 1511 | .display_configuration_changed = &cypress_dpm_display_configuration_changed, |
1504 | .fini = &cypress_dpm_fini, | 1512 | .fini = &cypress_dpm_fini, |
1505 | .get_sclk = &rv770_dpm_get_sclk, | 1513 | .get_sclk = &rv770_dpm_get_sclk, |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 654154ca32a1..8b059fedfe4f 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -402,6 +402,8 @@ int r600_mc_wait_for_idle(struct radeon_device *rdev); | |||
402 | u32 r600_get_xclk(struct radeon_device *rdev); | 402 | u32 r600_get_xclk(struct radeon_device *rdev); |
403 | uint64_t r600_get_gpu_clock_counter(struct radeon_device *rdev); | 403 | uint64_t r600_get_gpu_clock_counter(struct radeon_device *rdev); |
404 | int rv6xx_get_temp(struct radeon_device *rdev); | 404 | int rv6xx_get_temp(struct radeon_device *rdev); |
405 | int r600_dpm_pre_set_power_state(struct radeon_device *rdev); | ||
406 | void r600_dpm_post_set_power_state(struct radeon_device *rdev); | ||
405 | /* rv6xx dpm */ | 407 | /* rv6xx dpm */ |
406 | int rv6xx_dpm_init(struct radeon_device *rdev); | 408 | int rv6xx_dpm_init(struct radeon_device *rdev); |
407 | int rv6xx_dpm_enable(struct radeon_device *rdev); | 409 | int rv6xx_dpm_enable(struct radeon_device *rdev); |