drm/amd/display: add plane shaper LUT support
authorMelissa Wen <mwen@igalia.com>
Thu, 16 Nov 2023 19:58:03 +0000 (18:58 -0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 21:32:35 +0000 (16:32 -0500)
commitaba8b76baabde681ab4ff686452005d80d949345
treec8a2c25816c006b804be27880e7571e17b8b9ba0
parent4bc59ddf57c1f68ea035c4f242108f29d91797fd
drm/amd/display: add plane shaper LUT support

Map DC shaper LUT to DM plane color management. Shaper LUT can be used
to delinearize and/or normalize the color space for computational
efficiency and achiving specific visual styles. If a plane degamma is
apply to linearize the color space, a custom shaper 1D LUT can be used
just before applying 3D LUT.

v2:
- use DPP color caps to verify plane 3D LUT support
- add debug message if shaper LUT programming fails

v4:
- remove helper to check 3D LUT color caps (Harry)
- update desc of lut3d-setup helper from MPC to DPP

v5:
- remove color_mgmt_changed check that prevents color updates (Joshua)

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.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c