drm/amd/display: add plane 3D LUT support
authorMelissa Wen <mwen@igalia.com>
Thu, 16 Nov 2023 19:58:05 +0000 (18:58 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2023 20:25:06 +0000 (15:25 -0500)
commit486c95af5d76047d5cb50727270b1961dacb9380
tree14637e29eef48a977edaecaf3ea9c0f0c722f274
parent65d2765d6291a49d5cdfc0fd88ba5689ed27dbe2
drm/amd/display: add plane 3D LUT support

Wire up DC 3D LUT to DM plane color management (pre-blending). On AMD
display HW, 3D LUT comes after a shaper curve and we always have to
program a shaper curve to delinearize or normalize the color space
before applying a 3D LUT (since we have a reduced number of LUT
entries).

In this version, the default values of 3D LUT for size and bit_depth are
17x17x17 and 12-bit, but we already provide here a more generic
mechanisms to program other supported values (9x9x9 size and 10-bit).

v2:
- started with plane 3D LUT instead of CRTC 3D LUT support

v4:
- lut3d_size is the max dimension size instead of # of entries

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c