Files
linux/drivers/gpu/drm/vkms/vkms_luts.h
Harry Wentland c1e578bd08 drm/vkms: Add enumerated 1D curve colorop
This patch introduces a VKMS color pipeline that includes two
drm_colorops for named transfer functions. For now the only ones
supported are sRGB EOTF, sRGB Inverse EOTF, and a Linear TF.
We will expand this in the future but I don't want to do so
without accompanying IGT tests.

We introduce a new vkms_luts.c file that hard-codes sRGB EOTF,
sRGB Inverse EOTF, and a linear EOTF LUT. These have been
generated with 256 entries each as IGT is currently testing
only 8 bpc surfaces. We will likely need higher precision
but I'm reluctant to make that change without clear indication
that we need it. We'll revisit and, if necessary, regenerate
the LUTs when we have IGT tests for higher precision buffers.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Link: https://patch.msgid.link/20251115000237.3561250-16-alex.hung@amd.com
2025-11-26 23:03:33 +01:00

13 lines
280 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
#ifndef _VKMS_LUTS_H_
#define _VKMS_LUTS_H_
#define LUT_SIZE 256
extern const struct vkms_color_lut linear_eotf;
extern const struct vkms_color_lut srgb_eotf;
extern const struct vkms_color_lut srgb_inv_eotf;
#endif /* _VKMS_LUTS_H_ */