[Intel-gfx] [PATCH] drm: HDMI pixel replication modes now hactive of 720 for pixel replication

Daniel Vetter daniel at ffwll.ch
Wed Jul 30 12:47:31 CEST 2014


On Tue, Jul 29, 2014 at 02:58:23PM -0700, clinton.a.taylor at intel.com wrote:
> From: Clint Taylor <clinton.a.taylor at intel.com>
> 
> CEA SD interlaced modes use a horizontal 720 pixels that are pixel replicated to 1440. The current driver reports 1440 pixel to the OS and does not set pixel replicated modes.

Please wrap lines. Also the subject reads confusing to my non-native
speaker ears. Dunno what exactly you want to say in there.

> Signed-off-by: Clint Taylor <clinton.a.taylor at intel.com>

Patches touching drm core must be submitted to dri-devel, too. Please
resend.
-Daniel
> ---
>  drivers/gpu/drm/drm_edid.c        |   68 ++++++++++++++++++-------------------
>  drivers/gpu/drm/i915/intel_hdmi.c |   13 +++++++
>  2 files changed, 47 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index dfa9769..5233f4c 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -632,26 +632,26 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>  			DRM_MODE_FLAG_INTERLACE),
>  	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 6 - 1440x480i at 60Hz */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
> +	/* 6 - 720(1440)x480i at 60Hz */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 27000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 7 - 1440x480i at 60Hz */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
> +	/* 7 - 720(1440)x480i at 60Hz */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 27000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 8 - 1440x240 at 60Hz */
> -	{ DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
> +	/* 8 - 720(1440)x240 at 60Hz */
> +	{ DRM_MODE("720x240", DRM_MODE_TYPE_DRIVER, 27000, 720, 1478,
>  		   1602, 1716, 0, 240, 244, 247, 262, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 9 - 1440x240 at 60Hz */
> -	{ DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1478,
> +	/* 9 - 720(1440)x240 at 60Hz */
> +	{ DRM_MODE("720x240", DRM_MODE_TYPE_DRIVER, 27000, 720, 1478,
>  		   1602, 1716, 0, 240, 244, 247, 262, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_DBLCLK),
> @@ -714,26 +714,26 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
>  			DRM_MODE_FLAG_INTERLACE),
>  	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 21 - 1440x576i at 50Hz */
> -	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
> +	/* 21 - 720(1440)x576i at 50Hz */
> +	{ DRM_MODE("720x576i", DRM_MODE_TYPE_DRIVER, 27000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 22 - 1440x576i at 50Hz */
> -	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
> +	/* 22 - 720(1440)x576i at 50Hz */
> +	{ DRM_MODE("720x576i", DRM_MODE_TYPE_DRIVER, 27000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 23 - 1440x288 at 50Hz */
> -	{ DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
> +	/* 23 - 720(1440)x288 at 50Hz */
> +	{ DRM_MODE("720x288", DRM_MODE_TYPE_DRIVER, 27000, 720, 1464,
>  		   1590, 1728, 0, 288, 290, 293, 312, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 24 - 1440x288 at 50Hz */
> -	{ DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000, 1440, 1464,
> +	/* 24 - 720(1440)x288 at 50Hz */
> +	{ DRM_MODE("720x288", DRM_MODE_TYPE_DRIVER, 27000, 720, 1464,
>  		   1590, 1728, 0, 288, 290, 293, 312, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_DBLCLK),
> @@ -837,17 +837,17 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   796, 864, 0, 576, 581, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
>  	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 44 - 1440x576i at 100Hz */
> -	{ DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
> +	/* 44 - 720(1440)x576i at 100Hz */
> +	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
> -			DRM_MODE_FLAG_DBLCLK),
> +			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 45 - 1440x576i at 100Hz */
> -	{ DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1464,
> +	/* 45 - 720(1440)x576i at 100Hz */
> +	{ DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
> -			DRM_MODE_FLAG_DBLCLK),
> +			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
>  	/* 46 - 1920x1080i at 120Hz */
>  	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
> @@ -870,14 +870,14 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   798, 858, 0, 480, 489, 495, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
>  	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 50 - 1440x480i at 120Hz */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
> +	/* 50 - 720(1440)x480i at 120Hz */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 54000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 51 - 1440x480i at 120Hz */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000, 1440, 1478,
> +	/* 51 - 720(1440)x480i at 120Hz */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 54000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> @@ -892,14 +892,14 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   796, 864, 0, 576, 581, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
>  	  .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 54 - 1440x576i at 200Hz */
> -	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
> +	/* 54 - 720(1440)x576i at 200Hz */
> +	{ DRM_MODE("720x576i", DRM_MODE_TYPE_DRIVER, 108000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 200, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 55 - 1440x576i at 200Hz */
> -	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1464,
> +	/* 55 - 720(1440)x576i at 200Hz */
> +	{ DRM_MODE("720x576i", DRM_MODE_TYPE_DRIVER, 108000, 720, 1464,
>  		   1590, 1728, 0, 576, 580, 586, 625, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> @@ -914,14 +914,14 @@ static const struct drm_display_mode edid_cea_modes[] = {
>  		   798, 858, 0, 480, 489, 495, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
>  	  .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
> -	/* 58 - 1440x480i at 240 */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
> +	/* 58 - 720(1440)x480i at 240 */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 108000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
>  	  .vrefresh = 240, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
> -	/* 59 - 1440x480i at 240 */
> -	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000, 1440, 1478,
> +	/* 59 - 720(1440)x480i at 240 */
> +	{ DRM_MODE("720x480i", DRM_MODE_TYPE_DRIVER, 108000, 720, 1478,
>  		   1602, 1716, 0, 480, 488, 494, 525, 0,
>  		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC |
>  			DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLCLK),
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 2422413..f8cdf7f 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -918,6 +918,19 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
>  			intel_hdmi->color_range = 0;
>  	}
>  
> +	/* Adjust pipe timings for pixel doubled modes */
> +	if ((adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK)) {
> +		adjusted_mode->hsync_start /= 2;
> +		adjusted_mode->hsync_end /= 2;
> +		adjusted_mode->htotal /= 2;
> +
> +		drm_mode_set_crtcinfo(adjusted_mode, 0);
> +
> +		/* Set 2x pixel double on pipe */
> +		pipe_config->pixel_multiplier = 2;
> +		pipe_config->port_clock = adjusted_mode->crtc_clock;
> +	}
> +
>  	if (intel_hdmi->color_range)
>  		pipe_config->limited_color_range = true;
>  
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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



More information about the Intel-gfx mailing list