aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/i915_drv.h2
-rw-r--r--drivers/char/drm/i915_irq.c18
2 files changed, 16 insertions, 4 deletions
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
index 675d88bda066..50cd68d6b6cc 100644
--- a/drivers/char/drm/i915_drv.h
+++ b/drivers/char/drm/i915_drv.h
@@ -566,6 +566,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
566#define XY_SRC_COPY_BLT_CMD ((2<<29)|(0x53<<22)|6) 566#define XY_SRC_COPY_BLT_CMD ((2<<29)|(0x53<<22)|6)
567#define XY_SRC_COPY_BLT_WRITE_ALPHA (1<<21) 567#define XY_SRC_COPY_BLT_WRITE_ALPHA (1<<21)
568#define XY_SRC_COPY_BLT_WRITE_RGB (1<<20) 568#define XY_SRC_COPY_BLT_WRITE_RGB (1<<20)
569#define XY_SRC_COPY_BLT_SRC_TILED (1<<15)
570#define XY_SRC_COPY_BLT_DST_TILED (1<<11)
569 571
570#define MI_BATCH_BUFFER ((0x30<<23)|1) 572#define MI_BATCH_BUFFER ((0x30<<23)|1)
571#define MI_BATCH_BUFFER_START (0x31<<23) 573#define MI_BATCH_BUFFER_START (0x31<<23)
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index 5a6f8309d8be..f7f16e7a8bf3 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -57,10 +57,20 @@ static void i915_vblank_tasklet(struct drm_device *dev)
57 XY_SRC_COPY_BLT_WRITE_ALPHA | 57 XY_SRC_COPY_BLT_WRITE_ALPHA |
58 XY_SRC_COPY_BLT_WRITE_RGB) 58 XY_SRC_COPY_BLT_WRITE_RGB)
59 : XY_SRC_COPY_BLT_CMD; 59 : XY_SRC_COPY_BLT_CMD;
60 u32 pitchropcpp = (sarea_priv->pitch * cpp) | (0xcc << 16) | 60 u32 src_pitch = sarea_priv->pitch * cpp;
61 (cpp << 23) | (1 << 24); 61 u32 dst_pitch = sarea_priv->pitch * cpp;
62 u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
62 RING_LOCALS; 63 RING_LOCALS;
63 64
65 if (sarea_priv->front_tiled) {
66 cmd |= XY_SRC_COPY_BLT_DST_TILED;
67 dst_pitch >>= 2;
68 }
69 if (sarea_priv->back_tiled) {
70 cmd |= XY_SRC_COPY_BLT_SRC_TILED;
71 src_pitch >>= 2;
72 }
73
64 DRM_DEBUG("\n"); 74 DRM_DEBUG("\n");
65 75
66 INIT_LIST_HEAD(&hits); 76 INIT_LIST_HEAD(&hits);
@@ -194,12 +204,12 @@ static void i915_vblank_tasklet(struct drm_device *dev)
194 BEGIN_LP_RING(8); 204 BEGIN_LP_RING(8);
195 205
196 OUT_RING(cmd); 206 OUT_RING(cmd);
197 OUT_RING(pitchropcpp); 207 OUT_RING(ropcpp | dst_pitch);
198 OUT_RING((y1 << 16) | rect->x1); 208 OUT_RING((y1 << 16) | rect->x1);
199 OUT_RING((y2 << 16) | rect->x2); 209 OUT_RING((y2 << 16) | rect->x2);
200 OUT_RING(sarea_priv->front_offset); 210 OUT_RING(sarea_priv->front_offset);
201 OUT_RING((y1 << 16) | rect->x1); 211 OUT_RING((y1 << 16) | rect->x1);
202 OUT_RING(pitchropcpp & 0xffff); 212 OUT_RING(src_pitch);
203 OUT_RING(sarea_priv->back_offset); 213 OUT_RING(sarea_priv->back_offset);
204 214
205 ADVANCE_LP_RING(); 215 ADVANCE_LP_RING();