diff mbox series

[v4,10/12] drm/i915: Add HLG EOTF

Message ID 1546938687-27306-11-git-send-email-uma.shankar@intel.com (mailing list archive)
State New, archived
Headers show
Series Add HDR Metadata Parsing and handling in DRM layer | expand

Commit Message

Shankar, Uma Jan. 8, 2019, 9:11 a.m. UTC
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(-)

Comments

Matt Roper Jan. 8, 2019, 7:45 p.m. UTC | #1
On Tue, Jan 08, 2019 at 02:41:25PM +0530, 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(-)

I haven't really looked at this series in depth, but just a quick
drive-by comment:  it doesn't look like this patch touches i915, so the
"drm/i915:" headline prefix should probably just be "drm:" and you might
want to move it earlier in the series so that all the core patches come
before all the i915 patches.


Matt

> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index df27012..5592c9b 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3850,8 +3850,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 ce00e1e..b5346c3 100644
> --- a/include/linux/hdmi.h
> +++ b/include/linux/hdmi.h
> @@ -146,6 +146,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 {
> -- 
> 1.9.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Shankar, Uma Jan. 9, 2019, 12:08 p.m. UTC | #2
>-----Original Message-----
>From: Roper, Matthew D
>Sent: Wednesday, January 9, 2019 1:15 AM
>To: Shankar, Uma <uma.shankar@intel.com>
>Cc: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Syrjala, Ville
><ville.syrjala@intel.com>; emil.l.velikov@gmail.com; Lankhorst, Maarten
><maarten.lankhorst@intel.com>
>Subject: Re: [v4 10/12] drm/i915: Add HLG EOTF
>
>On Tue, Jan 08, 2019 at 02:41:25PM +0530, 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(-)
>
>I haven't really looked at this series in depth, but just a quick drive-by comment:
>it doesn't look like this patch touches i915, so the "drm/i915:" headline prefix
>should probably just be "drm:" and you might want to move it earlier in the series
>so that all the core patches come before all the i915 patches.

Sure Matt, will update this as part of next version.

Regards,
Uma Shankar

>
>Matt
>
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index df27012..5592c9b 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -3850,8 +3850,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 ce00e1e..b5346c3
>> 100644
>> --- a/include/linux/hdmi.h
>> +++ b/include/linux/hdmi.h
>> @@ -146,6 +146,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 {
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>--
>Matt Roper
>Graphics Software Engineer
>IoTG Platform Enabling & Development
>Intel Corporation
>(916) 356-2795
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index df27012..5592c9b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3850,8 +3850,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 ce00e1e..b5346c3 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -146,6 +146,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 {