History

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.

Alex Hung committed 12 months ago

Commit db971851 parent 24689635 files · +143 −0Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/drm/drm_mode.h+34−0
@@ -942,6 +942,40 @@ enum drm_colorop_type { · 941 unmodified lines
942 * property.942 * property.
943 */943 */
944 DRM_COLOROP_MULTIPLIER,944 DRM_COLOROP_MULTIPLIER,
945
946 /**
947 * @DRM_COLOROP_3D_LUT:
948 *
949 * enum string "3D LUT"
950 *
951 * A 3D LUT of &drm_color_lut32 entries,
952 * packed into a blob via the DATA property. The driver's expected
953 * LUT size is advertised via the SIZE property, i.e., a 3D LUT with
954 * 17x17x17 entries will have SIZE set to 17.
955 *
956 * The DATA blob is a 3D array of struct drm_color_lut32 with dimension
957 * length of "size".
958 * The LUT elements are traversed like so:
959 *
960 * for B in range 0..n
961 * for G in range 0..n
962 * for R in range 0..n
963 * index = R + n * (G + n * B)
964 * color = lut3d[index]
965 */
966 DRM_COLOROP_3D_LUT,
967};
968
969/**
970 * enum drm_colorop_lut3d_interpolation_type - type of 3DLUT interpolation
971 */
972enum drm_colorop_lut3d_interpolation_type {
973 /**
974 * @DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL:
975 *
976 * Tetrahedral 3DLUT interpolation
977 */
978 DRM_COLOROP_LUT3D_INTERPOLATION_TETRAHEDRAL,
945};979};
946 980
947/**981/**