diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-16 23:20:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-16 23:27:32 +0100 |
commit | d141a2d59007866c9eaad020c744be446e70c346 (patch) | |
tree | d9357029709a5d09a9199abc4d6be27b01c9ac91 /src/sna | |
parent | 107feed2a4ca044313c70f83a62909187ff1f905 (diff) |
sna: Disable snoopable bo for gen4
Further inspection reveals that whilst it may not hang the GPU, the
results are not pleasant or complete.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 15 | ||||
-rw-r--r-- | src/sna/sna_render.c | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index d6ed4e0b..d30b8e7a 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -687,6 +687,10 @@ static bool test_has_cache_level(struct kgem *kgem) if (DBG_NO_CACHE_LEVEL) return false; + /* Incoherent blt and sampler hangs the GPU */ + if (kgem->gen == 40) + return false; + handle = gem_create(kgem->fd, 1); if (handle == 0) return false; @@ -705,6 +709,10 @@ static bool test_has_vmap(struct kgem *kgem) if (DBG_NO_VMAP) return false; + /* Incoherent blt and sampler hangs the GPU */ + if (kgem->gen == 40) + return false; + return gem_param(kgem, I915_PARAM_HAS_VMAP) > 0; #else return false; @@ -3102,6 +3110,8 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem, if (bo == NULL) return bo; + assert(bo->tiling == I915_TILING_NONE); + if (kgem_bo_map__cpu(kgem, bo) == NULL) { kgem_bo_destroy(kgem, bo); return NULL; @@ -3116,6 +3126,8 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem, if (bo == NULL) return NULL; + assert(bo->tiling == I915_TILING_NONE); + bo->reusable = false; bo->vmap = true; if (!gem_set_cache_level(kgem->fd, bo->handle, I915_CACHE_LLC) || @@ -3816,8 +3828,7 @@ static struct kgem_partial_bo *partial_bo_alloc(int num_pages) static inline bool use_snoopable_buffer(struct kgem *kgem, uint32_t flags) { - if (kgem->gen == 40) - return false; + assert(kgem->gen != 40); if (kgem->gen < 30) return flags & KGEM_BUFFER_WRITE; diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index ab7fb810..dcfab910 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -301,9 +301,6 @@ use_cpu_bo(struct sna *sna, PixmapPtr pixmap, const BoxRec *box) return NULL; } - if (sna->kgem.gen == 40) /* XXX sampler dies with snoopable memory */ - return NULL; - if (priv->gpu_bo) { switch (sna_damage_contains_box(priv->cpu_damage, box)) { case PIXMAN_REGION_OUT: |