[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206105102.1208fff9@eldfell>
Date: Fri, 6 Feb 2026 10:51:02 +0200
From: Pekka Paalanen <pekka.paalanen@...labora.com>
To: "Nícolas F. R. A. Prado" <nfraprado@...labora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
<mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie
<airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Chun-Kuang Hu
<chunkuang.hu@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>, Matthias
Brugger <matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, daniels@...labora.com,
ariel.dalessandro@...labora.com, kernel@...labora.com
Subject: Re: [PATCH 07/11] drm/colorop: Introduce HLG EOTF
On Tue, 23 Dec 2025 16:44:48 -0300
Nícolas F. R. A. Prado <nfraprado@...labora.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@...labora.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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists