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.
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -902,6 +902,20 @@ enum drm_colorop_type { · 901 unmodified lines | ||
| 902 | 902 | */ |
| 903 | 903 | DRM_COLOROP_1D_CURVE, |
| 904 | 904 | |
| 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 | + | |
| 905 | 919 | /** |
| 906 | 920 | * @DRM_COLOROP_CTM_3X4: |
| 907 | 921 | * |