[v10,12/12] drm/i915: Add state readout for DRM infoframe

Submitted by Shankar, Uma on May 14, 2019, 5:36 p.m.

Details

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

Browsing this patch as part of:
"Add HDR Metadata Parsing and handling in DRM layer" rev 10 in DRI devel
<< prev patch [12/12] next patch >>

Commit Message

Shankar, Uma May 14, 2019, 5:36 p.m.
Added state readout for DRM infoframe and enabled
state validation for DRM infoframe.

v2: Addressed Ville's review comments and dropped the
unused drm infoframe read at intel_hdmi_init.

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

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 0af47f3..f574315 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3834,6 +3834,10 @@  void intel_ddi_get_config(struct intel_encoder *encoder,
 	intel_read_infoframe(encoder, pipe_config,
 			     HDMI_INFOFRAME_TYPE_VENDOR,
 			     &pipe_config->infoframes.hdmi);
+	if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)))
+		intel_read_infoframe(encoder, pipe_config,
+				     HDMI_INFOFRAME_TYPE_DRM,
+				     &pipe_config->infoframes.drm);
 }
 
 static enum intel_output_type
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e35ba8d..c89b214 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12274,6 +12274,7 @@  static bool fastboot_enabled(struct drm_i915_private *dev_priv)
 	PIPE_CONF_CHECK_INFOFRAME(avi);
 	PIPE_CONF_CHECK_INFOFRAME(spd);
 	PIPE_CONF_CHECK_INFOFRAME(hdmi);
+	PIPE_CONF_CHECK_INFOFRAME(drm);
 
 #undef PIPE_CONF_CHECK_X
 #undef PIPE_CONF_CHECK_I

Comments

On Tue, May 14, 2019 at 11:06:34PM +0530, Uma Shankar wrote:
> Added state readout for DRM infoframe and enabled
> state validation for DRM infoframe.
> 
> v2: Addressed Ville's review comments and dropped the
> unused drm infoframe read at intel_hdmi_init.
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ddi.c     | 4 ++++
>  drivers/gpu/drm/i915/intel_display.c | 1 +
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 0af47f3..f574315 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3834,6 +3834,10 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
>  	intel_read_infoframe(encoder, pipe_config,
>  			     HDMI_INFOFRAME_TYPE_VENDOR,
>  			     &pipe_config->infoframes.hdmi);
> +	if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)))

Silly extra parens. Actually, I think the check can be
removed entirely since intel_read_infoframe() also checks
infoframes.enable.

> +		intel_read_infoframe(encoder, pipe_config,
> +				     HDMI_INFOFRAME_TYPE_DRM,
> +				     &pipe_config->infoframes.drm);
>  }
>  
>  static enum intel_output_type
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e35ba8d..c89b214 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12274,6 +12274,7 @@ static bool fastboot_enabled(struct drm_i915_private *dev_priv)
>  	PIPE_CONF_CHECK_INFOFRAME(avi);
>  	PIPE_CONF_CHECK_INFOFRAME(spd);
>  	PIPE_CONF_CHECK_INFOFRAME(hdmi);
> +	PIPE_CONF_CHECK_INFOFRAME(drm);
>  
>  #undef PIPE_CONF_CHECK_X
>  #undef PIPE_CONF_CHECK_I
> -- 
> 1.9.1
>-----Original Message-----
>From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
>Sent: Thursday, May 16, 2019 1:00 AM
>To: Shankar, Uma <uma.shankar@intel.com>
>Cc: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org;
>maarten.lankhorst@linux.intel.com; Sharma, Shashank
><shashank.sharma@intel.com>; emil.l.velikov@gmail.com; brian.starkey@arm.com;
>dcastagna@chromium.org; seanpaul@chromium.org; Roper, Matthew D
><matthew.d.roper@intel.com>; jonas@kwiboo.se
>Subject: Re: [v10 12/12] drm/i915: Add state readout for DRM infoframe
>
>On Tue, May 14, 2019 at 11:06:34PM +0530, Uma Shankar wrote:
>> Added state readout for DRM infoframe and enabled state validation for
>> DRM infoframe.
>>
>> v2: Addressed Ville's review comments and dropped the unused drm
>> infoframe read at intel_hdmi_init.
>>
>> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_ddi.c     | 4 ++++
>>  drivers/gpu/drm/i915/intel_display.c | 1 +
>>  2 files changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_ddi.c
>> b/drivers/gpu/drm/i915/intel_ddi.c
>> index 0af47f3..f574315 100644
>> --- a/drivers/gpu/drm/i915/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/intel_ddi.c
>> @@ -3834,6 +3834,10 @@ void intel_ddi_get_config(struct intel_encoder
>*encoder,
>>  	intel_read_infoframe(encoder, pipe_config,
>>  			     HDMI_INFOFRAME_TYPE_VENDOR,
>>  			     &pipe_config->infoframes.hdmi);
>> +	if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)))
>
>Silly extra parens. Actually, I think the check can be removed entirely since
>intel_read_infoframe() also checks infoframes.enable.

Hmm yeah, will drop this.

>> +		intel_read_infoframe(encoder, pipe_config,
>> +				     HDMI_INFOFRAME_TYPE_DRM,
>> +				     &pipe_config->infoframes.drm);
>>  }
>>
>>  static enum intel_output_type
>> diff --git a/drivers/gpu/drm/i915/intel_display.c
>> b/drivers/gpu/drm/i915/intel_display.c
>> index e35ba8d..c89b214 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -12274,6 +12274,7 @@ static bool fastboot_enabled(struct drm_i915_private
>*dev_priv)
>>  	PIPE_CONF_CHECK_INFOFRAME(avi);
>>  	PIPE_CONF_CHECK_INFOFRAME(spd);
>>  	PIPE_CONF_CHECK_INFOFRAME(hdmi);
>> +	PIPE_CONF_CHECK_INFOFRAME(drm);
>>
>>  #undef PIPE_CONF_CHECK_X
>>  #undef PIPE_CONF_CHECK_I
>> --
>> 1.9.1
>
>--
>Ville Syrjälä
>Intel