From cf64c8ce758cfa5d3bcd1b7626ff94cce7a84636 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 27 Aug 2012 13:59:56 +0100 Subject: [PATCH] sna: Upload PutImage inplace to a fresh GPU bo if the device doesn't snoop Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 02d4b13c..4fbdd708 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -3221,7 +3221,12 @@ static bool upload_inplace(struct sna *sna, } } - DBG(("%s? no\n", __FUNCTION__)); + if (priv->create & (KGEM_CAN_CREATE_GPU | KGEM_CAN_CREATE_CPU) == KGEM_CAN_CREATE_GPU && + region_subsumes_drawable(region, &pixmap->drawable)) { + DBG(("%s? yes, will fill fresh GPU bo\n", __FUNCTION__)); + return true; + } + return false; }