[Intel-gfx] [PATCH 15/15] drm/i915/tv: Filter out >1024 wide modes that would need vertical scaling on gen3

Imre Deak imre.deak at intel.com
Wed Jan 23 13:49:42 UTC 2019


On Mon, Nov 12, 2018 at 07:00:00PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Since gen3 can't handle >1024 wide sources with vertical scaling
> let's not advertize such modes in the mode list. Less tempetation
> to the user to try out things that won't work.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Imre Deak <imre.deak at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_tv.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
> index 7099d837e31a..89c537839273 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1738,6 +1738,7 @@ intel_tv_set_mode_type(struct drm_display_mode *mode,
>  static int
>  intel_tv_get_modes(struct drm_connector *connector)
>  {
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
>  	const struct tv_mode *tv_mode = intel_tv_mode_find(connector->state);
>  	int i, count = 0;
>  
> @@ -1750,6 +1751,11 @@ intel_tv_get_modes(struct drm_connector *connector)
>  		    !tv_mode->component_only)
>  			continue;
>  
> +		/* no vertical scaling with wide sources on gen3 */
> +		if (IS_GEN3(dev_priv) && input->w > 1024 &&
> +		    input->h > intel_tv_mode_vdisplay(tv_mode))
> +			continue;
> +
>  		mode = drm_mode_create(connector->dev);
>  		if (!mode)
>  			continue;
> -- 
> 2.18.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list