[RFC 3/9] drm/drm_color_mgmt: add 3D LUT props to DRM color mgmt

2023-06-22 Thread Jacopo Mondi
From: Melissa Wen Add 3D LUT for gammar correction using a 3D lookup table. The position in the color correction pipeline where 3D LUT is applied depends on hw design, being after CTM or gamma. If just after CTM, a shaper lut must be set to shape the content for a non-linear space. That details s

[RFC 0/9] drm: rcar-du: cmm: Enable 3D LUT support

2023-06-22 Thread Jacopo Mondi
test) which are available at: https://git.sr.ht/~jmondi_/kms-test The series validates the usage of the HW interface in the hope of re-starting discussions and interests in the definition of CRTC color management properties. Thanks j Alex Hung (1): drm: Add 3D LUT mode and its attributes Jac

[RFC 9/9] drm: rcar-du: crtc: Enable 3D LUT

2023-06-22 Thread Jacopo Mondi
Enable the 3D LUT in rcar_du_crtc by first creating a property for the supported 3d lut modes and by calling the drm_crtc_enable_lut3d() helper. Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/rcar-du/rcar_cmm.h | 14 ++ drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 23

[RFC 8/9] drm: rcar-du: kms: Configure the CLU

2023-06-22 Thread Jacopo Mondi
From: Kieran Bingham Link the DRM 3D-CLU configuration to the CMM setup configuration. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 23 ++- 1 file

[RFC 2/9] drm/drm_color_mgmt: add shaper LUT to color mgmt properties

2023-06-22 Thread Jacopo Mondi
From: Melissa Wen Shaper LUT is used to shape the content after blending, i.e., de-linearize or normalize space before applying a 3D LUT color correction. In the next patch, we add 3D LUT property to DRM color management after this shaper LUT and before the current gamma LUT. Signed-off-by: Meli

[RFC 1/9] drm: Add 3D LUT mode and its attributes

2023-06-22 Thread Jacopo Mondi
From: Alex Hung A struct is defined for 3D LUT modes to be supported by hardware. The elements includes lut_size, lut_stride, bit_depth, color_format and flags. Note: A patchset "IGT tests for pre-blending 3D LUT interfaces" for this proposal is sent to IGT mailing list. Signed-off-by: Alex Hun

[RFC 5/9] drm/drm_color_mgmt: add function to attach 3D LUT props

2023-06-22 Thread Jacopo Mondi
From: Melissa Wen If the driver supports user 3D LUT then it calls a drm function to attach 3D LUT related properties according to HW caps. Signed-off-by: Melissa Wen --- drivers/gpu/drm/drm_color_mgmt.c | 35 include/drm/drm_color_mgmt.h | 3 +++ 2 files

[RFC 4/9] drm/drm_color_mgmt: add function to create 3D LUT modes supported

2023-06-22 Thread Jacopo Mondi
From: Melissa Wen DRM color function to create modes for lut3d mode property from an array of drm_color_lut3d_mode modes supported by the HW and advertise to userspace. Userspace can get the description of a specific mode in the enum list from its blob data. Signed-off-by: Melissa Wen --- driv

[RFC 7/9] drm: rcar-du: cmm: Provide 3D-CLU support

2023-06-22 Thread Jacopo Mondi
specific color adjustment. Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/rcar-du/rcar_cmm.c | 71 +- drivers/gpu/drm/rcar-du/rcar_cmm.h | 11 +++-- 2 files changed, 76

[RFC 6/9] drm: rcar-du: cmm: Refactor LUT configuration

2023-06-22 Thread Jacopo Mondi
Bingham Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/rcar-du/rcar_cmm.c | 60 -- drivers/gpu/drm/rcar-du/rcar_cmm.h | 19 +--- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 22 +++--- 3 files changed, 55 insertions(+), 46 deletions(-) diff --git a/drivers/gpu