Commit ef976ec4 authored by Alex Deucher's avatar Alex Deucher

drm/radeon/dpm: update cac leakage table parsing for CI

Uses a different table format if the board supports EVV.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9dd9333b
...@@ -956,10 +956,19 @@ int r600_parse_extended_power_table(struct radeon_device *rdev) ...@@ -956,10 +956,19 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
return -ENOMEM; return -ENOMEM;
} }
for (i = 0; i < cac_table->ucNumEntries; i++) { for (i = 0; i < cac_table->ucNumEntries; i++) {
rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].vddc = if (rdev->pm.dpm.platform_caps & ATOM_PP_PLATFORM_CAP_EVV) {
le16_to_cpu(cac_table->entries[i].usVddc); rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].vddc1 =
rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].leakage = le16_to_cpu(cac_table->entries[i].usVddc1);
le32_to_cpu(cac_table->entries[i].ulLeakageValue); rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].vddc2 =
le16_to_cpu(cac_table->entries[i].usVddc2);
rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].vddc3 =
le16_to_cpu(cac_table->entries[i].usVddc3);
} else {
rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].vddc =
le16_to_cpu(cac_table->entries[i].usVddc);
rdev->pm.dpm.dyn_state.cac_leakage_table.entries[i].leakage =
le32_to_cpu(cac_table->entries[i].ulLeakageValue);
}
} }
rdev->pm.dpm.dyn_state.cac_leakage_table.count = cac_table->ucNumEntries; rdev->pm.dpm.dyn_state.cac_leakage_table.count = cac_table->ucNumEntries;
} }
......
...@@ -1256,14 +1256,21 @@ struct radeon_clock_voltage_dependency_table { ...@@ -1256,14 +1256,21 @@ struct radeon_clock_voltage_dependency_table {
struct radeon_clock_voltage_dependency_entry *entries; struct radeon_clock_voltage_dependency_entry *entries;
}; };
struct radeon_cac_leakage_entry { union radeon_cac_leakage_entry {
u16 vddc; struct {
u32 leakage; u16 vddc;
u32 leakage;
};
struct {
u16 vddc1;
u16 vddc2;
u16 vddc3;
};
}; };
struct radeon_cac_leakage_table { struct radeon_cac_leakage_table {
u32 count; u32 count;
struct radeon_cac_leakage_entry *entries; union radeon_cac_leakage_entry *entries;
}; };
struct radeon_phase_shedding_limits_entry { struct radeon_phase_shedding_limits_entry {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment