All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix lvds/dp panel fitter setting
@ 2013-08-27  9:24 Imre Deak
  2013-08-27 11:15 ` Daniel Vetter
  2013-08-28 15:27 ` Mika Kuoppala
  0 siblings, 2 replies; 4+ messages in thread
From: Imre Deak @ 2013-08-27  9:24 UTC (permalink / raw)
  To: intel-gfx

If need to enable the panel fitter, the crtc timings have to be
programmed according to the panel's native (fixed) mode. This isn't the
case atm, since after the encoder changes adjusted_mode to fixed
mode the crtc_* timing fields of adjusted_mode will stay at their original
non-native values that the user passed in. This results in a corrupted
output.

One exception is when we have a second pass of computing encoder configs
due to bandwidth limitation, since then we'll set adjusted_mode.crtc_*
fields to the fixed mode values set in the first pass; so in this case
things will work out.

Fix this by updating the adjusted_mode.crtc_* fields when we set the
fixed panel mode.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_panel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a43c33b..913cb9d 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -50,6 +50,8 @@ intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
 	adjusted_mode->vtotal = fixed_mode->vtotal;
 
 	adjusted_mode->clock = fixed_mode->clock;
+
+	drm_mode_set_crtcinfo(adjusted_mode, 0);
 }
 
 /* adjusted_mode has been preset to be the panel's fixed mode */
-- 
1.8.3.2

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

* Re: [PATCH] drm/i915: fix lvds/dp panel fitter setting
  2013-08-27  9:24 [PATCH] drm/i915: fix lvds/dp panel fitter setting Imre Deak
@ 2013-08-27 11:15 ` Daniel Vetter
  2013-08-28 15:27 ` Mika Kuoppala
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-08-27 11:15 UTC (permalink / raw)
  To: Imre Deak; +Cc: intel-gfx

On Tue, Aug 27, 2013 at 12:24:09PM +0300, Imre Deak wrote:
> If need to enable the panel fitter, the crtc timings have to be
> programmed according to the panel's native (fixed) mode. This isn't the
> case atm, since after the encoder changes adjusted_mode to fixed
> mode the crtc_* timing fields of adjusted_mode will stay at their original
> non-native values that the user passed in. This results in a corrupted
> output.
> 
> One exception is when we have a second pass of computing encoder configs
> due to bandwidth limitation, since then we'll set adjusted_mode.crtc_*
> fields to the fixed mode values set in the first pass; so in this case
> things will work out.
> 
> Fix this by updating the adjusted_mode.crtc_* fields when we set the
> fixed panel mode.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

This regression has been introduced in

commit 21d8a4756af5fdf4a42e79a77cf3b6f52678d443
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Jul 12 08:07:30 2013 +0200

    drm/i915: fix pfit regression for non-autoscaled resolutions

> ---
>  drivers/gpu/drm/i915/intel_panel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index a43c33b..913cb9d 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -50,6 +50,8 @@ intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
>  	adjusted_mode->vtotal = fixed_mode->vtotal;
>  
>  	adjusted_mode->clock = fixed_mode->clock;
> +
> +	drm_mode_set_crtcinfo(adjusted_mode, 0);
>  }
>  
>  /* adjusted_mode has been preset to be the panel's fixed mode */
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@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

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

* Re: [PATCH] drm/i915: fix lvds/dp panel fitter setting
  2013-08-27  9:24 [PATCH] drm/i915: fix lvds/dp panel fitter setting Imre Deak
  2013-08-27 11:15 ` Daniel Vetter
@ 2013-08-28 15:27 ` Mika Kuoppala
  2013-08-28 16:48   ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Mika Kuoppala @ 2013-08-28 15:27 UTC (permalink / raw)
  To: Imre Deak, intel-gfx

Imre Deak <imre.deak@intel.com> writes:

> If need to enable the panel fitter, the crtc timings have to be
> programmed according to the panel's native (fixed) mode. This isn't the
> case atm, since after the encoder changes adjusted_mode to fixed
> mode the crtc_* timing fields of adjusted_mode will stay at their original
> non-native values that the user passed in. This results in a corrupted
> output.
>
> One exception is when we have a second pass of computing encoder configs
> due to bandwidth limitation, since then we'll set adjusted_mode.crtc_*
> fields to the fixed mode values set in the first pass; so in this case
> things will work out.
>
> Fix this by updating the adjusted_mode.crtc_* fields when we set the
> fixed panel mode.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Daniel, the commit that regressed seem to be
135c81b8c3c9a70d7b55758c9c2a247a4abb7b64 instead of
21d8a4756af5fdf4a42e79a77cf3b6f52678d443.

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_panel.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index a43c33b..913cb9d 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -50,6 +50,8 @@ intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
>  	adjusted_mode->vtotal = fixed_mode->vtotal;
>  
>  	adjusted_mode->clock = fixed_mode->clock;
> +
> +	drm_mode_set_crtcinfo(adjusted_mode, 0);
>  }
>  
>  /* adjusted_mode has been preset to be the panel's fixed mode */
> -- 
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: fix lvds/dp panel fitter setting
  2013-08-28 15:27 ` Mika Kuoppala
@ 2013-08-28 16:48   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-08-28 16:48 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Wed, Aug 28, 2013 at 06:27:16PM +0300, Mika Kuoppala wrote:
> Imre Deak <imre.deak@intel.com> writes:
> 
> > If need to enable the panel fitter, the crtc timings have to be
> > programmed according to the panel's native (fixed) mode. This isn't the
> > case atm, since after the encoder changes adjusted_mode to fixed
> > mode the crtc_* timing fields of adjusted_mode will stay at their original
> > non-native values that the user passed in. This results in a corrupted
> > output.
> >
> > One exception is when we have a second pass of computing encoder configs
> > due to bandwidth limitation, since then we'll set adjusted_mode.crtc_*
> > fields to the fixed mode values set in the first pass; so in this case
> > things will work out.
> >
> > Fix this by updating the adjusted_mode.crtc_* fields when we set the
> > fixed panel mode.
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> 
> Daniel, the commit that regressed seem to be
> 135c81b8c3c9a70d7b55758c9c2a247a4abb7b64 instead of
> 21d8a4756af5fdf4a42e79a77cf3b6f52678d443.
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

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

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

end of thread, other threads:[~2013-08-28 16:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  9:24 [PATCH] drm/i915: fix lvds/dp panel fitter setting Imre Deak
2013-08-27 11:15 ` Daniel Vetter
2013-08-28 15:27 ` Mika Kuoppala
2013-08-28 16:48   ` 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.