i965: Don't map/unmap in brw_print_program_cache on LLC platforms.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 12 Nov 2016 02:05:14 +0000 (18:05 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Jan 2017 05:47:38 +0000 (21:47 -0800)
We have a persistent mapping.  Don't map it a second time or try to
unmap it.  Just use the pointer.

This most likely would wreak havoc except that this code is unused
(it's only called from an if (0) debug block).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/mesa/drivers/dri/i965/brw_program_cache.c

index 8939fb110fdf2833f276f14d1b2f0529ec1f394c..44d9994de01954dbced9170f7cf3d24fd4830e1d 100644 (file)
@@ -514,7 +514,8 @@ brw_print_program_cache(struct brw_context *brw)
    const struct brw_cache *cache = &brw->cache;
    struct brw_cache_item *item;
 
-   drm_intel_bo_map(cache->bo, false);
+   if (!brw->has_llc)
+      drm_intel_bo_map(cache->bo, false);
 
    for (unsigned i = 0; i < cache->size; i++) {
       for (item = cache->items[i]; item; item = item->next) {
@@ -524,5 +525,6 @@ brw_print_program_cache(struct brw_context *brw)
       }
    }
 
-   drm_intel_bo_unmap(cache->bo);
+   if (!brw->has_llc)
+      drm_intel_bo_unmap(cache->bo);
 }