History

drm/colorop: Add 1D Curve Custom LUT type

We've previously introduced DRM_COLOROP_1D_CURVE for pre-defined 1D curves. But we also have HW that supports custom curves and userspace needs the ability to pass custom curves, aka LUTs. This patch introduces a new colorop type, called DRM_COLOROP_1D_LUT that provides a SIZE property which is used by a driver to advertise the supported SIZE of the LUT, as well as a DATA property which userspace uses to set the LUT. DATA and size function in the same way as current drm_crtc GAMMA and DEGAMMA LUTs.

Alex Hung committed 12 months ago

Commit 99a4e4f1 parent 94529775 files · +82 −0Browse files

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

Unified · Split

include/uapi/drm/drm_mode.h+14−0
@@ -902,6 +902,20 @@ enum drm_colorop_type { · 901 unmodified lines
902902 */
903903 DRM_COLOROP_1D_CURVE,
904904
905+ /**
906+ * @DRM_COLOROP_1D_LUT:
907+ *
908+ * enum string "1D LUT"
909+ *
910+ * A simple 1D LUT of uniformly spaced &drm_color_lut32 entries,
911+ * packed into a blob via the DATA property. The driver's
912+ * expected LUT size is advertised via the SIZE property.
913+ *
914+ * The DATA blob is an array of struct drm_color_lut32 with size
915+ * of "size".
916+ */
917+ DRM_COLOROP_1D_LUT,
918+
905919 /**
906920 * @DRM_COLOROP_CTM_3X4:
907921 *