]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/atomic: add max_size check to drm_property_replace_blob_from_id()
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tue, 6 Jan 2026 03:09:56 +0000 (05:09 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Wed, 14 Jan 2026 00:18:31 +0000 (02:18 +0200)
commitca59e33f5a1f642d13ae0e558fdbdd9aaa9fe203
tree0f0f289658b07bc71049a099ca46a06c81defd43
parent66c9c0cfe765af7f30eac880da0fa047aea8617d
drm/atomic: add max_size check to drm_property_replace_blob_from_id()

The function drm_property_replace_blob_from_id() allows checking whether
the blob size is equal to a predefined value. In case of variable-size
properties (like the gamma / degamma LUTs) we might want to check for
the blob size against the maximum, allowing properties of the size
lesser than the max supported by the hardware. Extend the function in
order to support such checks.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260106-drm-fix-lut-checks-v3-2-f7f979eb73c8@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/drm_property.c
include/drm/drm_property.h