panfrost: Rework the batch pipelining logic

Submitted by Boris Brezillon on Sept. 5, 2019, 7:41 p.m.

Details

Reviewer None
Submitted Sept. 5, 2019, 7:41 p.m.
Last Updated Sept. 5, 2019, 7:42 p.m.
Revision 1

Cover Letter(s)

Revision 1
      Hello,

This is actually a v1 expect for patches 1 to 4, which have already
been submitted separately.

The goal here is to rework the panfrost_job logic (renamed
panfrost_batch at the beginning of the series) to avoid unnecessary
flushes when we can.

The new solution is based on the VC4/V3D implementation.

Regards,

Boris

Boris Brezillon (25):
  panfrost: s/job/batch/
  panfrost: Pass a batch to panfrost_drm_submit_vs_fs_batch()
  panfrost: Stop passing a ctx to functions being passed a batch
  panfrost: Make transient allocation rely on the BO cache
  panfrost: Convert ctx->{scratchpad,tiler_heap,tiler_dummy} to plain
    BOs
  panfrost: Get rid of unused panfrost_context fields
  panfrost: Get rid of the now unused SLAB allocator
  panfrost: Rename pan_bo_cache.c into pan_bo.c
  panfrost: Rework the panfrost_bo API
  panfrost: Make sure the BO is 'ready' when picked from the cache
  panfrost: Use a pipe_framebuffer_state as the batch key
  panfrost: Get rid of the unused 'flush jobs accessing res' infra
  panfrost: Allow testing if a specific batch is targeting a scanout FB
  panfrost: Move the fence creation in panfrost_flush()
  panfrost: Move the batch submission logic to panfrost_batch_submit()
  panfrost: Pass a batch to panfrost_{allocate,upload}_transient()
  panfrost: Pass a batch to functions emitting FB descs
  panfrost: Use ctx->wallpaper_batch in panfrost_blit_wallpaper()
  panfrost: Pass a batch to panfrost_set_value_job()
  panfrost: Prepare things to avoid flushes on FB switch
  panfrost: Add new helpers to describe job depencencies on BOs
  panfrost: Delay payloads[].offset_start initialization
  panfrost: Remove uneeded add_bo() in initialize_surface()
  panfrost: Support batch pipelining
  panfrost/ci: New tests are passing

 .../drivers/panfrost/ci/expected-failures.txt |   4 -
 src/gallium/drivers/panfrost/meson.build      |   2 +-
 src/gallium/drivers/panfrost/pan_allocate.c   |  95 +---
 src/gallium/drivers/panfrost/pan_allocate.h   |  40 +-
 src/gallium/drivers/panfrost/pan_assemble.c   |   3 +-
 src/gallium/drivers/panfrost/pan_blend_cso.c  |   9 +-
 src/gallium/drivers/panfrost/pan_blit.c       |   9 +-
 src/gallium/drivers/panfrost/pan_bo.c         | 405 ++++++++++++++
 src/gallium/drivers/panfrost/pan_bo.h         |  80 +++
 src/gallium/drivers/panfrost/pan_bo_cache.c   | 167 ------
 src/gallium/drivers/panfrost/pan_compute.c    |  12 +-
 src/gallium/drivers/panfrost/pan_context.c    | 478 +++++++----------
 src/gallium/drivers/panfrost/pan_context.h    |  51 +-
 src/gallium/drivers/panfrost/pan_drm.c        | 266 +---------
 src/gallium/drivers/panfrost/pan_fragment.c   |  32 +-
 src/gallium/drivers/panfrost/pan_instancing.c |   9 +-
 src/gallium/drivers/panfrost/pan_job.c        | 493 ++++++++++++------
 src/gallium/drivers/panfrost/pan_job.h        |  97 ++--
 src/gallium/drivers/panfrost/pan_mfbd.c       |  58 +--
 src/gallium/drivers/panfrost/pan_resource.c   |  64 +--
 src/gallium/drivers/panfrost/pan_resource.h   |   8 +-
 src/gallium/drivers/panfrost/pan_scoreboard.c |  29 +-
 src/gallium/drivers/panfrost/pan_screen.c     |   5 +-
 src/gallium/drivers/panfrost/pan_screen.h     |  62 +--
 src/gallium/drivers/panfrost/pan_sfbd.c       |  50 +-
 src/gallium/drivers/panfrost/pan_varyings.c   |  13 +-
 26 files changed, 1277 insertions(+), 1264 deletions(-)
 create mode 100644 src/gallium/drivers/panfrost/pan_bo.c
 create mode 100644 src/gallium/drivers/panfrost/pan_bo.h
 delete mode 100644 src/gallium/drivers/panfrost/pan_bo_cache.c
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[v3,01/25] panfrost: s/job/batch/ Boris Brezillon Accepted 1
[v3,02/25] panfrost: Pass a batch to panfrost_drm_submit_vs_fs_batch() Boris Brezillon Accepted 2
[v3,03/25] panfrost: Stop passing a ctx to functions being passed a batch Boris Brezillon Accepted 2
[v3,04/25] panfrost: Make transient allocation rely on the BO cache Boris Brezillon Accepted 1
[v3,05/25] panfrost: Convert ctx->{scratchpad, tiler_heap, tiler_dummy} to plain BOs Boris Brezillon Accepted 1
[v3,06/25] panfrost: Get rid of unused panfrost_context fields Boris Brezillon Accepted 1
[v3,07/25] panfrost: Get rid of the now unused SLAB allocator Boris Brezillon Accepted
[v3,08/25] panfrost: Rename pan_bo_cache.c into pan_bo.c Boris Brezillon Accepted
[v3,09/25] panfrost: Rework the panfrost_bo API Boris Brezillon New
[v3,10/25] panfrost: Make sure the BO is 'ready' when picked from the cache Boris Brezillon New
[v3,11/25] panfrost: Use a pipe_framebuffer_state as the batch key Boris Brezillon New
[v3,12/25] panfrost: Get rid of the unused 'flush jobs accessing res' infra Boris Brezillon New
[v3,13/25] panfrost: Allow testing if a specific batch is targeting a scanout FB Boris Brezillon Accepted
[v3,14/25] panfrost: Move the fence creation in panfrost_flush() Boris Brezillon Accepted 1
[v3,15/25] panfrost: Move the batch submission logic to panfrost_batch_submit() Boris Brezillon New
[v3,16/25] panfrost: Pass a batch to panfrost_{allocate, upload}_transient() Boris Brezillon Accepted
[v3,17/25] panfrost: Pass a batch to functions emitting FB descs Boris Brezillon Accepted
[v3,18/25] panfrost: Use ctx->wallpaper_batch in panfrost_blit_wallpaper() Boris Brezillon Accepted
[v3,19/25] panfrost: Pass a batch to panfrost_set_value_job() Boris Brezillon Accepted
[v3,20/25] panfrost: Prepare things to avoid flushes on FB switch Boris Brezillon Accepted
[v3,21/25] panfrost: Add new helpers to describe job depencencies on BOs Boris Brezillon New
[v3,22/25] panfrost: Delay payloads[].offset_start initialization Boris Brezillon Accepted
[v3,23/25] panfrost: Remove uneeded add_bo() in initialize_surface() Boris Brezillon New
[v3,24/25] panfrost: Support batch pipelining Boris Brezillon New
[v3,25/25] panfrost/ci: New tests are passing Boris Brezillon New