All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
@ 2014-03-21  3:01 Vandana Kannan
  2014-03-31 18:55 ` Jesse Barnes
  2014-03-31 19:05 ` Daniel Vetter
  0 siblings, 2 replies; 15+ messages in thread
From: Vandana Kannan @ 2014-03-21  3:01 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Jesse Barnes

Populate PAR in infoframe structure. If there is a user setting for PAR, then
that value is set. Else, value is taken from CEA mode list if VIC is found.
Else, PAR is calculated from resolution. If none of these conditions are
satisfied, PAR is NONE as per initialization.

As a next step, create a property that would enable a user space app to set
aspect ratio. (will be pushed as a separate patch)

Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Cc: Jesse Barnes <jesse.barnes@intel.com>
Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
---
 drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
 include/drm/drm_crtc.h     |    1 +
 2 files changed, 35 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d4e3f9d..3db693f 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
 }
 EXPORT_SYMBOL(drm_match_cea_mode);
 
+/**
+ * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
+ * the input VIC from the CEA mode list
+ *
+ * Returns picture aspect ratio
+ */
+enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+{
+	/* return picture aspect ratio for video_code - 1 to access the
+	 * right array element
+	*/
+	return edid_cea_modes[video_code-1].picture_aspect_ratio;
+}
+EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
+
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
  * specific block).
