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 <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17349>
This commit is contained in:
Jordan Justen 2022-05-16 09:48:23 -07:00 committed by Marge Bot
parent 618c871a23
commit 49b1b8b853
1 changed files with 2 additions and 0 deletions

View File

@ -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;