diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-04 09:55:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-04 09:55:04 +0100 |
commit | e64d14d7bc72fe7b150e5427feeb1a163ec600a7 (patch) | |
tree | 422e4c282d2d641018a06ca77c78cbfa86bf4747 /src/sna | |
parent | 4e12d5ca26bdfafd7b9cd02c36e6d991f068f29b (diff) | |
download | xf86-video-intel-e64d14d7bc72fe7b150e5427feeb1a163ec600a7.tar.gz xf86-video-intel-e64d14d7bc72fe7b150e5427feeb1a163ec600a7.tar.bz2 xf86-video-intel-e64d14d7bc72fe7b150e5427feeb1a163ec600a7.zip |
sna: Tighten assertions for using upload proxies concurrently with CPU reads
After relaxing some of the rules on when to discard the upload proxies,
we also need to relax some of the complementary asserts.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_accel.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index c58f17768..0475f1ebd 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2198,7 +2198,7 @@ skip_inplace_map: } } - assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL); + assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); if (operate_inplace(priv, flags) && pixmap_inplace(sna, pixmap, priv, flags) && @@ -2206,8 +2206,10 @@ skip_inplace_map: void *ptr; DBG(("%s: try to operate inplace (GTT)\n", __FUNCTION__)); + assert(priv->gpu_bo); assert(priv->cow == NULL || (flags & MOVE_WRITE) == 0); assert(!priv->move_to_gpu); + assert(priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); assert((flags & MOVE_READ) == 0 || priv->cpu_damage == NULL); /* XXX only sync for writes? */ kgem_bo_submit(&sna->kgem, priv->gpu_bo); @@ -2247,8 +2249,10 @@ skip_inplace_map: void *ptr; DBG(("%s: try to operate inplace (CPU)\n", __FUNCTION__)); + assert(priv->gpu_bo); assert(priv->cow == NULL || (flags & MOVE_WRITE) == 0); assert(priv->move_to_gpu == NULL || (flags & MOVE_WRITE) == 0); + assert(priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); assert(!priv->mapped); assert(priv->gpu_bo->tiling == I915_TILING_NONE); @@ -2686,6 +2690,8 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, } } + assert(priv->gpu_bo == NULL || priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); + if (get_drawable_deltas(drawable, pixmap, &dx, &dy)) { DBG(("%s: delta=(%d, %d)\n", __FUNCTION__, dx, dy)); RegionTranslate(region, dx, dy); @@ -2697,8 +2703,10 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, void *ptr; DBG(("%s: try to operate inplace\n", __FUNCTION__)); + assert(priv->gpu_bo); assert(priv->cow == NULL || (flags & MOVE_WRITE) == 0); assert(priv->move_to_gpu == NULL || (flags & MOVE_WRITE) == 0); + assert(priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); /* XXX only sync for writes? */ kgem_bo_submit(&sna->kgem, priv->gpu_bo); @@ -2776,6 +2784,8 @@ move_to_cpu: DBG(("%s: try to operate inplace (CPU), read? %d, write? %d\n", __FUNCTION__, !!(flags & MOVE_READ), !!(flags & MOVE_WRITE))); + assert(priv->gpu_bo); + assert(priv->gpu_bo->proxy == NULL || (flags & MOVE_WRITE) == 0); assert(sna_damage_contains_box(&priv->gpu_damage, ®ion->extents) == PIXMAN_REGION_IN); assert(sna_damage_contains_box(&priv->cpu_damage, ®ion->extents) == PIXMAN_REGION_OUT); |