aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-05-03 12:02:41 -0700
committerKenneth Graunke <[email protected]>2019-05-07 15:45:56 -0700
commitd568fcd0a09751cd041cdd46bc585e209e0df394 (patch)
tree49a76cb87ef4ffa6510c8efc6653d39dd794b846 /src/mesa
parent17210c63a91aaf018813b0d336f5f1d4fd87eafb (diff)
i965: leave the top 4Gb of the high heap VMA unused
This ports commit 9e7b0988d6e98690eb8902e477b51713a6ef9cae from anv to i965. Thanks to Lionel for noticing that it was missing! Fixes: 01058a55229 i965: Add virtual memory allocator infrastructure to brw_bufmgr. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 43dc63ce3e5..b0e5198aad1 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -1732,8 +1732,12 @@ brw_bufmgr_init(struct gen_device_info *devinfo, int fd)
util_vma_heap_init(&bufmgr->vma_allocator[BRW_MEMZONE_LOW_4G],
PAGE_SIZE, _4GB_minus_1);
+
+ /* Leave the last 4GB out of the high vma range, so that no state
+ * base address + size can overflow 48 bits.
+ */
util_vma_heap_init(&bufmgr->vma_allocator[BRW_MEMZONE_OTHER],
- 1 * _4GB, gtt_size - 1 * _4GB);
+ 1 * _4GB, gtt_size - 2 * _4GB);
} else if (devinfo->gen >= 10) {
/* Softpin landed in 4.5, but GVT used an aliasing PPGTT until
* kernel commit 6b3816d69628becb7ff35978aa0751798b4a940a in