kernel_samsung_a53x/drivers/gpu/drm/amd
Alex Hung f82097e0cd drm/amd/display: Validate hw_points_num before using it
[ Upstream commit 58c3b3341cea4f75dc8c003b89f8a6dd8ec55e50 ]

[WHAT]
hw_points_num is 0 before ogam LUT is programmed; however, function
"dwb3_program_ogam_pwl" assumes hw_points_num is always greater than 0,
i.e. substracting it by 1 as an array index.

[HOW]
Check hw_points_num is not equal to 0 before using it.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:20:44 +01:00
..
acp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amdgpu drm/amdgpu/jpeg2: properly set atomics vmid field 2024-11-23 23:20:43 +01:00
amdkfd drm/amdkfd: Flush the process wq before creating a kfd_process 2024-11-19 12:26:52 +01:00
display drm/amd/display: Validate hw_points_num before using it 2024-11-23 23:20:44 +01:00
include drm/amdgpu/atomfirmware: silence UBSAN warning 2024-11-19 14:19:42 +01:00
pm drm/amdgpu/pm: Fix the null pointer dereference in apply_state_adjust_rules 2024-11-23 23:20:24 +01:00