Hi,
Please drop this patch, it is a duplicate. The same change is already in the
msm tree as
3389406e6a03 ("drm/msm/dpu: Fix GAMMA LUT for sm8750 related DPUs")
applied on 2026-09-30 for v7.4. I based my patch on v7.3-rc7, where the entry
is still missing, and I missed drm-msm-next while checking for existing work.
Sorry for the noise.
On sashiko's two findings:
- The missing gamma LUT size check is real, and pre-existing. The DRM core
passes max_size and expected_elem_size to drm_property_replace_blob_from_id()
but no exact size, so a blob shorter than
DPU_GAMMA_LUT_SIZE * sizeof(struct drm_color_lut) is accepted, and
_dpu_crtc_get_gc_lut() then reads DPU_GAMMA_LUT_SIZE entries. This affects
every DPU platform that exposes the GC block (SDM845, SM8650, SM8750), not
just the catalog entry in this patch. I have just sent a patch that adds
the size check to dpu_crtc_atomic_check().
- The GFP_KERNEL allocation in dpu_crtc_atomic_begin() (through
_dpu_crtc_setup_cp_blocks()) is also pre-existing and independent of this
patch. I did not want to bundle it with the size fix; happy to follow up
with a separate patch if that is wanted.
Thanks,
Xu Qianhui <[email protected]>