From 49b1b8b85392cf4d4a21a375e2f3350046aaef23 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 16 May 2022 09:48:23 -0700 Subject: [PATCH] iris/bufmgr: Add all_vram_mappable which is currently always true This can be false on systems where the PCI Base Address Register (BAR) is too small for the amount of VRAM. Eventually the kernel will be able to tell us that a system can't map all of VRAM, and `all_vram_mappable` will then be false. Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_bufmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 6040e1929a1..6c72e24a1e5 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -238,6 +238,7 @@ struct iris_bufmgr { bool has_userptr_probe:1; bool bo_reuse:1; bool use_global_vm:1; + bool all_vram_mappable:1; struct intel_aux_map_context *aux_map_ctx; @@ -2404,6 +2405,7 @@ iris_bufmgr_create(struct intel_device_info *devinfo, int fd, bool bo_reuse) bufmgr->has_userptr_probe = gem_param(fd, I915_PARAM_HAS_USERPTR_PROBE) >= 1; iris_bufmgr_get_meminfo(bufmgr, devinfo); + bufmgr->all_vram_mappable = intel_vram_all_mappable(devinfo); STATIC_ASSERT(IRIS_MEMZONE_SHADER_START == 0ull); const uint64_t _4GB = 1ull << 32;