anv: Add support for 48-bit addresses
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 18 Mar 2017 00:31:44 +0000 (17:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Apr 2017 01:33:52 +0000 (18:33 -0700)
commit651ec926fc10258ddc567da44c231d5303b8740f
treeb2a09499f3c7ba382d3c38f2804aef38bc1edcc8
parent439da38d184b5e9dddcfb245a2454879e7632649
anv: Add support for 48-bit addresses

This commit adds support for using the full 48-bit address space on
Broadwell and newer hardware.  Thanks to certain limitations, not all
objects can be placed above the 32-bit boundary.  In particular, general
and state base address need to live within 32 bits.  (See also
Wa32bitGeneralStateOffset and Wa32bitInstructionBaseOffset.)  In order
to handle this, we add a supports_48bit_address field to anv_bo and only
set EXEC_OBJECT_SUPPORTS_48B_ADDRESS if that bit is set.  We set the bit
for all client-allocated memory objects but leave it false for
driver-allocated objects.  While this is more conservative than needed,
all driver allocations should easily fit in the first 32 bits of address
space and keeps things simple because we don't have to think about
whether or not any given one of our allocation data structures will be
used in a 48-bit-unsafe way.

Reviewed-by: Kristian H. Kristensen <krh@bitplanet.net>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_gem.c
src/intel/vulkan/anv_intel.c
src/intel/vulkan/anv_private.h