提交 a081a9d6 编写于 作者: R Rafał Miłecki 提交者: Dave Airlie

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: NRafał Miłecki <zajec5@gmail.com>
Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 4d60173f
...@@ -41,9 +41,10 @@ void evergreen_fini(struct radeon_device *rdev); ...@@ -41,9 +41,10 @@ void evergreen_fini(struct radeon_device *rdev);
void evergreen_pm_misc(struct radeon_device *rdev) void evergreen_pm_misc(struct radeon_device *rdev)
{ {
int requested_index = rdev->pm.requested_power_state_index; int req_ps_idx = rdev->pm.requested_power_state_index;
struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; int req_cm_idx = rdev->pm.requested_clock_mode_index;
struct radeon_voltage *voltage = &ps->clock_info[0].voltage; struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx];
struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
if (voltage->voltage != rdev->pm.current_vddc) { if (voltage->voltage != rdev->pm.current_vddc) {
......
...@@ -557,9 +557,10 @@ void r600_pm_init_profile(struct radeon_device *rdev) ...@@ -557,9 +557,10 @@ void r600_pm_init_profile(struct radeon_device *rdev)
void r600_pm_misc(struct radeon_device *rdev) void r600_pm_misc(struct radeon_device *rdev)
{ {
int requested_index = rdev->pm.requested_power_state_index; int req_ps_idx = rdev->pm.requested_power_state_index;
struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; int req_cm_idx = rdev->pm.requested_clock_mode_index;
struct radeon_voltage *voltage = &ps->clock_info[0].voltage; struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx];
struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
if (voltage->voltage != rdev->pm.current_vddc) { if (voltage->voltage != rdev->pm.current_vddc) {
......
...@@ -44,10 +44,10 @@ void rv770_fini(struct radeon_device *rdev); ...@@ -44,10 +44,10 @@ void rv770_fini(struct radeon_device *rdev);
void rv770_pm_misc(struct radeon_device *rdev) void rv770_pm_misc(struct radeon_device *rdev)
{ {
int requested_index = rdev->pm.requested_power_state_index; int req_ps_idx = rdev->pm.requested_power_state_index;
struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; int req_cm_idx = rdev->pm.requested_clock_mode_index;
struct radeon_voltage *voltage = &ps->clock_info[0].voltage; struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx];
struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
if (voltage->voltage != rdev->pm.current_vddc) { if (voltage->voltage != rdev->pm.current_vddc) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册