There was an error fetching the commit references. Please try again later.
anv/block_pool: Ensure allocations have contiguous maps
Because softpin block pools are made up of a set of BOs with different maps, it was possible for a single state to end up straddling blocks. To fix this, we pass a contiguous size to anv_block_pool_grow and it ensures that the next allocation in the pool will have at least that size. We also add an assert in anv_block_pool_map to ensure we always get contiguous maps. Prior to the changes to anv_block_pool_grow, the unit tests failed with this assert. With this patch, the tests pass. This was causing problems on Gen12 where we allocate the pages for the AUX table from the dynamic state pool. The first chunk, which gets allocated very early in the pool's history, is 1MB which was enough that it was getting multiple BOs. This caused the gen_aux_map code to write outside of the map and overwrite the instruction state pool buffer which lead to GPU hangs. Fixes: 731c4adc "anv/allocator: Add support for non-userptr" Reviewed-by:Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Showing
- src/intel/vulkan/anv_allocator.c 24 additions, 8 deletionssrc/intel/vulkan/anv_allocator.c
- src/intel/vulkan/anv_private.h 2 additions, 1 deletionsrc/intel/vulkan/anv_private.h
- src/intel/vulkan/genX_blorp_exec.c 1 addition, 1 deletionsrc/intel/vulkan/genX_blorp_exec.c
- src/intel/vulkan/tests/block_pool_grow_first.c 1 addition, 1 deletionsrc/intel/vulkan/tests/block_pool_grow_first.c
- src/intel/vulkan/tests/block_pool_no_free.c 4 additions, 4 deletionssrc/intel/vulkan/tests/block_pool_no_free.c
Loading
Please register or sign in to comment