intel: Set a more useful fake devinfo->gtt_size in no-hw mode

With the old value, anv didn't think that the hardware supported 48-bit
addresses, and hit this assert:

   assert(device->supports_48bit_addresses == !device->use_relocations);

The new value of 1ull << 48 is the one reported on my Icelake machine.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16933>
This commit is contained in:
Kenneth Graunke
2022-06-08 13:47:49 -07:00
committed by Marge Bot
parent 65d6708bc3
commit 18b3ad5a09
+2 -1
View File
@@ -1894,7 +1894,8 @@ intel_get_device_info_from_fd(int fd, struct intel_device_info *devinfo)
/* remaining initializion queries the kernel for device info */
if (devinfo->no_hw) {
/* Provide some sensible values for NO_HW. */
devinfo->gtt_size = 2ull * 1024 * 1024 * 1024;
devinfo->gtt_size =
devinfo->ver >= 8 ? (1ull << 48) : 2ull * 1024 * 1024 * 1024;
return true;
}