[Bug 80560] 62102f505cd13840e4 causes icon corruption in thunar
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Jun 28 13:12:17 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=80560
--- Comment #21 from Chris Wilson <chris at chris-wilson.co.uk> ---
I think I understand the bug now. I changed the transfer from GPU bo to CPU bo
paths, but missed that implied a change in synchronisation requirement. This
fixes the bug, but I want to see if I can choose the allocation flags more
accurately before committing;
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index dd5c108..6efc5f3 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2157,7 +2157,8 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int
flags)
skip_inplace_map:
sna_damage_destroy(&priv->gpu_damage);
priv->clear = false;
- if (priv->cpu_bo && !priv->cpu_bo->flush &&
+ if ((flags & MOVE_ASYNC_HINT) == 0 &&
+ priv->cpu_bo && !priv->cpu_bo->flush &&
__kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) {
DBG(("%s: discarding busy CPU bo\n", __FUNCTION__));
assert(!priv->shm);
@@ -2269,8 +2270,8 @@ skip_inplace_map:
assert(priv->mapped == MAPPED_NONE);
if (pixmap->devPrivate.ptr == NULL &&
- !sna_pixmap_alloc_cpu(sna, pixmap, priv,
- flags & MOVE_READ ? priv->gpu_damage &&
!priv->clear : 0))
+ !sna_pixmap_alloc_cpu(sna, pixmap, priv, 0))
+ //((flags & (MOVE_READ | MOVE_ASYNC_HINT)) ==
MOVE_READ) ? priv->gpu_damage && !priv->clear : 0))
return false;
assert(priv->mapped == MAPPED_NONE);
assert(pixmap->devPrivate.ptr == PTR(priv->ptr));
@@ -2594,7 +2595,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
sna_pixmap_unmap(pixmap, priv);
assert(priv->mapped == MAPPED_NONE);
if (pixmap->devPrivate.ptr == NULL &&
- !sna_pixmap_alloc_cpu(sna, pixmap, priv, false))
+ !sna_pixmap_alloc_cpu(sna, pixmap, priv, flags &
MOVE_ASYNC_HINT))
return false;
assert(priv->mapped == MAPPED_NONE);
assert(pixmap->devPrivate.ptr == PTR(priv->ptr));
@@ -2780,8 +2781,8 @@ move_to_cpu:
assert(priv->mapped == MAPPED_NONE);
if (pixmap->devPrivate.ptr == NULL &&
- !sna_pixmap_alloc_cpu(sna, pixmap, priv,
- flags & MOVE_READ ? priv->gpu_damage &&
!priv->clear : 0)) {
+ !sna_pixmap_alloc_cpu(sna, pixmap, priv, 0)) {
+ //flags & MOVE_READ ? priv->gpu_damage &&
!priv->clear : 0)) {
DBG(("%s: CPU bo allocation failed, trying full move-to-cpu\n",
__FUNCTION__));
goto move_to_cpu;
}
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20140628/62c9353b/attachment.html>
More information about the intel-gfx-bugs
mailing list