anv: Fix some mismatches of canonical and regular addresses around anv_bo_vma_alloc_or_close()

anv_vma_alloc() returns a canonical address, but explicit_address is a
regular address. This mismatch can potentially cause issues.

So here making bo->offset as always canonical address by converting it
in the explicit case and fixing the only caller that was caling
anv_bo_vma_alloc_or_close() with a canonical address.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23977>
This commit is contained in:
José Roberto de Souza
2023-07-03 09:38:10 -07:00
committed by Marge Bot
parent f948393005
commit 2fa4fe2c85
2 changed files with 4 additions and 4 deletions

View File

@@ -419,7 +419,7 @@ struct anv_bo {
/* Last known offset. This value is provided by the kernel when we
* execbuf and is used as the presumed offset for the next bunch of
* relocations.
* relocations, in canonical address format.
*/
uint64_t offset;
@@ -596,7 +596,7 @@ struct anv_block_pool {
uint64_t size;
/* The address where the start of the pool is pinned. The various bos that
/* The canonical address where the start of the pool is pinned. The various bos that
* are created as the pool grows will have addresses in the range
* [start_address, start_address + BLOCK_POOL_MEMFD_SIZE).
*/