diff options
| author | Alex Hung <[email protected]> | 2024-04-25 17:45:37 -0600 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-05-02 16:18:18 -0400 |
| commit | 9d25ac51f5bc952a4454bad9c0d0ca09c3827003 (patch) | |
| tree | 7b9527561437384f4857fa8697e40c2d62143926 /tools/perf/scripts/python | |
| parent | 83c0c8361347cf43937348e8ca0a487679c003ae (diff) | |
drm/amd/display: Avoid overflow dc_clk_table->entries by limit to MAX_NUM_DPM_LVL
[Why]
dc_clk_table->entries has size of MAX_NUM_DPM_LVL(=8), but the loop
counter i can go up to DML_MAX_CLK_TABLE_SIZE(=20) - 1.
[How]
The loop should be min(DML_MAX_CLK_TABLE_SIZE, MAX_NUM_DPM_LVL) - 1
instead.
This fixes 21 OVERRUN issues reported by Coverity.
Reviewed-by: Harry Wentland <[email protected]>
Acked-by: Tom Chung <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions