summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-04-22 15:16:49 -0700
committerKenneth Graunke <[email protected]>2019-04-23 00:24:08 -0700
commit0a082b6560867b359e8858cd1cbb15b0869ae18e (patch)
treec713b722bacc8cf7d6560689863ec3fade117020 /src/gallium/drivers/iris
parent72277044e22dc43064340630911123ba3331dd85 (diff)
iris: Make memzone_for_address non-static
I want to use this in iris_resource.c.
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c10
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 147fdd69964..6f53f214caa 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -256,8 +256,8 @@ bucket_for_size(struct iris_bufmgr *bufmgr, uint64_t size)
&bufmgr->cache_bucket[index] : NULL;
}
-static enum iris_memory_zone
-memzone_for_address(uint64_t address)
+enum iris_memory_zone
+iris_memzone_for_address(uint64_t address)
{
STATIC_ASSERT(IRIS_MEMZONE_OTHER_START > IRIS_MEMZONE_DYNAMIC_START);
STATIC_ASSERT(IRIS_MEMZONE_DYNAMIC_START > IRIS_MEMZONE_SURFACE_START);
@@ -336,7 +336,7 @@ bucket_vma_alloc(struct iris_bufmgr *bufmgr,
static void
bucket_vma_free(struct bo_cache_bucket *bucket, uint64_t address)
{
- enum iris_memory_zone memzone = memzone_for_address(address);
+ enum iris_memory_zone memzone = iris_memzone_for_address(address);
struct util_dynarray *vma_list = &bucket->vma_list[memzone];
const uint64_t node_bytes = 64ull * bucket->size;
struct vma_bucket_node *node = NULL;
@@ -448,7 +448,7 @@ vma_free(struct iris_bufmgr *bufmgr,
if (address == 0ull)
return;
- enum iris_memory_zone memzone = memzone_for_address(address);
+ enum iris_memory_zone memzone = iris_memzone_for_address(address);
/* The binder handles its own allocations. */
if (memzone == IRIS_MEMZONE_BINDER)
@@ -595,7 +595,7 @@ retry:
/* If the cached BO isn't in the right memory zone, free the old
* memory and assign it a new address.
*/
- if (memzone != memzone_for_address(bo->gtt_offset)) {
+ if (memzone != iris_memzone_for_address(bo->gtt_offset)) {
vma_free(bufmgr, bo->gtt_offset, bo->size);
bo->gtt_offset = 0ull;
}
diff --git a/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h
index fa74c978191..0e82d577519 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.h
+++ b/src/gallium/drivers/iris/iris_bufmgr.h
@@ -367,4 +367,6 @@ iris_bo_offset_from_base_address(struct iris_bo *bo)
return bo->gtt_offset;
}
+enum iris_memory_zone iris_memzone_for_address(uint64_t address);
+
#endif /* IRIS_BUFMGR_H */