radv: stop using VM_ALWAYS_VALID on APUs
It seems that VM_ALWAYS_VALID means that all BOs must fit in memory (VRAM+GTT) for each submission. This is causing a lot of troubles when the total allocated memory is greater than the available memory, especially on APUs. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8779>
This commit is contained in:

committed by
Marge Bot

parent
6a3de3a31f
commit
6ac6e2fbfb
@@ -507,7 +507,13 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
|
||||
request.flags |= AMDGPU_GEM_CREATE_EXPLICIT_SYNC;
|
||||
if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
|
||||
ws->info.has_local_buffers &&
|
||||
(ws->use_local_bos || (flags & RADEON_FLAG_PREFER_LOCAL_BO))) {
|
||||
(ws->use_local_bos ||
|
||||
/* VM_ALWAYS_VALID means that all BOs must fit in memory (VRAM+GTT)
|
||||
* for each submission. This is causing a lot of troubles when the
|
||||
* total allocated memory is greater than the available memory,
|
||||
* especially on APUs.
|
||||
*/
|
||||
(ws->info.has_dedicated_vram && (flags & RADEON_FLAG_PREFER_LOCAL_BO)))) {
|
||||
bo->base.is_local = true;
|
||||
request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
|
||||
}
|
||||
|
Reference in New Issue
Block a user