@@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	frame->video_code = drm_match_cea_mode(mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
+
+	/* Populate picture aspect ratio from either CEA mode list or
+	 *  user input
+	*/
+	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
+		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
+		frame->picture_aspect = mode->picture_aspect_ratio;
+	else if (frame->video_code > 0)
+		frame->picture_aspect = drm_get_cea_aspect_ratio(
+						frame->video_code);
+	else {
+		if (!(mode->vdisplay % 3) &&
+			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
+			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
+		else if (!(mode->vdisplay % 9) &&
+			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
+			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
+	}
+
 	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
 	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 27f828c..50dc55a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 				    void *data, struct drm_file *file_priv);
 extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
+extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
 extern bool drm_detect_hdmi_monitor(struct edid *edid);
 extern bool drm_detect_monitor_audio(struct edid *edid);
 extern bool drm_rgb_quant_range_selectable(struct edid *edid);
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-03-21  3:01 [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list Vandana Kannan
@ 2014-03-31 18:55 ` Jesse Barnes
  2014-03-31 19:05 ` Daniel Vetter
  1 sibling, 0 replies; 15+ messages in thread
From: Jesse Barnes @ 2014-03-31 18:55 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, dri-devel

On Fri, 21 Mar 2014 08:31:29 +0530
Vandana Kannan <vandana.kannan@intel.com> wrote:

> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> that value is set. Else, value is taken from CEA mode list if VIC is found.
> Else, PAR is calculated from resolution. If none of these conditions are
> satisfied, PAR is NONE as per initialization.
> 
> As a next step, create a property that would enable a user space app to set
> aspect ratio. (will be pushed as a separate patch)
> 
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Cc: Jesse Barnes <jesse.barnes@intel.com>
> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> ---
>  drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
>  include/drm/drm_crtc.h     |    1 +
>  2 files changed, 35 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index d4e3f9d..3db693f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>  }
>  EXPORT_SYMBOL(drm_match_cea_mode);
>  
> +/**
> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> + * the input VIC from the CEA mode list
> + *
> + * Returns picture aspect ratio
> + */
> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> +{
> +	/* return picture aspect ratio for video_code - 1 to access the
> +	 * right array element
> +	*/
> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> +}
> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> +
>  /*
>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>   * specific block).
> @@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>  	frame->video_code = drm_match_cea_mode(mode);
>  
>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> +
> +	/* Populate picture aspect ratio from either CEA mode list or
> +	 *  user input
> +	*/
> +	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
> +		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
> +		frame->picture_aspect = mode->picture_aspect_ratio;
> +	else if (frame->video_code > 0)
> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> +						frame->video_code);
> +	else {
> +		if (!(mode->vdisplay % 3) &&
> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
> +		else if (!(mode->vdisplay % 9) &&
> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
> +	}
> +
>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>  
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 27f828c..50dc55a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>  				    void *data, struct drm_file *file_priv);
>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>  extern bool drm_detect_monitor_audio(struct edid *edid);
>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-03-21  3:01 [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list Vandana Kannan
  2014-03-31 18:55 ` Jesse Barnes
@ 2014-03-31 19:05 ` Daniel Vetter
  2014-04-01  2:36   ` Vandana Kannan
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-03-31 19:05 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Jesse Barnes, dri-devel, Vijay Purushothaman

On Fri, Mar 21, 2014 at 08:31:29AM +0530, Vandana Kannan wrote:
> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> that value is set. Else, value is taken from CEA mode list if VIC is found.
> Else, PAR is calculated from resolution. If none of these conditions are
> satisfied, PAR is NONE as per initialization.
> 
> As a next step, create a property that would enable a user space app to set
> aspect ratio. (will be pushed as a separate patch)
> 
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Cc: Jesse Barnes <jesse.barnes@intel.com>
> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> ---
>  drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
>  include/drm/drm_crtc.h     |    1 +
>  2 files changed, 35 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index d4e3f9d..3db693f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>  }
>  EXPORT_SYMBOL(drm_match_cea_mode);
>  
> +/**
> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> + * the input VIC from the CEA mode list
> + *
> + * Returns picture aspect ratio
> + */
> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> +{
> +	/* return picture aspect ratio for video_code - 1 to access the
> +	 * right array element
> +	*/
> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> +}
> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> +
>  /*
>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>   * specific block).
> @@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>  	frame->video_code = drm_match_cea_mode(mode);
>  
>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> +
> +	/* Populate picture aspect ratio from either CEA mode list or
> +	 *  user input
> +	*/
> +	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
> +		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
> +		frame->picture_aspect = mode->picture_aspect_ratio;

Please pardon my ignorance, but how can userspace actually set this part
of the mode? I couldn't find any code which sets this anywhere ...
-Daniel

> +	else if (frame->video_code > 0)
> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> +						frame->video_code);
> +	else {
> +		if (!(mode->vdisplay % 3) &&
> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
> +		else if (!(mode->vdisplay % 9) &&
> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
> +	}
> +
>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>  
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 27f828c..50dc55a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>  				    void *data, struct drm_file *file_priv);
>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>  extern bool drm_detect_monitor_audio(struct edid *edid);
>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> -- 
> 1.7.9.5
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-03-31 19:05 ` Daniel Vetter
@ 2014-04-01  2:36   ` Vandana Kannan
  2014-04-01  7:27     ` Daniel Vetter
  0 siblings, 1 reply; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01  2:36 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Barnes, Jesse, dri-devel, Purushothaman, Vijay A

On Apr-01-2014 12:35 AM, Daniel Vetter wrote:
> On Fri, Mar 21, 2014 at 08:31:29AM +0530, Vandana Kannan wrote:
>> Populate PAR in infoframe structure. If there is a user setting for PAR, then
>> that value is set. Else, value is taken from CEA mode list if VIC is found.
>> Else, PAR is calculated from resolution. If none of these conditions are
>> satisfied, PAR is NONE as per initialization.
>>
>> As a next step, create a property that would enable a user space app to set
>> aspect ratio. (will be pushed as a separate patch)
>>
>> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
>> Cc: Jesse Barnes <jesse.barnes@intel.com>
>> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: intel-gfx@lists.freedesktop.org
>> ---
>>  drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
>>  include/drm/drm_crtc.h     |    1 +
>>  2 files changed, 35 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index d4e3f9d..3db693f 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>>  }
>>  EXPORT_SYMBOL(drm_match_cea_mode);
>>  
>> +/**
>> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
>> + * the input VIC from the CEA mode list
>> + *
>> + * Returns picture aspect ratio
>> + */
>> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
>> +{
>> +	/* return picture aspect ratio for video_code - 1 to access the
>> +	 * right array element
>> +	*/
>> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
>> +}
>> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
>> +
>>  /*
>>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>>   * specific block).
>> @@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>>  	frame->video_code = drm_match_cea_mode(mode);
>>  
>>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
>> +
>> +	/* Populate picture aspect ratio from either CEA mode list or
>> +	 *  user input
>> +	*/
>> +	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
>> +		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
>> +		frame->picture_aspect = mode->picture_aspect_ratio;
> 
> Please pardon my ignorance, but how can userspace actually set this part
> of the mode? I couldn't find any code which sets this anywhere ...
> -Daniel
> 
I have submitted a patch to enable user space to set picture aspect
ratio through a property..
drm/i915: Add property to set HDMI aspect ratio
http://lists.freedesktop.org/archives/intel-gfx/2014-March/042403.html
-Vandana
>> +	else if (frame->video_code > 0)
>> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
>> +						frame->video_code);
>> +	else {
>> +		if (!(mode->vdisplay % 3) &&
>> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
>> +		else if (!(mode->vdisplay % 9) &&
>> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
>> +	}
>> +
>>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>>  
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index 27f828c..50dc55a 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>>  				    void *data, struct drm_file *file_priv);
>>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
>> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>>  extern bool drm_detect_monitor_audio(struct edid *edid);
>>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
>> -- 
>> 1.7.9.5
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01  2:36   ` Vandana Kannan
@ 2014-04-01  7:27     ` Daniel Vetter
  2014-04-01  9:26       ` Vandana Kannan
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-01  7:27 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Barnes, Jesse, dri-devel

On Tue, Apr 01, 2014 at 08:06:04AM +0530, Vandana Kannan wrote:
> On Apr-01-2014 12:35 AM, Daniel Vetter wrote:
> > On Fri, Mar 21, 2014 at 08:31:29AM +0530, Vandana Kannan wrote:
> >> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> >> that value is set. Else, value is taken from CEA mode list if VIC is found.
> >> Else, PAR is calculated from resolution. If none of these conditions are
> >> satisfied, PAR is NONE as per initialization.
> >>
> >> As a next step, create a property that would enable a user space app to set
> >> aspect ratio. (will be pushed as a separate patch)
> >>
> >> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> >> Cc: Jesse Barnes <jesse.barnes@intel.com>
> >> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> Cc: intel-gfx@lists.freedesktop.org
> >> ---
> >>  drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
> >>  include/drm/drm_crtc.h     |    1 +
> >>  2 files changed, 35 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> >> index d4e3f9d..3db693f 100644
> >> --- a/drivers/gpu/drm/drm_edid.c
> >> +++ b/drivers/gpu/drm/drm_edid.c
> >> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
> >>  }
> >>  EXPORT_SYMBOL(drm_match_cea_mode);
> >>  
> >> +/**
> >> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> >> + * the input VIC from the CEA mode list
> >> + *
> >> + * Returns picture aspect ratio
> >> + */
> >> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> >> +{
> >> +	/* return picture aspect ratio for video_code - 1 to access the
> >> +	 * right array element
> >> +	*/
> >> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> >> +}
> >> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> >> +
> >>  /*
> >>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
> >>   * specific block).
> >> @@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
> >>  	frame->video_code = drm_match_cea_mode(mode);
> >>  
> >>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> >> +
> >> +	/* Populate picture aspect ratio from either CEA mode list or
> >> +	 *  user input
> >> +	*/
> >> +	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
> >> +		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
> >> +		frame->picture_aspect = mode->picture_aspect_ratio;
> > 
> > Please pardon my ignorance, but how can userspace actually set this part
> > of the mode? I couldn't find any code which sets this anywhere ...
> > -Daniel
> > 
> I have submitted a patch to enable user space to set picture aspect
> ratio through a property..
> drm/i915: Add property to set HDMI aspect ratio
> http://lists.freedesktop.org/archives/intel-gfx/2014-March/042403.html

Ah, that makes more sense. I think we should move the property also into
the drm core so that all drivers that want to expose this can use the same
property. Also if you have patches which depend upon each another in a
funtional way it's better to post them together in one series.
-Daniel

> -Vandana
> >> +	else if (frame->video_code > 0)
> >> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> >> +						frame->video_code);
> >> +	else {
> >> +		if (!(mode->vdisplay % 3) &&
> >> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
> >> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
> >> +		else if (!(mode->vdisplay % 9) &&
> >> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
> >> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
> >> +	}
> >> +
> >>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> >>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> >>  
> >> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> >> index 27f828c..50dc55a 100644
> >> --- a/include/drm/drm_crtc.h
> >> +++ b/include/drm/drm_crtc.h
> >> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
> >>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
> >>  				    void *data, struct drm_file *file_priv);
> >>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> >> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
> >>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
> >>  extern bool drm_detect_monitor_audio(struct edid *edid);
> >>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> >> -- 
> >> 1.7.9.5
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> > 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01  7:27     ` Daniel Vetter
@ 2014-04-01  9:26       ` Vandana Kannan
  2014-04-01  9:51         ` Daniel Vetter
  0 siblings, 1 reply; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01  9:26 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx, Barnes, Jesse, dri-devel

On Apr-01-2014 12:57 PM, Daniel Vetter wrote:
> On Tue, Apr 01, 2014 at 08:06:04AM +0530, Vandana Kannan wrote:
>> On Apr-01-2014 12:35 AM, Daniel Vetter wrote:
>>> On Fri, Mar 21, 2014 at 08:31:29AM +0530, Vandana Kannan wrote:
>>>> Populate PAR in infoframe structure. If there is a user setting for PAR, then
>>>> that value is set. Else, value is taken from CEA mode list if VIC is found.
>>>> Else, PAR is calculated from resolution. If none of these conditions are
>>>> satisfied, PAR is NONE as per initialization.
>>>>
>>>> As a next step, create a property that would enable a user space app to set
>>>> aspect ratio. (will be pushed as a separate patch)
>>>>
>>>> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
>>>> Cc: Jesse Barnes <jesse.barnes@intel.com>
>>>> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>> Cc: intel-gfx@lists.freedesktop.org
>>>> ---
>>>>  drivers/gpu/drm/drm_edid.c |   34 ++++++++++++++++++++++++++++++++++
>>>>  include/drm/drm_crtc.h     |    1 +
>>>>  2 files changed, 35 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>>>> index d4e3f9d..3db693f 100644
>>>> --- a/drivers/gpu/drm/drm_edid.c
>>>> +++ b/drivers/gpu/drm/drm_edid.c
>>>> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>>>>  }
>>>>  EXPORT_SYMBOL(drm_match_cea_mode);
>>>>  
>>>> +/**
>>>> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
>>>> + * the input VIC from the CEA mode list
>>>> + *
>>>> + * Returns picture aspect ratio
>>>> + */
>>>> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
>>>> +{
>>>> +	/* return picture aspect ratio for video_code - 1 to access the
>>>> +	 * right array element
>>>> +	*/
>>>> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
>>>> +}
>>>> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
>>>> +
>>>>  /*
>>>>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>>>>   * specific block).
>>>> @@ -3613,6 +3628,25 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>>>>  	frame->video_code = drm_match_cea_mode(mode);
>>>>  
>>>>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
>>>> +
>>>> +	/* Populate picture aspect ratio from either CEA mode list or
>>>> +	 *  user input
>>>> +	*/
>>>> +	if (mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_4_3 ||
>>>> +		mode->picture_aspect_ratio == HDMI_PICTURE_ASPECT_16_9)
>>>> +		frame->picture_aspect = mode->picture_aspect_ratio;
>>>
>>> Please pardon my ignorance, but how can userspace actually set this part
>>> of the mode? I couldn't find any code which sets this anywhere ...
>>> -Daniel
>>>
>> I have submitted a patch to enable user space to set picture aspect
>> ratio through a property..
>> drm/i915: Add property to set HDMI aspect ratio
>> http://lists.freedesktop.org/archives/intel-gfx/2014-March/042403.html
> 
> Ah, that makes more sense. I think we should move the property also into
> the drm core so that all drivers that want to expose this can use the same
> property. Also if you have patches which depend upon each another in a
> funtional way it's better to post them together in one series.
> -Daniel
> 
Ok, I will modify the patch (which adds aspect ratio property) to move
the property to drm and resend separately.
This patch as it is unblocks AVI infoframe compliance test, so can this
patch be considered for acceptance now?
>> -Vandana
>>>> +	else if (frame->video_code > 0)
>>>> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
>>>> +						frame->video_code);
>>>> +	else {
>>>> +		if (!(mode->vdisplay % 3) &&
>>>> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
>>>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
>>>> +		else if (!(mode->vdisplay % 9) &&
>>>> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
>>>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
>>>> +	}
>>>> +
>>>>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>>>>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>>>>  
>>>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>>>> index 27f828c..50dc55a 100644
>>>> --- a/include/drm/drm_crtc.h
>>>> +++ b/include/drm/drm_crtc.h
>>>> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>>>>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>>>>  				    void *data, struct drm_file *file_priv);
>>>>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
>>>> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>>>>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>>>>  extern bool drm_detect_monitor_audio(struct edid *edid);
>>>>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
>>>> -- 
>>>> 1.7.9.5
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
>>
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01  9:26       ` Vandana Kannan
@ 2014-04-01  9:51         ` Daniel Vetter
  2014-04-01 10:56           ` [PATCH v2] " Vandana Kannan
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Vetter @ 2014-04-01  9:51 UTC (permalink / raw)
  To: Vandana Kannan
  Cc: intel-gfx, Barnes, Jesse, dri-devel, Purushothaman, Vijay A

On Tue, Apr 1, 2014 at 11:26 AM, Vandana Kannan
<vandana.kannan@intel.com> wrote:
> Ok, I will modify the patch (which adds aspect ratio property) to move
> the property to drm and resend separately.
> This patch as it is unblocks AVI infoframe compliance test, so can this
> patch be considered for acceptance now?

Without the 2 lines to look at mode->picture_aspect_ratio I think yes.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01  9:51         ` Daniel Vetter
@ 2014-04-01 10:56           ` Vandana Kannan
  2014-04-01 11:34             ` Ville Syrjälä
  0 siblings, 1 reply; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01 10:56 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Jesse Barnes, Vijay Purushothaman

Populate PAR in infoframe structure. If there is a user setting for PAR, then
that value is set. Else, value is taken from CEA mode list if VIC is found.
Else, PAR is calculated from resolution. If none of these conditions are
satisfied, PAR is NONE as per initialization.

v2: Removed the part which sets PAR according to user input, based on
Daniel's review comments.

A separate patch will be submitted to create a property that would enable a
user space app to set aspect ratio for AVI infoframe.

Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Cc: Jesse Barnes <jesse.barnes@intel.com>
Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_edid.c | 29 +++++++++++++++++++++++++++++
 include/drm/drm_crtc.h     |  1 +
 2 files changed, 30 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d4e3f9d..fee24d3 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
 }
 EXPORT_SYMBOL(drm_match_cea_mode);
 
