anv: track the first 2MB of unused VA

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32895>
This commit is contained in:
Lionel Landwerlin 2025-01-27 17:12:52 +02:00 committed by Marge Bot
parent 48e41c87b0
commit ddf64a7d95
2 changed files with 7 additions and 1 deletions

View file

@ -1145,6 +1145,10 @@ struct anv_physical_device {
} memory;
struct {
/**
* Unused
*/
struct anv_va_range first_2mb;
/**
* General state pool
*/

View file

@ -97,7 +97,9 @@ anv_physical_device_init_va_ranges(struct anv_physical_device *device)
uint64_t _1Gb = 1ull * 1024 * 1024 * 1024;
uint64_t _4Gb = 4ull * 1024 * 1024 * 1024;
uint64_t address = 0x000000200000ULL; /* 2MiB */
uint64_t address = 0;
address = va_add(&device->va.first_2mb, address, 2 * _1Mb);
address = va_add(&device->va.general_state_pool, address,
2 * _1Gb - address);