From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A3592EBBA9 for ; Fri, 6 Feb 2026 14:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770386586; cv=pass; b=bfLI6FSccMNVNPXWaTPGN2fQj7j2BfiRhv5wRYLABoMnA669ZArMFUsP3nmuwq9PI69r9rOW+Ywiw/BEx57CIrbEeY/sCAw2CbfjQH5g+neReIbcCPAJ7QXLrGHQ/et0VvoB+8AaoU/ysUumxEhnhye9Bj5EaT7OgUn6RTpM9GU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770386586; c=relaxed/simple; bh=La+N9Ck9Pw7R930RGoiQ3+kxLxEL+5IbrNY+HKOHhsw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=SS1Ve6lQMaFL/LcalXIOQFl0T2O6jhsUIeNNb0HMAIlvYFCQd8wNFSGDRo88Z7RJ2V9v3ZMaeVRHrO5uMT5Rwix+LYvdRlZM3VvrIq6IfOfMstFdyTygCBhC6orVv8HIS6AASkH3/ejTbyf8EN5Ha7XOoYTEPjX6QGIMnX3oNXk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nfraprado@collabora.com header.b=j2wTubrD; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nfraprado@collabora.com header.b="j2wTubrD" ARC-Seal: i=1; a=rsa-sha256; t=1770386556; cv=none; d=zohomail.com; s=zohoarc; b=VR0eJx/pQ+e9fiD8Srp2mnUP05Y4jBuK6/X7+2iz3u8cS1uVVHAiFaNzqMxXmRMONOkza7x39xfM0bn/pAoAnfGdWhFn75EyXY26fzgSWPy6m3My7aea0ECemyFrl0KwxGMRZwZOmLJBEq51b9WmD6q57WJJqs5VXbVrMFXAZLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770386556; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=7h/m+OM+IZSrfWnlY71Nxs1XBfrAQxoSp8VocCjjCNo=; b=e9R/Jw5DOGv0+XGxAIS1rb5XEipGrOqK++LC/CNAaX2a8SsBezkiow0N80G9nnLLy0o8OyRIVXwEdC6vDu3I9Nzn+ioKNpOOP4OcJBC9JBZtCFfFvaZBUHcNrtdQpp4zY+tDhBMQRF8wQBwGXh3bKXk/dB/rB5dAGSaC/zYI9SY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nfraprado@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1770386556; s=zohomail; d=collabora.com; i=nfraprado@collabora.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=7h/m+OM+IZSrfWnlY71Nxs1XBfrAQxoSp8VocCjjCNo=; b=j2wTubrDqNZt4Vkq343Qo2TSF2n/xtyUewmbCAT+/zj/uTPqgypQxgxzQAj1UDmG rraL+v7AhuR6OtWVECpz9hA3YtMTp/FNbjQoNV69NyCQypfS3SXviSQdaoazcKLhbQ5 neR0R0fDJSBEyP5Q9snSiW8T9oMTfOrDxNXIgjT4= Received: by mx.zohomail.com with SMTPS id 1770386554174417.2631923055201; Fri, 6 Feb 2026 06:02:34 -0800 (PST) Message-ID: <45b44706a86046b795b3a29d3987b7764455b21d.camel@collabora.com> Subject: Re: [PATCH 07/11] drm/colorop: Introduce HLG EOTF From: =?ISO-8859-1?Q?N=EDcolas?= "F. R. A. Prado" To: Pekka Paalanen Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, daniels@collabora.com, ariel.dalessandro@collabora.com, kernel@collabora.com Date: Fri, 06 Feb 2026 09:02:31 -0500 In-Reply-To: <20260206105102.1208fff9@eldfell> References: <20251223-mtk-ovl-pre-blend-colorops-v1-0-0cb99bd0ab33@collabora.com> <20251223-mtk-ovl-pre-blend-colorops-v1-7-0cb99bd0ab33@collabora.com> <20260206105102.1208fff9@eldfell> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ZohoMailClient: External On Fri, 2026-02-06 at 10:51 +0200, Pekka Paalanen wrote: > On Tue, 23 Dec 2025 16:44:48 -0300 > N=C3=ADcolas F. R. A. Prado wrote: >=20 > > Introduce definition of a hybrid log-gamma electro-optical transfer > > function for 1D Curve colorops. > >=20 > > Signed-off-by: N=C3=ADcolas F. R. A. Prado > > --- > > =C2=A0drivers/gpu/drm/drm_colorop.c |=C2=A0 1 + > > =C2=A0include/drm/drm_colorop.h=C2=A0=C2=A0=C2=A0=C2=A0 | 10 ++++++++++ > > =C2=A02 files changed, 11 insertions(+) > >=20 > > 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[] =3D { > > =C2=A0 [DRM_COLOROP_1D_CURVE_BT2020_OETF] =3D "BT.2020 OETF", > > =C2=A0 [DRM_COLOROP_1D_CURVE_GAMMA22] =3D "Gamma 2.2", > > =C2=A0 [DRM_COLOROP_1D_CURVE_GAMMA22_INV] =3D "Gamma 2.2 Inverse", > > + [DRM_COLOROP_1D_CURVE_HLG_EOTF] =3D "HLG", > > =C2=A0}; > > =C2=A0 > > =C2=A0static const struct drm_prop_enum_list > > drm_colorop_lut1d_interpolation_list[] =3D { > > 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 { > > =C2=A0 * The inverse of &DRM_COLOROP_1D_CURVE_GAMMA22 > > =C2=A0 */ > > =C2=A0 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, > > + >=20 > Hi, >=20 > 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. >=20 > The HLG OETF on the other hand is a fixed function. Did you mean that > instead? Thank you for the insights! But as it's obvious by now I don't have enough information to answer that. Hopefully someone from MediaTek could clarify what is the precise function implemented in hardware. I didn't know about this difference between the HLG EOTF and OETF, but what made me guess it would be the EOTF is that this curve is available at the GAMMA block, which is right before blending the planes (the pipeline topology I reverse-engineered from testing is on the cover- letter), which I believe is usually done in the optical domain. But I suppose one option would be that this curve really is the Inverse HLG OETF, which wouldn't require additional parameters and also brings the content to the optical domain. --=20 Thanks, N=C3=ADcolas