summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-13 14:23:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-13 14:23:54 +0000
commite646047a563598948206167765eaaf4192cfd77f (patch)
treea9060ef53634101f657678083fd3da0b542ce49a
parent4f96439e39a4bf4b127af9ccfdc09d061caff9bd (diff)
sna: Fix up BLT overwrite detection to use target_handle
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_blt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index e9ca0dd6..fb560d5b 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -433,7 +433,7 @@ static void sna_blt_copy_one(struct sna *sna,
kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (blt->cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB))) &&
kgem->batch[kgem->nbatch-4] == ((uint32_t)dst_y << 16 | (uint16_t)dst_x) &&
kgem->batch[kgem->nbatch-3] == ((uint32_t)(dst_y+height) << 16 | (uint16_t)(dst_x+width)) &&
- kgem->reloc[kgem->nreloc-1].target_handle == blt->bo[1]->handle) {
+ kgem->reloc[kgem->nreloc-1].target_handle == blt->bo[1]->target_handle) {
DBG(("%s: replacing last fill\n", __FUNCTION__));
if (kgem_check_batch(kgem, 8-6)) {
b = kgem->batch + kgem->nbatch - 6;
@@ -2231,7 +2231,7 @@ static bool sna_blt_fill_box(struct sna *sna, uint8_t alu,
if (overwrites && kgem->nbatch >= 6 &&
kgem->batch[kgem->nbatch-6] == cmd &&
*(uint64_t *)&kgem->batch[kgem->nbatch-4] == *(const uint64_t *)box &&
- kgem->reloc[kgem->nreloc-1].target_handle == bo->handle) {
+ kgem->reloc[kgem->nreloc-1].target_handle == bo->target_handle) {
DBG(("%s: replacing last fill\n", __FUNCTION__));
kgem->batch[kgem->nbatch-5] = br13;
kgem->batch[kgem->nbatch-1] = color;
@@ -2240,7 +2240,7 @@ static bool sna_blt_fill_box(struct sna *sna, uint8_t alu,
if (overwrites && kgem->nbatch >= 8 &&
(kgem->batch[kgem->nbatch-8] & 0xffc0000f) == XY_SRC_COPY_BLT_CMD &&
*(uint64_t *)&kgem->batch[kgem->nbatch-6] == *(const uint64_t *)box &&
- kgem->reloc[kgem->nreloc-2].target_handle == bo->handle) {
+ kgem->reloc[kgem->nreloc-2].target_handle == bo->target_handle) {
DBG(("%s: replacing last copy\n", __FUNCTION__));
kgem->batch[kgem->nbatch-8] = cmd;
kgem->batch[kgem->nbatch-7] = br13;
@@ -2503,7 +2503,7 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
/* Compare first box against a previous fill */
if (kgem->nbatch >= 6 &&
(alu == GXcopy || alu == GXclear || alu == GXset) &&
- kgem->reloc[kgem->nreloc-1].target_handle == dst_bo->handle &&
+ kgem->reloc[kgem->nreloc-1].target_handle == dst_bo->target_handle &&
kgem->batch[kgem->nbatch-6] == ((cmd & ~XY_SRC_COPY_BLT_CMD) | XY_COLOR_BLT) &&
kgem->batch[kgem->nbatch-4] == ((uint32_t)(box->y1 + dst_dy) << 16 | (uint16_t)(box->x1 + dst_dx)) &&
kgem->batch[kgem->nbatch-3] == ((uint32_t)(box->y2 + dst_dy) << 16 | (uint16_t)(box->x2 + dst_dx))) {