From 4bf2a28334364faa54025fd12ea4ae0a281a2177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 30 Apr 2025 20:07:45 -0400 Subject: [PATCH] winsys/amdgpu: fix running out of 32bit address space with high FPS Reproduced with gfxbench5 gl_tess_off. Fixes: 4d486888ee8 - winsys/amdgpu: rewrite BO fence tracking by adding a new queue fence system Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h index e3678cf23a6..dbde9f7b354 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h @@ -123,8 +123,11 @@ struct amdgpu_screen_winsys { * uint8_t wraps around so quickly that some BOs might never become idle because we don't * remove idle fences from BOs, so they become "busy" again after a queue sequence number wraps * around and they may stay "busy" in pb_cache long enough that we run out of memory. + * + * High FPS applications also wrap around uint16_t so quickly that 32-bit address space allocations + * aren't deallocated soon enough and we run out. */ -typedef uint16_t uint_seq_no; +typedef uint32_t uint_seq_no; struct amdgpu_queue { /* Ring buffer of fences.