From 9ae82134ad14085e80d93592e155978a5056f44a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 11 Apr 2014 18:36:16 +0100 Subject: sna: Restrict WHOLE hint to PutImage on a complete Pixmap Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 8014b5c1..50b46725 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2501,8 +2501,9 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, if (USE_INPLACE && (priv->create & KGEM_CAN_CREATE_LARGE || ((flags & (MOVE_READ | MOVE_ASYNC_HINT)) == 0 && - (priv->flush || box_inplace(pixmap, ®ion->extents))) || - (flags & MOVE_WHOLE_HINT && whole_pixmap_inplace(pixmap)))) { + (priv->flush || + (flags & MOVE_WHOLE_HINT && whole_pixmap_inplace(pixmap)) || + box_inplace(pixmap, ®ion->extents))))) { DBG(("%s: marking for inplace hint (%d, %d)\n", __FUNCTION__, priv->flush, box_inplace(pixmap, ®ion->extents))); flags |= MOVE_INPLACE_HINT; @@ -4645,7 +4646,9 @@ sna_put_zpixmap_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region, return true; hint = MOVE_WRITE; - if (region_is_unclipped(region, w, h) && (h+1)*stride > 65536) { + if (region_is_unclipped(region, w, h) && + w == pixmap->drawable.width && + (h+1)*stride > 65536) { DBG(("%s: segmented, unclipped large upload (%d bytes), marking WHOLE_HINT\n", __FUNCTION__, h*stride)); hint |= MOVE_WHOLE_HINT; -- cgit v1.2.3