diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-22 12:05:04 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-02-22 12:13:27 +0000 |
commit | 19bd005056a2083de64753681b96716996e4237d (patch) | |
tree | ea3cb9874ae7fe237876e9dbf772b925f92225bf | |
parent | afb77ffadedf6c6f9321dde1d650004714accdc4 (diff) |
sna: Avoid migrating and making the GPU bo busy prior to mmapping it
References: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1131134
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 802fd194..b9e37f18 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1625,11 +1625,10 @@ skip_inplace_map: priv->mapped = false; } - if (priv->gpu_damage && + if (priv->gpu_damage && priv->cpu_damage == NULL && ((flags & MOVE_ASYNC_HINT) == 0 || !__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo)) && - priv->gpu_bo->tiling == I915_TILING_NONE && - sna_pixmap_move_to_gpu(pixmap, MOVE_READ)) { + priv->gpu_bo->tiling == I915_TILING_NONE) { kgem_bo_submit(&sna->kgem, priv->gpu_bo); DBG(("%s: try to operate inplace (CPU)\n", __FUNCTION__)); @@ -1653,7 +1652,8 @@ skip_inplace_map: } kgem_bo_sync__cpu_full(&sna->kgem, - priv->gpu_bo, flags & MOVE_WRITE); + priv->gpu_bo, + flags & MOVE_WRITE); assert_pixmap_damage(pixmap); DBG(("%s: operate inplace (CPU)\n", __FUNCTION__)); return true; |