URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a84729d36866bc79619523065a6038c3d8444f97 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Jan 6 15:22:57 2024 -0500
radeonsi/ci: add gfx11 flakes Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=205646cd77bd7d00d05fbeea9b7c2ede5db83ff9 Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 03:28:27 2023 -0500 winsys/amdgpu: simplify code using amdgpu_cs_context::chunk_ib Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=44df9517cd0ef98997423f65df1dccb792e7d7ed Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 03:09:13 2023 -0500 winsys/amdgpu: don't use amdgpu_fence::ctx for fence dependencies The only remaining use of ctx is amdgpu_fence_is_syncobj. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ccdcae4b57f666006c8f8555282eea54329edcc Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 03:05:17 2023 -0500 winsys/amdgpu: use pipe_reference for amdgpu_ctx refcounting this is the standard utility for refcounting Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33980355d4d76dcae9bca5070fedc0fc1a0b2f43 Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 02:33:27 2023 -0500 winsys/amdgpu: implement explicit fence dependencies as sequence numbers This eliminates redundant fence dependencies if BOs add the same ones. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d7a76595d0a0f98ebeaba244580bd585b340cec Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 01:24:49 2023 -0500 winsys/amdgpu: remove dependency_flags parameter from cs_add_fence_dependency Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ac0b4ef0563e09a5fc17838e1d33bbde59eae84 Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 15 07:42:34 2023 -0500 winsys/amdgpu: rename amdgpu_bo_real::lock to map_lock Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e2c02d76bd3f14edb0879037c44161daaa098dd Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 15 07:40:17 2023 -0500 winsys/amdgpu: rename amdgpu_bo_sparse::lock -> commit_lock Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1261c77b58ea8f70309c065630f1abedc9fca51 Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 15 07:34:12 2023 -0500 winsys/amdgpu: rename amdgpu_winsys_bo::bo -> bo_handle Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d486888ee895ee510fd0d0e77518c7c020482b9 Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 1 22:16:34 2023 -0500 winsys/amdgpu: rewrite BO fence tracking by adding a new queue fence system This decreases the time spent in amdgpu_cs_submit_ib from 15.4% to 8.3% in VP2020/Catia1, which is a decrease of CPU load for that thread by 46%. Overall, it increases performance by a small number in CPU-bound benchmarks. The biggest improvement I have seen is VP2020/Catia2, where it increases FPS by 12%. It no longer stores pipe_fence_handle references inside amdgpu_winsys_bo. The idea is to have a global fixed list of queues (only 1 queue per IP for now) where each queue generates its own sequence numbers (generated by the winsys, not the kernel). Each queue also has a ring of fences. The sequence numbers are used as indices into the ring of fences, which is how sequence numbers are converted to fences. With that, each BO only has to keep a list of sequence numbers, 1 for each queue. The maximum number of queues is set to 6. Since the system can handle integer wraparounds of sequence numbers correctly, we only need 16-bit sequence numbers in BOs to have accurate busyness tracking. Thus, each BO uses only 12 bytes to represent all its fences for all queues. There is also a 1-byte bitmask saying which sequence numbers are initialized. amdgpu_winsys.h contains the complete description. It has several limitations that exist to minimize the memory footprint and updating of BO fences. Acked-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimu...@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b976f8fc1e61d7f1febbfd1937181a0240ce24de Author: Marek Olšák <marek.ol...@amd.com> Date: Sun Dec 10 02:39:17 2023 -0500 winsys/amdgpu: compute bo->unique_id at pb_slab_alloc, not at memory allocation We would compute the unique IDs for 1000 slab entries and then only use a few, wasting the IDs. Assign the IDs only when we actually need to return a new buffer. This decreases the number of collisions we get in amdgpu_lookup_buffer, and thus the number of times we have to search in the BO list. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=32dae84d43af625359a23071d1a71e0d57795182 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 17:23:26 2023 -0500 winsys/amdgpu: allocate 1 amdgpu_bo_slab_entry per cache line The structure size is exactly 64 bytes, so every entry occupies exactly 1 cache line. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d913a2bcc69309d07ca9f75c91fed8f92004aad Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 17:07:14 2023 -0500 r300,r600,radeonsi: switch to pb_buffer_lean to remove pb_buffer::vtbl from all buffer structures Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2c76c4d77a2241d98eaa8755f3a1839ca2669c3 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 17:11:35 2023 -0500 winsys/radeon: stop using pb_buffer::vtbl Only the destroy function used it. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6c4ab0267444b10bee850b30149732a1366d0a0d Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 16:54:33 2023 -0500 gallium/pb_cache: remove pb_cache_entry::buffer The buffer pointer is always at a constant offset from pb_cache_entry, so just pass the "offsetof" value to pb_cache and use that to get the pointer. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=20bf2a06fb62aadb7a8a6db7e5a8faf03e70bd35 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 15:59:56 2023 -0500 gallium/pb_cache: remove pb_cache_entry::mgr We can just pass it via functions. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7de37235832c59c741ffc5765adedd16a30177c Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 15:31:27 2023 -0500 gallium/pb_cache: switch to pb_buffer_lean Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=39c1311766dd41e71bd2ac70d8e938102c439324 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 15:13:38 2023 -0500 gallium/pb_buffer: define pb_buffer_lean without vtbl, inherit it by pb_buffer amdgpu doesn't need vtbl. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb19f0daa3a09e64511f4a8a9086f55afc1ccb3b Author: Marek Olšák <marek.ol...@amd.com> Date: Thu Dec 21 00:58:19 2023 -0500 winsys/amdgpu: don't use gpu_address to compute slab entry offset in bo_map use the code we have in amdgpu_bo_get_va Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8e98882ea9a0c98d7555ba066e163a2ccb396e5 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 14:23:49 2023 -0500 winsys/amdgpu: remove va (gpu_address) from amdgpu_bo_slab_entry Keep it only in amdgpu_bo_real and amdgpu_bo_sparse. Slab entries can compute it from the slab BO and adding their entry index. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3cc2562ac09b1394ce60fc72a14b2f1a0bbea7d4 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 01:46:28 2023 -0500 winsys/amdgpu: remove now-redundant amdgpu_bo_slab_entry::real The pb_slab pointer can be used to get the BO pointer because pb_slab is inside the BO structure now. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49bf2545fe8fa92c1bd64fc80b64b440ec98eb85 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 01:28:20 2023 -0500 winsys/amdgpu: add amdgpu_bo_real_reusable slab for the backing buffer Add contents of amdgpu_bo_slab into it. This will allow removing the "real" pointer from amdgpu_bo_slab_entry because "(char*)entry.slab" is now pointing next to it. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf2dc2d512fc8e621b99e6c53326f0957342ea70 Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 8 20:10:11 2023 -0500 winsys/amdgpu: don't layer slabs, use only 1 level of slabs, it improves perf This increases FPS in VP2020/Catia1 by 10-18%!!!!!!!!!!!!!!!!!!!!!!! I have no rational explanation for this. In the most extreme case, 8192 256B slab BOs (smallest size) are now allocated from a single 2MB slab. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a078e693e913921d11e30988dc6e923e7cc27b7 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 16:10:21 2023 -0500 r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference This will allow the removal of pb_cache_entry::mgr. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=643f390de531e72194f50ded11bce0c27d7baaf2 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 16:25:20 2023 -0500 radeon_winsys: add struct radeon_winsys* parameter into fence_reference Since the radeon winsys implements fences as buffers, we need radeon_winsys* to destroy them. This will enable the removal of pb_cache_entry::mgr. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e847c6e30154e02d37d624a1a827eedd7fc37b82 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 15:47:15 2023 -0500 gallium/pb_cache: switch time variables to milliseconds and 32-bit type to decrease pb_cache_entry by 8 bytes. Add msecs_base_time to offset time == 0 to the creation of pb_cache. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=896c8b67cbc4e896eff494f2e5f4b450c66068f2 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 15:39:15 2023 -0500 gallium/pb_cache: remove pb_cache_entry::end to save space just compute it at each use Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=523a4f71f296a9d715044f913c818cda7c0a66c6 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 14:49:30 2023 -0500 winsys/amdgpu: stop using pb_buffer::vtbl Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7752579202c9d68a41e276fd0a243669aa5dc363 Author: Marek Olšák <marek.ol...@amd.com> Date: Sat Dec 9 00:26:29 2023 -0500 winsys/amdgpu: rename to amdgpu_bo_slab to amdgpu_bo_slab_entry It's a slab entry. "Slab" is the whole buffer, which is AMDGPU_BO_REAL if we want to be precise. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3c64638b4e34d014bc1bc9abd2517bdc9f1405a Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 8 23:45:04 2023 -0500 iris,zink,winsys/amdgpu: remove unused/redundant slab->entry_size slab->base has the same field. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9431c338993ab406e90a93344b02d2db10f0184a Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 8 23:39:36 2023 -0500 gallium/pb_slab: move group_index and entry_size from pb_slab_entry to pb_slab This removes 8 bytes from every slab entry, and thus amdgpu_bo_slab. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a3bacc3764e69eb868318e83c3375a183fe953d Author: Marek Olšák <marek.ol...@amd.com> Date: Fri Dec 8 22:34:00 2023 -0500 winsys/amdgpu: reduce wasted memory due to the size tolerance in pb_cache Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>