[Mesa-dev] [PATCH 1/3] intel: fix check for 48b ppgtt support
Chris Wilson
chris at chris-wilson.co.uk
Wed Apr 18 21:35:32 UTC 2018
Quoting Kenneth Graunke (2018-04-18 22:22:54)
> From: Scott D Phillips <scott.d.phillips at intel.com>
>
> The previous logic of the supports_48b_addresses wasn't actually
> checking if i915.ko was running with full_48bit_ppgtt. The ENOENT
> it was checking for was actually coming from the invalid context
> id provided in the test execbuffer. There is no path in the
> kernel driver where the presence of
> EXEC_OBJECT_SUPPORTS_48B_ADDRESS leads to an error.
>
> Instead, check the HAS_ALIASING_PPGTT param for the value 3 which
> corresponds with full_48bit_ppgtt.
>
> v2 (Ken): Fix in i965 as well.
> ---
> src/intel/vulkan/anv_device.c | 4 ++--
> src/intel/vulkan/anv_gem.c | 18 ------------------
> src/intel/vulkan/anv_gem_stubs.c | 6 ------
> src/intel/vulkan/anv_private.h | 1 -
> src/mesa/drivers/dri/i965/brw_bufmgr.c | 22 ++--------------------
> 5 files changed, 4 insertions(+), 47 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 7522b7865c2..116574cb978 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -107,8 +107,8 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
> * EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag and not whether or not the
> * hardware has actual 48bit address support.
> */
> - device->supports_48bit_addresses =
> - (device->info.gen >= 8) && anv_gem_supports_48b_addresses(fd);
> + device->supports_48bit_addresses = (device->info.gen >= 8) &&
> + anv_gem_get_param(fd, I915_PARAM_HAS_ALIASING_PPGTT) == 3;
Just query whether you have move than 4G of GTT. The context query is the
same age as the 48b support and was intended to be used for this purpose.
-Chris
More information about the mesa-dev
mailing list