[Mesa-dev] [PATCH v2 00/37] panfrost: Support batch pipelining
Boris Brezillon
boris.brezillon at collabora.com
Mon Sep 16 09:36:38 UTC 2019
Hello,
This is the second attempt at supporting batch pipelining. This time I
implemented it using a dependency graph (as suggested by Alyssa and
Steven) so that batch submission can be delayed even more: the only
time we flush batches now is when we have an explicit flush or when
the CPU needs to access a BO (we might want to tweak that a bit to
avoid the extra latency incurred by this solution). With that in place
we hope to increase GPU utilization.
A few words about the patches in this series:
* Like the previous version, this series is a mix of cleanups and
functional changes. Most of them should be pretty trivial to review
and I intend to merge them independently once they have receive
proper review (to avoid having to send another patch bomb like this
one).
* The "rework BO API" batch has been split to ease review
* Patches 35 and 36 are not mandatory, but I remember reading (I think
it was Steven who mentioned that) that draw order matters when
queueing render operations for different frames (frame N should
ideally be ready before frame N+1). Not sure if enforcing draw call
order is enough to guarantee that rendering of frame N always
finishes before frame N+1 though.
Regards,
Boris
Boris Brezillon (37):
panfrost: Stop exposing internal panfrost_*_batch() functions
panfrost: Use the correct type for the bo_handle array
panfrost: Add missing panfrost_batch_add_bo() calls
panfrost: Add polygon_list to the batch BO set at allocation time
panfrost: Kill a useless memset(0) in panfrost_create_context()
panfrost: Stop passing has_draws to panfrost_drm_submit_vs_fs_batch()
panfrost: Get rid of pan_drm.c
panfrost: Move panfrost_bo_{reference,unreference}() to pan_bo.c
panfrost: s/PAN_ALLOCATE_/PAN_BO_/
panfrost: Move the BO API to its own header
panfrost: Stop exposing panfrost_bo_cache_{fetch,put}()
panfrost: Don't check if BO is mmaped before calling
panfrost_bo_mmap()
panfrost: Stop passing screen around for BO operations
panfrost: Stop using panfrost_bo_release() outside of pan_bo.c
panfrost: Add panfrost_bo_{alloc,free}()
panfrost: Don't return imported/exported BOs to the cache
panfrost: Make sure the BO is 'ready' when picked from the cache
panfrost: Add flags to reflect the BO imported/exported state
panfrost: Add the panfrost_batch_create_bo() helper
panfrost: Add FBO BOs to batch->bos earlier
panfrost: Allocate tiler and scratchpad BOs per-batch
panfrost: Extend the panfrost_batch_add_bo() API to pass access flags
panfrost: Make panfrost_batch->bos a hash table
panfrost: Cache GPU accesses to BOs
panfrost: Add a batch fence
panfrost: Use the per-batch fences to wait on the last submitted batch
panfrost: Add a panfrost_freeze_batch() helper
panfrost: Start tracking inter-batch dependencies
panfrost: Prepare panfrost_fence for batch pipelining
panfrost: Add a panfrost_flush_all_batches() helper
panfrost: Add a panfrost_flush_batches_accessing_bo() helper
panfrost: Kill the explicit serialization in panfrost_batch_submit()
panfrost: Get rid of the flush in panfrost_set_framebuffer_state()
panfrost: Do fine-grained flushing when preparing BO for CPU accesses
panfrost: Rename ctx->batches into ctx->fbo_to_batch
panfrost: Take draw call order into account
panfrost/ci: New tests are passing
.../drivers/panfrost/ci/expected-failures.txt | 4 -
src/gallium/drivers/panfrost/meson.build | 1 -
src/gallium/drivers/panfrost/pan_allocate.c | 22 +-
src/gallium/drivers/panfrost/pan_allocate.h | 20 -
src/gallium/drivers/panfrost/pan_assemble.c | 3 +-
src/gallium/drivers/panfrost/pan_blend_cso.c | 13 +-
src/gallium/drivers/panfrost/pan_bo.c | 331 +++++++-
src/gallium/drivers/panfrost/pan_bo.h | 130 +++
src/gallium/drivers/panfrost/pan_compute.c | 2 +-
src/gallium/drivers/panfrost/pan_context.c | 175 ++--
src/gallium/drivers/panfrost/pan_context.h | 22 +-
src/gallium/drivers/panfrost/pan_drm.c | 394 ---------
src/gallium/drivers/panfrost/pan_fragment.c | 3 -
src/gallium/drivers/panfrost/pan_instancing.c | 6 +-
src/gallium/drivers/panfrost/pan_job.c | 760 ++++++++++++++++--
src/gallium/drivers/panfrost/pan_job.h | 85 +-
src/gallium/drivers/panfrost/pan_mfbd.c | 1 +
src/gallium/drivers/panfrost/pan_resource.c | 65 +-
src/gallium/drivers/panfrost/pan_resource.h | 6 -
src/gallium/drivers/panfrost/pan_screen.c | 91 ++-
src/gallium/drivers/panfrost/pan_screen.h | 62 +-
src/gallium/drivers/panfrost/pan_sfbd.c | 1 +
src/gallium/drivers/panfrost/pan_varyings.c | 6 +-
23 files changed, 1456 insertions(+), 747 deletions(-)
create mode 100644 src/gallium/drivers/panfrost/pan_bo.h
delete mode 100644 src/gallium/drivers/panfrost/pan_drm.c
--
2.21.0
More information about the mesa-dev
mailing list