Commit Graph

8 Commits

Author SHA1 Message Date
Yiwei Zhang b21e4a7990 venus: put android wsi on the sub-optimal path
Simplify Android wsi to only use performant path if fixed sync_fd fence
support is enabled. This removes hacky codes and allows us to deprecate
a special ring wait code path as well.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17975>
2022-08-25 20:18:28 +00:00
Yiwei Zhang 15e7750446 Revert "venus: remove vn_ring_wait_all"
This reverts commit 7253e61d9d.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14657>
2022-01-28 19:15:52 +00:00
Chia-I Wu c9eedba75d venus: make ring buffer size configurable
Until we can assume large ring support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu eb88c8e1d4 venus: rework vn_instance_submission
The goal is to remove local_cs_data.  To that end, vn_ring_submit is
modified to take a cs than a pointer.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12568>
2021-09-08 16:38:24 +00:00
Chia-I Wu 572ed22494 venus: use uint32_t in vn_ring_submit
And in vn_ring_write_buffer as well, to fix the assert in
vn_ring_write_buffer.

The ring code uses 32-bit unsigned integers and relies on that their
overflow/underflow behavior is well-defined.  When ring->shared.head is
about to overflow and ring->cur has overflowed, this expression

  ring->cur + size - vn_ring_load_head(ring)

gives an incorrect result when size is 64-bit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12494>
2021-08-24 08:56:16 -07:00
Chia-I Wu b54a262421 venus: use vn_renderer_shmem
vn_renderer_bo_create_cpu becomes unused and is removed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>
2021-04-28 12:58:58 -07:00
Chia-I Wu 7253e61d9d venus: remove vn_ring_wait_all
It is unused now.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10146>
2021-04-14 21:18:10 +00:00
Chia-I Wu 83d7c2bb40 venus: add a ring buffer
vn_ring is a fast way to submit commands, skipping vn_renderer entirely.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>
2021-04-08 17:15:37 +00:00