summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/i915_irq.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-04-21 16:31:10 +1000
committerDave Airlie <airlied@linux.ie>2008-04-26 17:48:54 +1000
commit7b832b56bd971348329c3f4c753ca0abfdf3a3d1 (patch)
tree38bcc4d42d03942ffc31c9024091fd7e2b75d5c0 /drivers/char/drm/i915_irq.c
parenta36b7dcc05bc4c4580f11cf78e95edfefa86b8a6 (diff)
drm/i915: Handle tiled buffers in vblank tasklet
The vblank tasklet update code must build 2D blt commands with the appropriate tiled flags Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/drm/i915_irq.c')
-rw-r--r--drivers/char/drm/i915_irq.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index 5a6f8309d8b..f7f16e7a8bf 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)
XY_SRC_COPY_BLT_WRITE_ALPHA |
XY_SRC_COPY_BLT_WRITE_RGB)
: XY_SRC_COPY_BLT_CMD;
- u32 pitchropcpp = (sarea_priv->pitch * cpp) | (0xcc << 16) |
- (cpp << 23) | (1 << 24);
+ u32 src_pitch = sarea_priv->pitch * cpp;
+ u32 dst_pitch = sarea_priv->pitch * cpp;
+ u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
RING_LOCALS;
+ if (sarea_priv->front_tiled) {
+ cmd |= XY_SRC_COPY_BLT_DST_TILED;
+ dst_pitch >>= 2;
+ }
+ if (sarea_priv->back_tiled) {
+ cmd |= XY_SRC_COPY_BLT_SRC_TILED;
+ src_pitch >>= 2;
+ }
+
DRM_DEBUG("\n");
INIT_LIST_HEAD(&hits);
@@ -194,12 +204,12 @@ static void i915_vblank_tasklet(struct drm_device *dev)
BEGIN_LP_RING(8);
OUT_RING(cmd);
- OUT_RING(pitchropcpp);
+ OUT_RING(ropcpp | dst_pitch);
OUT_RING((y1 << 16) | rect->x1);
OUT_RING((y2 << 16) | rect->x2);
OUT_RING(sarea_priv->front_offset);
OUT_RING((y1 << 16) | rect->x1);
- OUT_RING(pitchropcpp & 0xffff);
+ OUT_RING(src_pitch);
OUT_RING(sarea_priv->back_offset);
ADVANCE_LP_RING();