From 0782d4e57e4ba33aee30925ad276ee4a1ec15feb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 19 Nov 2013 12:01:33 +0000 Subject: [PATCH] sna: Correct check for overwriting last BLT fill Typo crept in from the reloc rework. Signed-off-by: Chris Wilson --- src/sna/sna_blt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 63153b7..48a7cf6 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -3270,7 +3270,7 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu, } } else { if (kgem->nbatch >= 6 && - kgem->batch[kgem->nbatch-7] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) && + kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) && 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))) { DBG(("%s: deleting last fill\n", __FUNCTION__)); @@ -3605,7 +3605,7 @@ bool sna_blt_copy_boxes__with_alpha(struct sna *sna, uint8_t alu, } } else { if (kgem->nbatch >= 6 && - kgem->batch[kgem->nbatch-7] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) && + kgem->batch[kgem->nbatch-6] == (XY_COLOR_BLT | (cmd & (BLT_WRITE_ALPHA | BLT_WRITE_RGB)) | 4) && 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))) { DBG(("%s: deleting last fill\n", __FUNCTION__)); -- 2.7.4