summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-07-29 09:42:26 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2015-07-29 09:45:50 +0100
commit4246c63347290390a2104739c719f5ff6a05a0e2 (patch)
tree2d39d111a05dfad0b6fe0026c66fe46d15249de4
parent66e16d97ee29595922cd7e38f172ffcc4b87724e (diff)
sna: Fix off by one in constructing XCopyPlane on bdw
Broadwell expanded all the relocations and we needed to adjust our command construction to match. I missed offsetting the XY_SRC_COPY_IMM used for XCopyPlane resulting in garbage for small copies on Broadwell. Reported-by: Omar Sandoval Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91499 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 38ca366a..a816b772 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -8349,6 +8349,8 @@ sna_copy_bitmap_blt(DrawablePtr _bitmap, DrawablePtr drawable, GCPtr gc,
}
br13 |= blt_depth(drawable->depth) << 24;
br13 |= copy_ROP[gc->alu] << 16;
+ DBG(("%s: target-depth=%d, alu=%d, bg=%08x, fg=%08x\n",
+ __FUNCTION__, drawable->depth, gc->alu, gc->bgPixel, gc->fgPixel));
kgem_set_mode(&sna->kgem, KGEM_BLT, arg->bo);
assert(kgem_bo_can_blt(&sna->kgem, arg->bo));
@@ -8397,8 +8399,8 @@ sna_copy_bitmap_blt(DrawablePtr _bitmap, DrawablePtr drawable, GCPtr gc,
I915_GEM_DOMAIN_RENDER |
KGEM_RELOC_FENCED,
0);
- b[5] = gc->bgPixel;
- b[6] = gc->fgPixel;
+ b[6] = gc->bgPixel;
+ b[7] = gc->fgPixel;
dst = (uint8_t *)&b[8];
sna->kgem.nbatch += 8 + src_stride;