All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/sprite: Always enable the scaler on IronLake
@ 2012-04-14 21:14 Chris Wilson
  2012-04-16 15:00 ` Jesse Barnes
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2012-04-14 21:14 UTC (permalink / raw)
  To: intel-gfx

As I do not see the output update without the scaler enabled on my
i3-330m, always enable it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_sprite.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index a831b7d..1baa903 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -236,7 +236,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_plane *intel_plane = to_intel_plane(plane);
 	int pipe = intel_plane->pipe, pixel_size;
-	u32 dvscntr, dvsscale = 0;
+	u32 dvscntr, dvsscale;
 
 	dvscntr = I915_READ(DVSCNTR(pipe));
 
@@ -292,7 +292,8 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
 
 	intel_update_sprite_watermarks(dev, pipe, crtc_w, pixel_size);
 
-	if (crtc_w != src_w || crtc_h != src_h)
+	dvsscale = 0;
+	if (IS_GEN5(dev) || crtc_w != src_w || crtc_h != src_h)
 		dvsscale = DVS_SCALE_ENABLE | (src_w << 16) | src_h;
 
 	I915_WRITE(DVSSTRIDE(pipe), fb->pitches[0]);
-- 
1.7.10

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

* Re: [PATCH] drm/i915/sprite: Always enable the scaler on IronLake
  2012-04-14 21:14 [PATCH] drm/i915/sprite: Always enable the scaler on IronLake Chris Wilson
@ 2012-04-16 15:00 ` Jesse Barnes
  2012-04-16 15:14   ` Chris Wilson
  2012-04-16 17:01   ` Daniel Vetter
  0 siblings, 2 replies; 5+ messages in thread
From: Jesse Barnes @ 2012-04-16 15:00 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sat, 14 Apr 2012 22:14:26 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> As I do not see the output update without the scaler enabled on my
> i3-330m, always enable it.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index a831b7d..1baa903 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -236,7 +236,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct intel_plane *intel_plane = to_intel_plane(plane);
>  	int pipe = intel_plane->pipe, pixel_size;
> -	u32 dvscntr, dvsscale = 0;
> +	u32 dvscntr, dvsscale;
>  
>  	dvscntr = I915_READ(DVSCNTR(pipe));
>  
> @@ -292,7 +292,8 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
>  
>  	intel_update_sprite_watermarks(dev, pipe, crtc_w, pixel_size);
>  
> -	if (crtc_w != src_w || crtc_h != src_h)
> +	dvsscale = 0;
> +	if (IS_GEN5(dev) || crtc_w != src_w || crtc_h != src_h)
>  		dvsscale = DVS_SCALE_ENABLE | (src_w << 16) | src_h;
>  
>  	I915_WRITE(DVSSTRIDE(pipe), fb->pitches[0]);

Funky... do you notice any difference in output (fuzziness or anything)
with the scaler enabled?  Wonder if it's safe to enable for 1:1 scaling
on SNB as well.

Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915/sprite: Always enable the scaler on IronLake
  2012-04-16 15:00 ` Jesse Barnes
@ 2012-04-16 15:14   ` Chris Wilson
  2012-04-16 15:54     ` Jesse Barnes
  2012-04-16 17:01   ` Daniel Vetter
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2012-04-16 15:14 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Mon, 16 Apr 2012 08:00:17 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Funky... do you notice any difference in output (fuzziness or anything)
> with the scaler enabled?  Wonder if it's safe to enable for 1:1 scaling
> on SNB as well.

Hard to tell. Without the scaler being enabled, it is black. :)

The content I was using was regular compressed mpeg-ts, so not the best
for juding aesthetic quality. We'd have to render some test geometry,
such as testdisplay to be sure. (testplanes? ;)

The docs do suggest that we disable the scaler to save power, so
probably best if we keep the code as is.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

* Re: [PATCH] drm/i915/sprite: Always enable the scaler on IronLake
  2012-04-16 15:14   ` Chris Wilson
@ 2012-04-16 15:54     ` Jesse Barnes
  0 siblings, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2012-04-16 15:54 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Mon, 16 Apr 2012 16:14:25 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Mon, 16 Apr 2012 08:00:17 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > Funky... do you notice any difference in output (fuzziness or anything)
> > with the scaler enabled?  Wonder if it's safe to enable for 1:1 scaling
> > on SNB as well.
> 
> Hard to tell. Without the scaler being enabled, it is black. :)

Oh I misread "doesn't update" as "you only see the first frame".  I
guess we can compare on SNB at least and potentially enable the scaler
all the time.

> The content I was using was regular compressed mpeg-ts, so not the best
> for juding aesthetic quality. We'd have to render some test geometry,
> such as testdisplay to be sure. (testplanes? ;)

There's a sprite_on test in there somewhere, but a new testplanes
wouldn't hurt.

> The docs do suggest that we disable the scaler to save power, so
> probably best if we keep the code as is.

Ok, sounds good.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915/sprite: Always enable the scaler on IronLake
  2012-04-16 15:00 ` Jesse Barnes
  2012-04-16 15:14   ` Chris Wilson
@ 2012-04-16 17:01   ` Daniel Vetter
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2012-04-16 17:01 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Mon, Apr 16, 2012 at 08:00:17AM -0700, Jesse Barnes wrote:
> On Sat, 14 Apr 2012 22:14:26 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 
> > As I do not see the output update without the scaler enabled on my
> > i3-330m, always enable it.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> >  drivers/gpu/drm/i915/intel_sprite.c |    5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> > index a831b7d..1baa903 100644
> > --- a/drivers/gpu/drm/i915/intel_sprite.c
> > +++ b/drivers/gpu/drm/i915/intel_sprite.c
> > @@ -236,7 +236,7 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  	struct intel_plane *intel_plane = to_intel_plane(plane);
> >  	int pipe = intel_plane->pipe, pixel_size;
> > -	u32 dvscntr, dvsscale = 0;
> > +	u32 dvscntr, dvsscale;
> >  
> >  	dvscntr = I915_READ(DVSCNTR(pipe));
> >  
> > @@ -292,7 +292,8 @@ ilk_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb,
> >  
> >  	intel_update_sprite_watermarks(dev, pipe, crtc_w, pixel_size);
> >  
> > -	if (crtc_w != src_w || crtc_h != src_h)
> > +	dvsscale = 0;
> > +	if (IS_GEN5(dev) || crtc_w != src_w || crtc_h != src_h)
> >  		dvsscale = DVS_SCALE_ENABLE | (src_w << 16) | src_h;
> >  
> >  	I915_WRITE(DVSSTRIDE(pipe), fb->pitches[0]);
> 
> Funky... do you notice any difference in output (fuzziness or anything)
> with the scaler enabled?  Wonder if it's safe to enable for 1:1 scaling
> on SNB as well.
> 
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

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

end of thread, other threads:[~2012-04-16 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14 21:14 [PATCH] drm/i915/sprite: Always enable the scaler on IronLake Chris Wilson
2012-04-16 15:00 ` Jesse Barnes
2012-04-16 15:14   ` Chris Wilson
2012-04-16 15:54     ` Jesse Barnes
2012-04-16 17:01   ` 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.