linux-stable/drivers/gpu/drm/vkms
Harry Wentland 2fee84030d drm/vkms: Avoid reading beyond LUT array
When the floor LUT index (drm_fixp2int(lut_index) is the last
index of the array the ceil LUT index will point to an entry
beyond the array. Make sure we guard against it and use the
value of the floor LUT index.

v3:
 - Drop bits from commit description that didn't contribute
   anything of value

Fixes: db1f254f2c ("drm/vkms: Add support to 1D gamma LUT")
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Cc: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231108163647.106853-6-harry.wentland@amd.com
2024-01-02 12:06:53 -01:00
..
Kconfig drm/vkms: Create separate Kconfig file for VKMS 2024-01-02 12:04:54 -01:00
Makefile drm: vkms: Refactor the plane composer to accept new formats 2022-09-05 20:18:35 -01:00
vkms_composer.c drm/vkms: Avoid reading beyond LUT array 2024-01-02 12:06:53 -01:00
vkms_crtc.c Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit" 2023-09-14 07:48:19 -03:00
vkms_drv.c drm/vkms: Add support to 1D gamma LUT 2023-07-27 20:17:14 -03:00
vkms_drv.h Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit" 2023-09-14 07:48:19 -03:00
vkms_formats.c drm/vkms: Isolate writeback pixel conversion functions 2023-06-24 19:06:16 -03:00
vkms_formats.h drm/vkms: Isolate writeback pixel conversion functions 2023-06-24 19:06:16 -03:00
vkms_output.c drm/vkms: Remove <drm/drm_simple_kms_helper.h> include 2023-04-07 13:16:38 +02:00
vkms_plane.c drm/vkms: add rotate-270 property 2023-05-08 09:57:20 -03:00
vkms_writeback.c drm/vkms: move wb's atomic_check from encoder to connector 2023-12-08 10:24:30 +01:00