+/**
+ * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
+ * the input VIC from the CEA mode list
+ *
+ * Returns picture aspect ratio
+ */
+enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+{
+	/* return picture aspect ratio for video_code - 1 to access the
+	 * right array element
+	*/
+	return edid_cea_modes[video_code-1].picture_aspect_ratio;
+}
+EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
+
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
  * specific block).
@@ -3613,6 +3628,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	frame->video_code = drm_match_cea_mode(mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
+
+	/* Populate picture aspect ratio from CEA mode list */
+	if (frame->video_code > 0)
+		frame->picture_aspect = drm_get_cea_aspect_ratio(
+						frame->video_code);
+	else {
+		if (!(mode->vdisplay % 3) &&
+			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
+			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
+		else if (!(mode->vdisplay % 9) &&
+			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
+			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
+	}
+
 	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
 	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 27f828c..50dc55a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 				    void *data, struct drm_file *file_priv);
 extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
+extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
 extern bool drm_detect_hdmi_monitor(struct edid *edid);
 extern bool drm_detect_monitor_audio(struct edid *edid);
 extern bool drm_rgb_quant_range_selectable(struct edid *edid);
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 10:56           ` [PATCH v2] " Vandana Kannan
@ 2014-04-01 11:34             ` Ville Syrjälä
  2014-04-01 13:13               ` Vandana Kannan
  0 siblings, 1 reply; 15+ messages in thread
From: Ville Syrjälä @ 2014-04-01 11:34 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Jesse Barnes, dri-devel

On Tue, Apr 01, 2014 at 04:26:59PM +0530, Vandana Kannan wrote:
> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> that value is set. Else, value is taken from CEA mode list if VIC is found.
> Else, PAR is calculated from resolution. If none of these conditions are
> satisfied, PAR is NONE as per initialization.
> 
> v2: Removed the part which sets PAR according to user input, based on
> Daniel's review comments.
> 
> A separate patch will be submitted to create a property that would enable a
> user space app to set aspect ratio for AVI infoframe.
> 
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Cc: Jesse Barnes <jesse.barnes@intel.com>
> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/drm_edid.c | 29 +++++++++++++++++++++++++++++
>  include/drm/drm_crtc.h     |  1 +
>  2 files changed, 30 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index d4e3f9d..fee24d3 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>  }
>  EXPORT_SYMBOL(drm_match_cea_mode);
>  
> +/**
> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> + * the input VIC from the CEA mode list
> + *
> + * Returns picture aspect ratio
> + */
> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> +{
> +	/* return picture aspect ratio for video_code - 1 to access the
> +	 * right array element
> +	*/
> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> +}
> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> +
>  /*
>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>   * specific block).
> @@ -3613,6 +3628,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>  	frame->video_code = drm_match_cea_mode(mode);
>  
>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> +
> +	/* Populate picture aspect ratio from CEA mode list */
> +	if (frame->video_code > 0)
> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> +						frame->video_code);
> +	else {
> +		if (!(mode->vdisplay % 3) &&
> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
> +		else if (!(mode->vdisplay % 9) &&
> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
> +	}

I'm not sure if providing the PAR for non-CEA modes like this makes
any real difference. But I guess it can't hurt since you only provide
it for exact matches.

But the matches are maybe even a bit too exact. For instance 1366x768
will not match the 16:9 case. So maybe it should be calculated in a bit
more relaxed way.

Or just dropped totally. I'm not sure.

> +
>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>  
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 27f828c..50dc55a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>  				    void *data, struct drm_file *file_priv);
>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>  extern bool drm_detect_monitor_audio(struct edid *edid);
>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 11:34             ` Ville Syrjälä
@ 2014-04-01 13:13               ` Vandana Kannan
  2014-04-01 13:54                 ` Ville Syrjälä
  0 siblings, 1 reply; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01 13:13 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, Barnes, Jesse, dri-devel

On Apr-01-2014 5:04 PM, Ville Syrjälä wrote:
> On Tue, Apr 01, 2014 at 04:26:59PM +0530, Vandana Kannan wrote:
>> Populate PAR in infoframe structure. If there is a user setting for PAR, then
>> that value is set. Else, value is taken from CEA mode list if VIC is found.
>> Else, PAR is calculated from resolution. If none of these conditions are
>> satisfied, PAR is NONE as per initialization.
>>
>> v2: Removed the part which sets PAR according to user input, based on
>> Daniel's review comments.
>>
>> A separate patch will be submitted to create a property that would enable a
>> user space app to set aspect ratio for AVI infoframe.
>>
>> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
>> Cc: Jesse Barnes <jesse.barnes@intel.com>
>> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Cc: intel-gfx@lists.freedesktop.org
>> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>> ---
>>  drivers/gpu/drm/drm_edid.c | 29 +++++++++++++++++++++++++++++
>>  include/drm/drm_crtc.h     |  1 +
>>  2 files changed, 30 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index d4e3f9d..fee24d3 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>>  }
>>  EXPORT_SYMBOL(drm_match_cea_mode);
>>  
>> +/**
>> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
>> + * the input VIC from the CEA mode list
>> + *
>> + * Returns picture aspect ratio
>> + */
>> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
>> +{
>> +	/* return picture aspect ratio for video_code - 1 to access the
>> +	 * right array element
>> +	*/
>> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
>> +}
>> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
>> +
>>  /*
>>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>>   * specific block).
>> @@ -3613,6 +3628,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>>  	frame->video_code = drm_match_cea_mode(mode);
>>  
>>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
>> +
>> +	/* Populate picture aspect ratio from CEA mode list */
>> +	if (frame->video_code > 0)
>> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
>> +						frame->video_code);
>> +	else {
>> +		if (!(mode->vdisplay % 3) &&
>> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
>> +		else if (!(mode->vdisplay % 9) &&
>> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
>> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
>> +	}
> 
> I'm not sure if providing the PAR for non-CEA modes like this makes
> any real difference. But I guess it can't hurt since you only provide
> it for exact matches.
> 
> But the matches are maybe even a bit too exact. For instance 1366x768
> will not match the 16:9 case. So maybe it should be calculated in a bit
> more relaxed way.
> 
> Or just dropped totally. I'm not sure.
> 
Maybe we can drop it for now (for this patch) and come up with another
patch containing calculations which are more relaxed than the above.
What do you think?
>> +
>>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>>  
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
>> index 27f828c..50dc55a 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>>  				    void *data, struct drm_file *file_priv);
>>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
>> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>>  extern bool drm_detect_monitor_audio(struct edid *edid);
>>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
>> -- 
>> 1.9.1
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 13:13               ` Vandana Kannan
@ 2014-04-01 13:54                 ` Ville Syrjälä
  2014-04-01 14:22                   ` [PATCH v3] " Vandana Kannan
  0 siblings, 1 reply; 15+ messages in thread
From: Ville Syrjälä @ 2014-04-01 13:54 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Barnes, Jesse, dri-devel

On Tue, Apr 01, 2014 at 06:43:42PM +0530, Vandana Kannan wrote:
> On Apr-01-2014 5:04 PM, Ville Syrjälä wrote:
> > On Tue, Apr 01, 2014 at 04:26:59PM +0530, Vandana Kannan wrote:
> >> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> >> that value is set. Else, value is taken from CEA mode list if VIC is found.
> >> Else, PAR is calculated from resolution. If none of these conditions are
> >> satisfied, PAR is NONE as per initialization.
> >>
> >> v2: Removed the part which sets PAR according to user input, based on
> >> Daniel's review comments.
> >>
> >> A separate patch will be submitted to create a property that would enable a
> >> user space app to set aspect ratio for AVI infoframe.
> >>
> >> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> >> Cc: Jesse Barnes <jesse.barnes@intel.com>
> >> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> Cc: intel-gfx@lists.freedesktop.org
> >> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >> ---
> >>  drivers/gpu/drm/drm_edid.c | 29 +++++++++++++++++++++++++++++
> >>  include/drm/drm_crtc.h     |  1 +
> >>  2 files changed, 30 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> >> index d4e3f9d..fee24d3 100644
> >> --- a/drivers/gpu/drm/drm_edid.c
> >> +++ b/drivers/gpu/drm/drm_edid.c
> >> @@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
> >>  }
> >>  EXPORT_SYMBOL(drm_match_cea_mode);
> >>  
> >> +/**
> >> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> >> + * the input VIC from the CEA mode list
> >> + *
> >> + * Returns picture aspect ratio
> >> + */
> >> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> >> +{
> >> +	/* return picture aspect ratio for video_code - 1 to access the
> >> +	 * right array element
> >> +	*/
> >> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> >> +}
> >> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> >> +
> >>  /*
> >>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
> >>   * specific block).
> >> @@ -3613,6 +3628,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
> >>  	frame->video_code = drm_match_cea_mode(mode);
> >>  
> >>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> >> +
> >> +	/* Populate picture aspect ratio from CEA mode list */
> >> +	if (frame->video_code > 0)
> >> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> >> +						frame->video_code);
> >> +	else {
> >> +		if (!(mode->vdisplay % 3) &&
> >> +			(((mode->vdisplay * 4) / 3) == mode->hdisplay))
> >> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_4_3;
> >> +		else if (!(mode->vdisplay % 9) &&
> >> +			(((mode->vdisplay * 16) / 9) == mode->hdisplay))
> >> +			frame->picture_aspect = HDMI_PICTURE_ASPECT_16_9;
> >> +	}
> > 
> > I'm not sure if providing the PAR for non-CEA modes like this makes
> > any real difference. But I guess it can't hurt since you only provide
> > it for exact matches.
> > 
> > But the matches are maybe even a bit too exact. For instance 1366x768
> > will not match the 16:9 case. So maybe it should be calculated in a bit
> > more relaxed way.
> > 
> > Or just dropped totally. I'm not sure.
> > 
> Maybe we can drop it for now (for this patch) and come up with another
> patch containing calculations which are more relaxed than the above.
> What do you think?

That's fine by me.

> >> +
> >>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> >>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> >>  
> >> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> >> index 27f828c..50dc55a 100644
> >> --- a/include/drm/drm_crtc.h
> >> +++ b/include/drm/drm_crtc.h
> >> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
> >>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
> >>  				    void *data, struct drm_file *file_priv);
> >>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> >> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
> >>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
> >>  extern bool drm_detect_monitor_audio(struct edid *edid);
> >>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> >> -- 
> >> 1.9.1
> > 

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 13:54                 ` Ville Syrjälä
@ 2014-04-01 14:22                   ` Vandana Kannan
  2014-04-01 15:37                     ` [PATCH v4] " Vandana Kannan
  2014-04-01 17:04                     ` [Intel-gfx] [PATCH v3] " Daniel Vetter
  0 siblings, 2 replies; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01 14:22 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Jesse Barnes

Populate PAR in infoframe structure. If there is a user setting for PAR, then
that value is set. Else, value is taken from CEA mode list if VIC is found.
Else, PAR is calculated from resolution. If none of these conditions are
satisfied, PAR is NONE as per initialization.

v2: Removed the part which sets PAR according to user input, based on
Daniel's review comments.

v3: Removed calculation of PAR for non-CEA modes as per discussion with
Ville.

A separate patch will be submitted to create a property that would enable a
user space app to set aspect ratio for AVI infoframe.

Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Cc: Jesse Barnes <jesse.barnes@intel.com>
Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_edid.c | 21 +++++++++++++++++++++
 include/drm/drm_crtc.h     |  1 +
 2 files changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d4e3f9d..09ece10 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2452,6 +2452,21 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
 }
 EXPORT_SYMBOL(drm_match_cea_mode);
 
+/**
+ * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
+ * the input VIC from the CEA mode list
+ *
+ * Returns picture aspect ratio
+ */
+enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+{
+	/* return picture aspect ratio for video_code - 1 to access the
+	 * right array element
+	*/
+	return edid_cea_modes[video_code-1].picture_aspect_ratio;
+}
+EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
+
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
  * specific block).
@@ -3613,6 +3628,12 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	frame->video_code = drm_match_cea_mode(mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
+
+	/* Populate picture aspect ratio from CEA mode list */
+	if (frame->video_code > 0)
+		frame->picture_aspect = drm_get_cea_aspect_ratio(
+						frame->video_code);
+
 	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
 	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 27f828c..50dc55a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 				    void *data, struct drm_file *file_priv);
 extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
+extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
 extern bool drm_detect_hdmi_monitor(struct edid *edid);
 extern bool drm_detect_monitor_audio(struct edid *edid);
 extern bool drm_rgb_quant_range_selectable(struct edid *edid);
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v4] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 14:22                   ` [PATCH v3] " Vandana Kannan
@ 2014-04-01 15:37                     ` Vandana Kannan
  2014-04-01 17:40                       ` Daniel Vetter
  2014-04-01 17:04                     ` [Intel-gfx] [PATCH v3] " Daniel Vetter
  1 sibling, 1 reply; 15+ messages in thread
From: Vandana Kannan @ 2014-04-01 15:37 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Vijay Purushothaman, Jesse Barnes, Wu, Fengguang

Populate PAR in infoframe structure. PAR is taken from CEA mode list if
VIC is found. Else, PAR is NONE as per initialization.

v2: Removed the part which sets PAR according to user input, based on
Daniel's review comments.

v3: Removed calculation of PAR for non-CEA modes as per discussion with
Ville.

v4: Added description for the param video_code. Absence of the description
led to a warning while executing "make htmldocs", as reported by
Wu, Fengguang.
Modified commit message.

A separate patch will be submitted to create a property that would enable a
user space app to set aspect ratio for AVI infoframe.

Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Cc: Jesse Barnes <jesse.barnes@intel.com>
Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: Wu, Fengguang <fengguang.wu@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/drm_edid.c | 22 ++++++++++++++++++++++
 include/drm/drm_crtc.h     |  1 +
 2 files changed, 23 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index d4e3f9d..b8d6c51 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2452,6 +2452,22 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
 }
 EXPORT_SYMBOL(drm_match_cea_mode);
 
+/**
+ * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
+ * the input VIC from the CEA mode list
+ * @video_code: ID given to each of the CEA modes
+ *
+ * Returns picture aspect ratio
+ */
+enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+{
+	/* return picture aspect ratio for video_code - 1 to access the
+	 * right array element
+	*/
+	return edid_cea_modes[video_code-1].picture_aspect_ratio;
+}
+EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
+
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
  * specific block).
@@ -3613,6 +3629,12 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	frame->video_code = drm_match_cea_mode(mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
+
+	/* Populate picture aspect ratio from CEA mode list */
+	if (frame->video_code > 0)
+		frame->picture_aspect = drm_get_cea_aspect_ratio(
+						frame->video_code);
+
 	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
 	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
 
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 27f828c..50dc55a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 				    void *data, struct drm_file *file_priv);
 extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
+extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
 extern bool drm_detect_hdmi_monitor(struct edid *edid);
 extern bool drm_detect_monitor_audio(struct edid *edid);
 extern bool drm_rgb_quant_range_selectable(struct edid *edid);
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 14:22                   ` [PATCH v3] " Vandana Kannan
  2014-04-01 15:37                     ` [PATCH v4] " Vandana Kannan
@ 2014-04-01 17:04                     ` Daniel Vetter
  1 sibling, 0 replies; 15+ messages in thread
From: Daniel Vetter @ 2014-04-01 17:04 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Jesse Barnes, dri-devel

On Tue, Apr 01, 2014 at 07:52:21PM +0530, Vandana Kannan wrote:
> Populate PAR in infoframe structure. If there is a user setting for PAR, then
> that value is set. Else, value is taken from CEA mode list if VIC is found.
> Else, PAR is calculated from resolution. If none of these conditions are
> satisfied, PAR is NONE as per initialization.
> 
> v2: Removed the part which sets PAR according to user input, based on
> Daniel's review comments.
> 
> v3: Removed calculation of PAR for non-CEA modes as per discussion with
> Ville.
> 
> A separate patch will be submitted to create a property that would enable a
> user space app to set aspect ratio for AVI infoframe.
> 
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Cc: Jesse Barnes <jesse.barnes@intel.com>
> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

I've pulled this into my topic/core-stuff branch so it doesn't get lost.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] drm/edid: Fill PAR in AVI infoframe based on CEA mode list
  2014-04-01 15:37                     ` [PATCH v4] " Vandana Kannan
@ 2014-04-01 17:40                       ` Daniel Vetter
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Vetter @ 2014-04-01 17:40 UTC (permalink / raw)
  To: Vandana Kannan; +Cc: intel-gfx, Wu, Fengguang, Jesse Barnes, dri-devel

