summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_bufmgr.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-04-06 11:44:59 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commit6cbd1d16921c5336e87e7d954e7ac6da67749ba9 (patch)
treec9840e98189fb62a418b3da5ea158dd8413efb80 /src/gallium/drivers/iris/iris_bufmgr.c
parent209692c7168b5bf4f4034862e2af3ccfc79f6257 (diff)
iris: binders
Diffstat (limited to 'src/gallium/drivers/iris/iris_bufmgr.c')
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 6423136dd4d..c1a4fa5d5f3 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -236,9 +236,13 @@ memzone_for_address(uint64_t address)
if (address >= 2 * _4GB)
return IRIS_MEMZONE_DYNAMIC;
- if (address >= 1 * _4GB)
+ if (address > 1 * _4GB)
return IRIS_MEMZONE_SURFACE;
+ /* The binder isn't in any memory zone. */
+ if (address == 1 * _4GB)
+ return IRIS_MEMZONE_BINDER;
+
return IRIS_MEMZONE_SHADER;
}
@@ -336,6 +340,9 @@ vma_alloc(struct iris_bufmgr *bufmgr,
uint64_t size,
uint64_t alignment)
{
+ if (memzone == IRIS_MEMZONE_BINDER)
+ return 1ull << 32;
+
struct bo_cache_bucket *bucket = get_bucket_allocator(bufmgr, size);
if (bucket)