mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels
Signed-off-by: Evan Quan <evan.quan@amd.com> Tested-and-Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
7da2e3e09e
commit
1d864b82a2
1 changed files with 4 additions and 0 deletions
|
@ -1807,6 +1807,10 @@ static int vega10_populate_all_memory_levels(struct pp_hwmgr *hwmgr)
|
|||
mem_channels = (cgs_read_register(hwmgr->device, reg) &
|
||||
DF_CS_AON0_DramBaseAddress0__IntLvNumChan_MASK) >>
|
||||
DF_CS_AON0_DramBaseAddress0__IntLvNumChan__SHIFT;
|
||||
PP_ASSERT_WITH_CODE(mem_channels < ARRAY_SIZE(channel_number),
|
||||
"Mem Channel Index Exceeded maximum!",
|
||||
return -1);
|
||||
|
||||
pp_table->NumMemoryChannels = cpu_to_le16(mem_channels);
|
||||
pp_table->MemoryChannelWidth =
|
||||
cpu_to_le16(HBM_MEMORY_CHANNEL_WIDTH *
|
||||
|
|
Loading…
Reference in a new issue