On Tue, Apr 01, 2014 at 09:07:50PM +0530, Vandana Kannan wrote:
> Populate PAR in infoframe structure. PAR is taken from CEA mode list if
> VIC is found. Else, PAR is NONE as per initialization.
> 
> v2: Removed the part which sets PAR according to user input, based on
> Daniel's review comments.
> 
> v3: Removed calculation of PAR for non-CEA modes as per discussion with
> Ville.
> 
> v4: Added description for the param video_code. Absence of the description
> led to a warning while executing "make htmldocs", as reported by
> Wu, Fengguang.
> Modified commit message.
> 
> A separate patch will be submitted to create a property that would enable a
> user space app to set aspect ratio for AVI infoframe.
> 
> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
> Cc: Jesse Barnes <jesse.barnes@intel.com>
> Cc: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: intel-gfx@lists.freedesktop.org
> Cc: Wu, Fengguang <fengguang.wu@intel.com>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Applied. btw if I've merged a patch already I prefer a small fixup patch
on top of what I have to squash into the main patch.
-Daniel

> ---
>  drivers/gpu/drm/drm_edid.c | 22 ++++++++++++++++++++++
>  include/drm/drm_crtc.h     |  1 +
>  2 files changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index d4e3f9d..b8d6c51 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2452,6 +2452,22 @@ u8 drm_match_cea_mode(const struct drm_display_mode *to_match)
>  }
>  EXPORT_SYMBOL(drm_match_cea_mode);
>  
> +/**
> + * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
> + * the input VIC from the CEA mode list
> + * @video_code: ID given to each of the CEA modes
> + *
> + * Returns picture aspect ratio
> + */
> +enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
> +{
> +	/* return picture aspect ratio for video_code - 1 to access the
> +	 * right array element
> +	*/
> +	return edid_cea_modes[video_code-1].picture_aspect_ratio;
> +}
> +EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
> +
>  /*
>   * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
>   * specific block).
> @@ -3613,6 +3629,12 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>  	frame->video_code = drm_match_cea_mode(mode);
>  
>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> +
> +	/* Populate picture aspect ratio from CEA mode list */
> +	if (frame->video_code > 0)
> +		frame->picture_aspect = drm_get_cea_aspect_ratio(
> +						frame->video_code);
> +
>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
>  
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 27f828c..50dc55a 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -983,6 +983,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
>  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
>  				    void *data, struct drm_file *file_priv);
>  extern u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> +extern enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
>  extern bool drm_detect_hdmi_monitor(struct edid *edid);
>  extern bool drm_detect_monitor_audio(struct edid *edid);
>  extern bool drm_rgb_quant_range_selectable(struct edid *edid);
> -- 
> 1.9.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-04-01 17:40 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21  3:01 [PATCH] drm/edid: Fill PAR in AVI infoframe based on CEA mode list Vandana Kannan
2014-03-31 18:55 ` Jesse Barnes
2014-03-31 19:05 ` Daniel Vetter
2014-04-01  2:36   ` Vandana Kannan
2014-04-01  7:27     ` Daniel Vetter
2014-04-01  9:26       ` Vandana Kannan
2014-04-01  9:51         ` Daniel Vetter
2014-04-01 10:56           ` [PATCH v2] " Vandana Kannan
2014-04-01 11:34             ` Ville Syrjälä
2014-04-01 13:13               ` Vandana Kannan
2014-04-01 13:54                 ` Ville Syrjälä
2014-04-01 14:22                   ` [PATCH v3] " Vandana Kannan
2014-04-01 15:37                     ` [PATCH v4] " Vandana Kannan
2014-04-01 17:40                       ` Daniel Vetter
2014-04-01 17:04                     ` [Intel-gfx] [PATCH v3] " Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.