diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-06-07 18:20:25 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-07 19:36:03 -0400 |
commit | a081a9d6f566160bc4c08a85b74d817e983595ab (patch) | |
tree | 4fcdc39f12c15338592c25e412c9797cda431f86 /drivers | |
parent | 4d60173fc1b12b0c308f861620fe8e2a84f6e5da (diff) |
drm/radeon/kms/r600+: use voltage from requested clock mode (v3)
This fixes FDO bug #28375, it's kind of regression, so quite important to have
it for .35.
V2: Fix on RV770+ as well. All other chipsets have only one clock mode per
state.
V3: I'm out of luck today. Grepped for voltage in r*.c and missed evergreen.
agd5f: rebased
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index b86d6ac9c5ba..b2b7c11e447f 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -41,9 +41,10 @@ void evergreen_fini(struct radeon_device *rdev); | |||
41 | 41 | ||
42 | void evergreen_pm_misc(struct radeon_device *rdev) | 42 | void evergreen_pm_misc(struct radeon_device *rdev) |
43 | { | 43 | { |
44 | int requested_index = rdev->pm.requested_power_state_index; | 44 | int req_ps_idx = rdev->pm.requested_power_state_index; |
45 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 45 | int req_cm_idx = rdev->pm.requested_clock_mode_index; |
46 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 46 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; |
47 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | ||
47 | 48 | ||
48 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 49 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
49 | if (voltage->voltage != rdev->pm.current_vddc) { | 50 | if (voltage->voltage != rdev->pm.current_vddc) { |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index acec26b70d0d..7b5539100114 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -557,9 +557,10 @@ void r600_pm_init_profile(struct radeon_device *rdev) | |||
557 | 557 | ||
558 | void r600_pm_misc(struct radeon_device *rdev) | 558 | void r600_pm_misc(struct radeon_device *rdev) |
559 | { | 559 | { |
560 | int requested_index = rdev->pm.requested_power_state_index; | 560 | int req_ps_idx = rdev->pm.requested_power_state_index; |
561 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 561 | int req_cm_idx = rdev->pm.requested_clock_mode_index; |
562 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 562 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; |
563 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | ||
563 | 564 | ||
564 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 565 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
565 | if (voltage->voltage != rdev->pm.current_vddc) { | 566 | if (voltage->voltage != rdev->pm.current_vddc) { |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 7bde6eecf8c2..e8fb8b66e002 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -44,10 +44,10 @@ void rv770_fini(struct radeon_device *rdev); | |||
44 | 44 | ||
45 | void rv770_pm_misc(struct radeon_device *rdev) | 45 | void rv770_pm_misc(struct radeon_device *rdev) |
46 | { | 46 | { |
47 | int requested_index = rdev->pm.requested_power_state_index; | 47 | int req_ps_idx = rdev->pm.requested_power_state_index; |
48 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 48 | int req_cm_idx = rdev->pm.requested_clock_mode_index; |
49 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 49 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; |
50 | 50 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | |
51 | 51 | ||
52 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { | 52 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
53 | if (voltage->voltage != rdev->pm.current_vddc) { | 53 | if (voltage->voltage != rdev->pm.current_vddc) { |