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

2019-01-23 Thread Imre Deak
On Mon, Nov 12, 2018 at 07:00:00PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> 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ä 

Reviewed-by: Imre Deak 

> ---
>  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-...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-11-12 Thread Ville Syrjala
From: Ville Syrjälä 

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ä 
---
 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

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel