[v5,04/13] drm/i915: Attach HDR metadata property to connector

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

Details

Message ID 1552276684-25358-5-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:57 a.m.
Attach HDR metadata property to connector object.

v2: Rebase

v3: Updated the property name as per updated name
while creating hdr metadata property

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index cd422a7..0952475 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2719,6 +2719,8 @@  static void intel_hdmi_destroy(struct drm_connector *connector)
 
 	drm_connector_attach_content_type_property(connector);
 	connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
+	drm_object_attach_property(&connector->base,
+		connector->dev->mode_config.hdr_output_metadata_property, 0);
 
 	if (!HAS_GMCH(dev_priv))
 		drm_connector_attach_max_bpc_property(connector, 8, 12);

Comments

> -----Original Message-----
> From: Shankar, Uma
> Sent: Monday, March 11, 2019 9:28 AM
> To: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> Cc: Lankhorst, Maarten <maarten.lankhorst@intel.com>; Syrjala, Ville
> <ville.syrjala@intel.com>; Sharma, Shashank <shashank.sharma@intel.com>;
> emil.l.velikov@gmail.com; brian.starkey@arm.com; Liviu.Dudau@arm.com; Shankar,
> Uma <uma.shankar@intel.com>
> Subject: [v5 04/13] drm/i915: Attach HDR metadata property to connector
> 
> Attach HDR metadata property to connector object.
> 
> v2: Rebase
> 
> v3: Updated the property name as per updated name while creating hdr metadata
> property
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index cd422a7..0952475 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -2719,6 +2719,8 @@ static void intel_hdmi_destroy(struct drm_connector
> *connector)
> 
>  	drm_connector_attach_content_type_property(connector);
>  	connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
> +	drm_object_attach_property(&connector->base,
> +		connector->dev->mode_config.hdr_output_metadata_property, 0);
'connector->dev' should be aligned to the line above, but seems like you have done this to meet the 80 char limit. 
May be a local ptr variable will help with 80 char. 

Apart from that, looks good to me, and feel free to use:
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
> 
>  	if (!HAS_GMCH(dev_priv))
>  		drm_connector_attach_max_bpc_property(connector, 8, 12);
> --
> 1.9.1
>-----Original Message-----
>From: Sharma, Shashank
>Sent: Friday, March 15, 2019 1:06 PM
>To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org; dri-
>devel@lists.freedesktop.org
>Cc: Lankhorst, Maarten <maarten.lankhorst@intel.com>; Syrjala, Ville
><ville.syrjala@intel.com>; emil.l.velikov@gmail.com; brian.starkey@arm.com;
>Liviu.Dudau@arm.com
>Subject: RE: [v5 04/13] drm/i915: Attach HDR metadata property to connector
>
>
>
>> -----Original Message-----
>> From: Shankar, Uma
>> Sent: Monday, March 11, 2019 9:28 AM
>> To: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
>> Cc: Lankhorst, Maarten <maarten.lankhorst@intel.com>; Syrjala, Ville
>> <ville.syrjala@intel.com>; Sharma, Shashank
>> <shashank.sharma@intel.com>; emil.l.velikov@gmail.com;
>> brian.starkey@arm.com; Liviu.Dudau@arm.com; Shankar, Uma
>> <uma.shankar@intel.com>
>> Subject: [v5 04/13] drm/i915: Attach HDR metadata property to
>> connector
>>
>> Attach HDR metadata property to connector object.
>>
>> v2: Rebase
>>
>> v3: Updated the property name as per updated name while creating hdr
>> metadata property
>>
>> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_hdmi.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c
>> b/drivers/gpu/drm/i915/intel_hdmi.c
>> index cd422a7..0952475 100644
>> --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> @@ -2719,6 +2719,8 @@ static void intel_hdmi_destroy(struct
>> drm_connector
>> *connector)
>>
>>  	drm_connector_attach_content_type_property(connector);
>>  	connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
>> +	drm_object_attach_property(&connector->base,
>> +		connector->dev->mode_config.hdr_output_metadata_property, 0);
>'connector->dev' should be aligned to the line above, but seems like you have done
>this to meet the 80 char limit.
>May be a local ptr variable will help with 80 char.

Thanks Shashank, the name itself is a bit long. I will align it and can see crossing 80
characters for these kind of cases is ok. Being done in driver at several places.

Thanks for the review.

Regards,
Uma Shankar
>
>Apart from that, looks good to me, and feel free to use:
>Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
>>
>>  	if (!HAS_GMCH(dev_priv))
>>  		drm_connector_attach_max_bpc_property(connector, 8, 12);
>> --
>> 1.9.1