mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-15 19:08:05 -05:00
drm/colorop: Add 3D LUT support to color pipeline
It is to be used to enable HDR by allowing userpace to create and pass 3D LUTs to kernel and hardware. new drm_colorop_type: DRM_COLOROP_3D_LUT. Reviewed-by: Simon Ser <contact@emersion.fr> Signed-off-by: Alex Hung <alex.hung@amd.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Melissa Wen <mwen@igalia.com> Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com> Signed-off-by: Simon Ser <contact@emersion.fr> Link: https://patch.msgid.link/20251115000237.3561250-46-alex.hung@amd.com
This commit is contained in:
@@ -942,6 +942,40 @@ enum drm_colorop_type {
|
||||
* property.
|
||||
*/
|
||||
DRM_COLOROP_MULTIPLIER,
|
||||
|
||||
/**
|
||||
* @DRM_COLOROP_3D_LUT:
|
||||
*
|
||||
* enum string "3D LUT"
|
||||
*
|
||||
* A 3D LUT of &drm_color_lut32 entries,
|
||||
* packed into a blob via the DATA property. The driver's expected
|
||||
* LUT size is advertised via the SIZE property, i.e., a 3D LUT with
|
||||
* 17x17x17 entries will have SIZE set to 17.
|
||||
*
|
||||
* The DATA blob is a 3D array of struct drm_color_lut32 with dimension
|
||||
* length of "size".
|
||||
* The LUT elements are traversed like so:
|
||||
*
|
||||
* for B in range 0..n
|
||||
* for G in range 0..n
|
||||
* for R in range 0..n
|
||||
* index = R + n * (G + n * B)
|
||||
* color = lut3d[index]
|
||||
*/
|
||||
DRM_COLOROP_3D_LUT,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum drm_colorop_lut3d_interpolation_type - type of 3DLUT interpolation
|
||||
*/
|
||||
enum drm_colorop_lut3d_interpolation_type {
|
||||
/**
|
||||
* @DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL:
|
||||
*
|
||||
* Tetrahedral 3DLUT interpolation
|
||||
*/
|
||||
DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user