mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 09:48:05 +02:00
On GFX6-GFX12, except GFX9, SMEM loads on NULL PRT pages would just fault and hang the GPU. The better workaround that we found is to split the address space in two equal parts "LOW"/"HIGH", here's more details: To workaround that, the driver splits the total VA space in half, so that a single bit controls whether it's the "HIGH" or the "LOW" address space. Every sparse residency buffer allocations that might be used with SMEM get two allocations: - the "HIGH" address space is mapped normally and its VA is returned to the application. - the "LOW" address space is explicitly mapped to a zero-initialized buffer when it's allocated or when it's unmapped. Other buffer allocations are always allocated in the "LOW" address. The driver also creates a zero-allocated BO that will be used to map partially resident buffers at creation and when explicitly unmapped. The size is arbitrary but it seems that allocating 8MiB is perfectly reasonable and fast enough in most cases. This BO is marked as read-only for the GPU because the backend compilers don't use SMEM stores. For example this makes the "LOW" half of the HIGH VA range like [0xffff800100000000,0xffffbfffffbfe000], and the "HIGH" half is left for PRT. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> |
||
|---|---|---|
| .. | ||
| .editorconfig | ||
| amdgpu-symbols.txt | ||
| amdgpu.h | ||
| amdgpu_asic_id.c | ||
| amdgpu_bo.c | ||
| amdgpu_cs.c | ||
| amdgpu_device.c | ||
| amdgpu_gpu_info.c | ||
| amdgpu_internal.h | ||
| amdgpu_userq.c | ||
| amdgpu_vamgr.c | ||
| amdgpu_vm.c | ||
| Android.bp | ||
| Android.sources.bp | ||
| handle_table.c | ||
| handle_table.h | ||
| libdrm_amdgpu.pc.in | ||
| meson.build | ||