|
@@ -1063,7 +1063,15 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
|
|
|
(mode_info->atom_context->bios + data_offset +
|
|
|
le16_to_cpu(ext_hdr->usVCETableOffset) + 1 +
|
|
|
1 + array->ucNumEntries * sizeof(VCEClockInfo));
|
|
|
+ ATOM_PPLIB_VCE_State_Table *states =
|
|
|
+ (ATOM_PPLIB_VCE_State_Table *)
|
|
|
+ (mode_info->atom_context->bios + data_offset +
|
|
|
+ le16_to_cpu(ext_hdr->usVCETableOffset) + 1 +
|
|
|
+ 1 + (array->ucNumEntries * sizeof (VCEClockInfo)) +
|
|
|
+ 1 + (limits->numEntries * sizeof(ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record)));
|
|
|
ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record *entry;
|
|
|
+ ATOM_PPLIB_VCE_State_Record *state_entry;
|
|
|
+ VCEClockInfo *vce_clk;
|
|
|
u32 size = limits->numEntries *
|
|
|
sizeof(struct radeon_vce_clock_voltage_dependency_entry);
|
|
|
rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table.entries =
|
|
@@ -1075,8 +1083,9 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
|
|
|
rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table.count =
|
|
|
limits->numEntries;
|
|
|
entry = &limits->entries[0];
|
|
|
+ state_entry = &states->entries[0];
|
|
|
for (i = 0; i < limits->numEntries; i++) {
|
|
|
- VCEClockInfo *vce_clk = (VCEClockInfo *)
|
|
|
+ vce_clk = (VCEClockInfo *)
|
|
|
((u8 *)&array->entries[0] +
|
|
|
(entry->ucVCEClockInfoIndex * sizeof(VCEClockInfo)));
|
|
|
rdev->pm.dpm.dyn_state.vce_clock_voltage_dependency_table.entries[i].evclk =
|
|
@@ -1088,6 +1097,23 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
|
|
|
entry = (ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record *)
|
|
|
((u8 *)entry + sizeof(ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record));
|
|
|
}
|
|
|
+ for (i = 0; i < states->numEntries; i++) {
|
|
|
+ if (i >= RADEON_MAX_VCE_LEVELS)
|
|
|
+ break;
|
|
|
+ vce_clk = (VCEClockInfo *)
|
|
|
+ ((u8 *)&array->entries[0] +
|
|
|
+ (state_entry->ucVCEClockInfoIndex * sizeof(VCEClockInfo)));
|
|
|
+ rdev->pm.dpm.vce_states[i].evclk =
|
|
|
+ le16_to_cpu(vce_clk->usEVClkLow) | (vce_clk->ucEVClkHigh << 16);
|
|
|
+ rdev->pm.dpm.vce_states[i].ecclk =
|
|
|
+ le16_to_cpu(vce_clk->usECClkLow) | (vce_clk->ucECClkHigh << 16);
|
|
|
+ rdev->pm.dpm.vce_states[i].clk_idx =
|
|
|
+ state_entry->ucClockInfoIndex & 0x3f;
|
|
|
+ rdev->pm.dpm.vce_states[i].pstate =
|
|
|
+ (state_entry->ucClockInfoIndex & 0xc0) >> 6;
|
|
|
+ state_entry = (ATOM_PPLIB_VCE_State_Record *)
|
|
|
+ ((u8 *)state_entry + sizeof(ATOM_PPLIB_VCE_State_Record));
|
|
|
+ }
|
|
|
}
|
|
|
if ((le16_to_cpu(ext_hdr->usSize) >= SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V3) &&
|
|
|
ext_hdr->usUVDTableOffset) {
|