URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a9cdbed5a287f9ac6458976e1fe81c191bd2c7de
Author: Rob Clark <[email protected]>
Date: Thu Dec 15 11:14:58 2022 -0800
freedreno/drm: Short-circuit kernel for timeout=0 waits
We already know from the userspace fence whether the fence has signaled
or not. No need to do a syscall if we aren't going to wait.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=90b9b1330d0f7627c793b950c737be5333e5230e
Author: Rob Clark <[email protected]>
Date: Thu Dec 15 08:48:00 2022 -0800
freedreno/drm/virtio: Guest side fence waits
Now that fd_fence and fd_submit_fence are unified, we can wait on the
fence fd rather than needing to poll the host.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=995c64ddcbbf0c9dc17e23fd7bb4726980718dfc
Author: Rob Clark <[email protected]>
Date: Thu Dec 15 08:43:37 2022 -0800
freedreno/drm/virtio: More tracepoints
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=be6d21ed56a02b4343442c3bf2b314fcdc5c34e2
Author: Rob Clark <[email protected]>
Date: Mon Dec 12 14:20:53 2022 -0800
freedreno: Limit cached staging BOs to PIPE_MAP_READ
WC is fine for staging upload buffers, and will let us hit the default
heap. Probably introducing a separate cached-coherent heap is overkill,
and given that staging uploads are common (but downloads uncommon, out-
side of dEQP/piglit), it is better to just ask for WC.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4be235af7ca3f06af41ba8217565f7c2627deba4
Author: Rob Clark <[email protected]>
Date: Sat Dec 10 15:17:12 2022 -0800
freedreno/drm/virtio: Remove prealloc_list
Now that we are allocating cmdstream from the heap, we shouldn't need
this.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=48610676897d989ff8ce604022e7d611cec9c131
Author: Rob Clark <[email protected]>
Date: Fri Dec 2 18:42:42 2022 -0800
freedreno/drm: Add sub-allocator
Add a heap that we can use for allocations of small mappable buffers.
This avoids the churn of mmap/unmap, which is especially expensive in
a VM. It also allows packing more smaller allocations together in a
page, which is useful for PIPE_BUFFERs (which are also mappable).
This avoid jank caused by the overhead of setting up or tearing down
guest mappings when running in a VM. And also significantly reduces
the # of BOs referenced on a submit.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d0d82f25ffa88b817ecfbd974cd1eff26ac1e0d
Author: Rob Clark <[email protected]>
Date: Wed Dec 7 15:04:29 2022 -0800
util/vma: Add "nospan"
Add a way to request that allocations do not span a specified PoT
boundary. This can be used, for ex, to ensure that allocations do
not span 4GB boundaries to work around hw/fw bugs.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=793741c9369e7b855975dfc6e4fd3e679612acb2
Author: Rob Clark <[email protected]>
Date: Tue Dec 13 14:52:03 2022 -0800
freedreno/drm: Merge in_fence_fd's
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=137cd3b0fa939ffe66c37ffdcd2ad0e133c42b85
Author: Rob Clark <[email protected]>
Date: Tue Dec 13 10:57:42 2022 -0800
freedreno/drm: Move no_implicit_sync accounting
No need to duplicate this.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b02bc6139f1327def491680115d5f992f340764
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 13:58:05 2022 -0800
freedreno/drm: Drop fd_bo_fence
Remove the last fence-like-struct that isn't fd_fence. Now that
fences are refcnt'd we can just attach them directly to BOs. This
will simplify busy-ness tracking for suballoc BOs.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=434a8412e83f526458105d84ddcf5815b0056653
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 13:34:43 2022 -0800
freedreno/drm: Re-enable submit fence merging
Now that we (a) create the fence ourselves, returning a reference from
fd_submit_flush(), and (b) refcnt the fences, we can now merge submits
with on out-fence by just attaching the same fence to all the submits.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=932ce591ac70c920d62543c3e9018a0acbef134f
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 13:18:14 2022 -0800
freedreno/drm: Simplify deferred submit flushing
Once we are sharing an out-fence for multiple deferred/merged submits
the complicated logic in fd_pipe_sp_flush() no longer works (or makes
sense), so just simplify all the paths into a single helper.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=48b5164356c3ffe15182be92db9fd28baa1d1b35
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 11:18:15 2022 -0800
freedreno/drm: Return fence from submit flush
This moves away from embedding the submit fence inside the pipe fence,
which lets us start refcnt'ing the fence. This will enable several
cleanups and improvements:
1. Get rid of fd_bo_fence, and just have fd_bo hold pending fd_fence
refs instead, which will be needed for cpu_prep implementation of
sub-allocated buffers.
2. For merged submits, we can just return a new reference to an
existing fence.
Note that this temporarily defeats submit-merging, which will be
fixed (and improved) in a following commit.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7469574814e1ee93d1d037cfc625048a68704ffd
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 10:49:34 2022 -0800
freedreno: Rename fd_fence -> fd_pipe_fence
So we don't have namespace clashes in the next commit.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1a621813b38b381e83d318f4f4c7be95f50c592
Author: Rob Clark <[email protected]>
Date: Wed Dec 14 09:06:59 2022 -0800
freedreno/drm: Combine fd_fence and fd_submit_fence
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=803df07d9edb268b22f5dc10f16126f07881b381
Author: Rob Clark <[email protected]>
Date: Mon Dec 5 10:33:28 2022 -0800
freedreno/drm: Replace shared/nosync fields
These are redundent with the alloc_flags. A following commit will map
alloc_flags directly to bo heap that should be used, and adding the
FD_BO_SHARED bit when a BO is exported neatly avoids returning it to
the pool to be potentially erroneously reused.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6b364f92484d7ffbeeb2efeb2004f0fd6b94303
Author: Rob Clark <[email protected]>
Date: Mon Dec 5 09:49:59 2022 -0800
freedreno/drm: Reorg BO alloc flags
And drop the unneeded _FD_BO_RING flag.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd20df8f0944e41449162733d2ca1d3d8be4d734
Author: Rob Clark <[email protected]>
Date: Wed Dec 7 15:27:04 2022 -0800
freedreno/drm: Invert BO destruction
Sub-alloc'd heap BOs will need to do something a bit more special, ie.
not immediately cleanup fences (because those will be needed to know
when the BO is actually idle and vma node can be released), not tear
down the mmap (because the BO doesn't own it), and not close the handle
(also because the BO doesn't own it).
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=84f44137ff71fa122305659c82297c371ca7f2f6
Author: Rob Clark <[email protected]>
Date: Sat Dec 10 09:33:51 2022 -0800
freedreno/drm: Shuffle around BO init
Suballocated heap BOs will bypass the rest of bo_new() (as they skip the
BO cache, don't get an entry in the handle table, etc). So move more of
the initialization into fd_bo_init_common().
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=db0f273cfb48d1229e2ca16dac661b484b486264
Author: Rob Clark <[email protected]>
Date: Sat Dec 10 12:39:40 2022 -0800
freedreno/drm: Drop pipe ref to device
The context and screen already holds refs to the device. But since
fd_bo_fence holds a ref to the pipe, anyone anywhere leaking a single
bo with unwaited fences could cause the device to leak indirectly.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c196e13e1f0b501ed5e5ace38af631f6d6da37ba
Author: Rob Clark <[email protected]>
Date: Thu Dec 8 15:59:12 2022 -0800
freedreno/drm: Get rid of fd_bo_del_locked()
This moves the table_lock into a small critical section in the BO delete
path when we are actually removing the entries from the handle/name
tables, so finally table_lock isn't the big-bo-lock!
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5136f25667adbd86ff7bf6af71886034ef93544c
Author: Rob Clark <[email protected]>
Date: Thu Dec 8 15:41:07 2022 -0800
freedreno/drm: Rework batch BO delete
Get rid of the per-device table of deferred handles, and instead keep
this on the stack so that no additional locking is needed. This will
simplify getting rid of table_lock in the bo delete path. For the BO
cache, add fd_bo_del_list_nocache() which works like fd_bo_del_array()
except that it bypasses returning BOs to the cache. This gets rid of
the BO cache calls to private fd_bo fxns (which is useful now that the
bo_del/close_handles() dance has become a bit more complicated).
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=75a4d902806d9a947924267efdfeb65b3ba4532a
Author: Rob Clark <[email protected]>
Date: Thu Dec 8 14:35:28 2022 -0800
freedreno/drm: Start prying apart table_lock
We want to get back to the point where table_lock is only doing what
it's named for (ie. protecting handle/name tables). This is the first
step. Add new locks to protect fencing and the bo caches. A single
global lock for fences, to avoid atomic instructions in the loop per
submit bo attaching fences.
This couldn't be broken appart into different commits, otherwise there
would have been an ABBA deadlock in BO cache's call to fd_bo_state()
to check if a BO is idle.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2ee7012c2c664cedf94eb0b49b0eb5dd4f0bdfd9
Author: Rob Clark <[email protected]>
Date: Thu Dec 8 13:33:55 2022 -0800
freedreno/drm: Simplify cleanup_fences()
To prepare for moving fence state out from under table_lock, simplify
cleanup_fences() and stop trying to re-use it in the bo destruction
path (which otherwise wouldn't need the fence lock, since there is
no other owner of the bo ref at that point, and simply needs to drop
pipe refs).
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=73ab83d22879e28e0df3375d33f61132fa45ff3f
Author: Rob Clark <[email protected]>
Date: Thu Dec 8 12:47:51 2022 -0800
freedreno/drm: Add bo list iterator macros
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c355c7cbc960639bd034da01851c309004ccf34
Author: Rob Clark <[email protected]>
Date: Wed Nov 9 09:03:20 2022 -0800
freedreno/drm: Add BO cache stats
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1bf88d0bf90b5becbb19726d6d2c191ad339be6b
Author: Rob Clark <[email protected]>
Date: Sat Dec 3 08:23:05 2022 -0800
freedreno/drm: Allow submit merging with explicit sync
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=87f89a03835ac37c52b2ca7889d44766de306509
Author: Rob Clark <[email protected]>
Date: Sat Dec 3 08:19:23 2022 -0800
freedreno/drm: Move no_implicit_sync to base
No need to duplicate between backends.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9372f11c81018f77eaf38dd0f60b3fcb6ea067e0
Author: Rob Clark <[email protected]>
Date: Sat Dec 3 08:08:34 2022 -0800
freedreno/drm: Remove cpu_fini
It has been unused since nearly forever.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
URL:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c96dea63826da88cb1016039e670080c36859d4
Author: Rob Clark <[email protected]>
Date: Sat Dec 10 08:45:07 2022 -0800
freedreno: Update obsolete comment
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>