[PATCH 07/11] drm/colorop: Introduce HLG EOTF
Pekka Paalanen
pekka.paalanen at collabora.com
Fri Feb 6 00:51:02 PST 2026
On Tue, 23 Dec 2025 16:44:48 -0300
Nícolas F. R. A. Prado <nfraprado at collabora.com> wrote:
> Introduce definition of a hybrid log-gamma electro-optical transfer
> function for 1D Curve colorops.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
> ---
> drivers/gpu/drm/drm_colorop.c | 1 +
> include/drm/drm_colorop.h | 10 ++++++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c
> index fafe45b93ff8..a19e03fb9c7c 100644
> --- a/drivers/gpu/drm/drm_colorop.c
> +++ b/drivers/gpu/drm/drm_colorop.c
> @@ -79,6 +79,7 @@ static const char * const colorop_curve_1d_type_names[] = {
> [DRM_COLOROP_1D_CURVE_BT2020_OETF] = "BT.2020 OETF",
> [DRM_COLOROP_1D_CURVE_GAMMA22] = "Gamma 2.2",
> [DRM_COLOROP_1D_CURVE_GAMMA22_INV] = "Gamma 2.2 Inverse",
> + [DRM_COLOROP_1D_CURVE_HLG_EOTF] = "HLG",
> };
>
> static const struct drm_prop_enum_list drm_colorop_lut1d_interpolation_list[] = {
> diff --git a/include/drm/drm_colorop.h b/include/drm/drm_colorop.h
> index ee6454b08b2d..8ec98521607d 100644
> --- a/include/drm/drm_colorop.h
> +++ b/include/drm/drm_colorop.h
> @@ -126,6 +126,16 @@ enum drm_colorop_curve_1d_type {
> * The inverse of &DRM_COLOROP_1D_CURVE_GAMMA22
> */
> DRM_COLOROP_1D_CURVE_GAMMA22_INV,
> +
> + /**
> + * @DRM_COLOROP_1D_CURVE_HLG_EOTF:
> + *
> + * enum string "HLG"
> + *
> + * Hybrid log-gamma transfer function.
> + */
> + DRM_COLOROP_1D_CURVE_HLG_EOTF,
> +
Hi,
if you read ITU-R BT.2100[1], you will see that the HLG EOTF has three
parameters: the system gamma, the display nominal peak luminance, and
the display black luminance. You cannot define a HLG EOTF or its
inverse without these parameters. One might assume to derive the system
gamma from the peak luminance, but I would like to leave that as a free
parameter if possible, because I'm not convinced the formulas for it are
universally applicable.
The HLG OETF on the other hand is a fixed function. Did you mean that
instead?
[1]: https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/specs.md#itu-r-bt2100
Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260206/3500f4eb/attachment.sig>
More information about the linux-arm-kernel
mailing list