mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-29 13:00:35 +00:00
drm/amd/powerplay: fix bug visit array out of bounds
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5bbc16cc7b
commit
d2e312183b
@ -1830,7 +1830,7 @@ static uint16_t fiji_find_closest_vddci(struct pp_hwmgr *hwmgr, uint16_t vddci)
|
||||
|
||||
PP_ASSERT_WITH_CODE(false,
|
||||
"VDDCI is larger than max VDDCI in VDDCI Voltage Table!",
|
||||
return vddci_table->entries[i].value);
|
||||
return vddci_table->entries[i-1].value);
|
||||
}
|
||||
|
||||
static int fiji_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,
|
||||
|
@ -469,7 +469,7 @@ uint16_t phm_find_closest_vddci(struct pp_atomctrl_voltage_table *vddci_table, u
|
||||
|
||||
PP_ASSERT_WITH_CODE(false,
|
||||
"VDDCI is larger than max VDDCI in VDDCI Voltage Table!",
|
||||
return vddci_table->entries[i].value);
|
||||
return vddci_table->entries[i-1].value);
|
||||
}
|
||||
|
||||
int phm_find_boot_level(void *table,
|
||||
|
Loading…
Reference in New Issue
Block a user