mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] DRM/i915: only use tiled blits on 965+
@ 2008-07-01 19:32 Jesse Barnes
  2008-07-01 20:41 ` Dave Airlie
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2008-07-01 19:32 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Dave Airlie, linux-kernel

When scheduled swaps occur, we need to blit between front & back buffers.  If
the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit,
but only on 965 chips, since it will cause corruption on pre-965 (e.g. 945).

Bug reported by and fix tested by Tomas Janousek <tomi@nomi.cz>.

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

diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index f7f16e7..df03611 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -62,11 +62,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
 	u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
 	RING_LOCALS;
 
-	if (sarea_priv->front_tiled) {
+	if (IS_I965G(dev) && sarea_priv->front_tiled) {
 		cmd |= XY_SRC_COPY_BLT_DST_TILED;
 		dst_pitch >>= 2;
 	}
-	if (sarea_priv->back_tiled) {
+	if (IS_I965G(dev) && sarea_priv->back_tiled) {
 		cmd |= XY_SRC_COPY_BLT_SRC_TILED;
 		src_pitch >>= 2;
 	}

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

* Re: [PATCH] DRM/i915: only use tiled blits on 965+
  2008-07-01 19:32 [PATCH] DRM/i915: only use tiled blits on 965+ Jesse Barnes
@ 2008-07-01 20:41 ` Dave Airlie
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2008-07-01 20:41 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: Linus Torvalds, linux-kernel


> When scheduled swaps occur, we need to blit between front & back buffers.  If
> the buffers are tiled, we need to set the appropriate XY_SRC_COPY tile bit,
> but only on 965 chips, since it will cause corruption on pre-965 (e.g. 945).
> 
> Bug reported by and fix tested by Tomas Janousek <tomi@nomi.cz>.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

Acked-by: Dave Airlie <airlied@linux.ie>

Linus please push for -final.

Dave.

> 
> diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
> index f7f16e7..df03611 100644
> --- a/drivers/char/drm/i915_irq.c
> +++ b/drivers/char/drm/i915_irq.c
> @@ -62,11 +62,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
>  	u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
>  	RING_LOCALS;
>  
> -	if (sarea_priv->front_tiled) {
> +	if (IS_I965G(dev) && sarea_priv->front_tiled) {
>  		cmd |= XY_SRC_COPY_BLT_DST_TILED;
>  		dst_pitch >>= 2;
>  	}
> -	if (sarea_priv->back_tiled) {
> +	if (IS_I965G(dev) && sarea_priv->back_tiled) {
>  		cmd |= XY_SRC_COPY_BLT_SRC_TILED;
>  		src_pitch >>= 2;
>  	}
> 
> 

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

end of thread, other threads:[~2008-07-01 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 19:32 [PATCH] DRM/i915: only use tiled blits on 965+ Jesse Barnes
2008-07-01 20:41 ` Dave Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome