anv/sparse: fix TR-TT page table bo size and flags

Since commit 18d8c3ca33 we were allocating a little more than what
we were actually using (2621440 bytes instead of 2097152, aka 0x280000
instead of 0x200000), and we were not properly marking the BO as
internal. No applications should be misbehaving because of this.

Fixes: 18d8c3ca33 ("anv: Add missing ANV_BO_ALLOC_INTERNAL")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29337>
This commit is contained in:
Paulo Zanoni 2024-06-13 15:29:08 -07:00 committed by Marge Bot
parent 23e91fdd64
commit 2f65acfbb8

View file

@ -335,9 +335,9 @@ trtt_make_page_table_bo(struct anv_device *device, struct anv_bo **bo)
struct anv_trtt *trtt = &device->trtt;
result = anv_device_alloc_bo(device, "trtt-page-table",
ANV_TRTT_PAGE_TABLE_BO_SIZE |
ANV_TRTT_PAGE_TABLE_BO_SIZE,
ANV_BO_ALLOC_INTERNAL,
0, 0, bo);
0 /* explicit_address */, bo);
if (result != VK_SUCCESS)
return result;