Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rex Zhu and committed by
Alex Deucher
d2e31218 5bbc16cc

+2 -2
+1 -1
drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c
··· 1830 1830 1831 1831 PP_ASSERT_WITH_CODE(false, 1832 1832 "VDDCI is larger than max VDDCI in VDDCI Voltage Table!", 1833 - return vddci_table->entries[i].value); 1833 + return vddci_table->entries[i-1].value); 1834 1834 } 1835 1835 1836 1836 static int fiji_get_dependency_volt_by_clk(struct pp_hwmgr *hwmgr,
+1 -1
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
··· 469 469 470 470 PP_ASSERT_WITH_CODE(false, 471 471 "VDDCI is larger than max VDDCI in VDDCI Voltage Table!", 472 - return vddci_table->entries[i].value); 472 + return vddci_table->entries[i-1].value); 473 473 } 474 474 475 475 int phm_find_boot_level(void *table,