[v5,09/13] drm/i915: Add HLG EOTF

Submitted by Shankar, Uma on March 11, 2019, 3:58 a.m.

Details

Message ID 1552276684-25358-10-git-send-email-uma.shankar@intel.com
State New
Headers show
Series "Add HDR Metadata Parsing and handling in DRM layer" ( rev: 5 ) in DRI devel

Commit Message

Shankar, Uma March 11, 2019, 3:58 a.m.
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

ADD HLG EOTF to the list of EOTF transfer functions supported.
Hybrid Log-Gamma (HLG) is a high dynamic range (HDR) standard.
HLG defines a nonlinear transfer function in which the lower
half of the signal values use a gamma curve and the upper half
of the signal values use a logarithmic curve.

v2: Rebase

v3: Fixed a warning message

v4: Addressed Shashank's review comments

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 include/linux/hdmi.h       | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 49f8340..4cd22e8 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3864,8 +3864,8 @@  static uint8_t eotf_supported(const u8 *edid_ext)
 	return edid_ext[2] &
 		(BIT(HDMI_EOTF_TRADITIONAL_GAMMA_SDR) |
 		 BIT(HDMI_EOTF_TRADITIONAL_GAMMA_HDR) |
-		 BIT(HDMI_EOTF_SMPTE_ST2084));
-
+		 BIT(HDMI_EOTF_SMPTE_ST2084) |
+		 BIT(HDMI_EOTF_BT_2100_HLG));
 }
 
 static uint8_t hdr_metadata_type(const u8 *edid_ext)
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 33243b2..ad652e6 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -161,6 +161,7 @@  enum hdmi_eotf {
 	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
 	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
 	HDMI_EOTF_SMPTE_ST2084,
+	HDMI_EOTF_BT_2100_HLG,
 };
 
 struct hdmi_avi_infoframe {

Comments

On 3/11/2019 9:28 AM, Uma Shankar wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> ADD HLG EOTF to the list of EOTF transfer functions supported.
> Hybrid Log-Gamma (HLG) is a high dynamic range (HDR) standard.
> HLG defines a nonlinear transfer function in which the lower
> half of the signal values use a gamma curve and the upper half
> of the signal values use a logarithmic curve.
>
> v2: Rebase
>
> v3: Fixed a warning message
>
> v4: Addressed Shashank's review comments
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>   drivers/gpu/drm/drm_edid.c | 4 ++--
>   include/linux/hdmi.h       | 1 +
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 49f8340..4cd22e8 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3864,8 +3864,8 @@ static uint8_t eotf_supported(const u8 *edid_ext)
>   	return edid_ext[2] &
>   		(BIT(HDMI_EOTF_TRADITIONAL_GAMMA_SDR) |
>   		 BIT(HDMI_EOTF_TRADITIONAL_GAMMA_HDR) |
> -		 BIT(HDMI_EOTF_SMPTE_ST2084));
> -
> +		 BIT(HDMI_EOTF_SMPTE_ST2084) |
> +		 BIT(HDMI_EOTF_BT_2100_HLG));
>   }
>   
>   static uint8_t hdr_metadata_type(const u8 *edid_ext)
> diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
> index 33243b2..ad652e6 100644
> --- a/include/linux/hdmi.h
> +++ b/include/linux/hdmi.h
> @@ -161,6 +161,7 @@ enum hdmi_eotf {
>   	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
>   	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
>   	HDMI_EOTF_SMPTE_ST2084,
> +	HDMI_EOTF_BT_2100_HLG,
>   };
>   

Looks good to me,

Feel free to use: Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>

>   struct hdmi_avi_infoframe {