Skip to content

drm/panfrost, panthor: Cached maps and explicit flushing

Boris Brezillon dri-devel 7 versions – Applied

Status from this message: Queued to drm-misc-next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest13 patches 2 repliesApplied
  2. v713 patches 3 repliesSuperseded
  3. v616 patches 16 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v516 patches18 repliesSuperseded
v414 patches25 repliesSuperseded
v314 patches9 repliesSuperseded
v213 patches19 repliesSuperseded

Changes in v8 from the cover letter

- Fix a double struct field assignment and collect R-b tags

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/13drm/panthor: Provide a custom dma_buf implementationdrivers/gpu/drm/panthor/panthor_drv.c drivers/gpu/drm/panthor/panthor_gem.c drivers/gpu/drm/panthor/panthor_gem.h+122 -10 replies
2/13drm/panthor: Fix panthor_gpu_coherency_set()drivers/gpu/drm/panthor/panthor_gpu.c+1 -10 replies
3/13drm/panthor: Expose the selected coherency protocol to the UMDdrivers/gpu/drm/panthor/panthor_device.c drivers/gpu/drm/panthor/panthor_gpu.c include/uapi/drm/panthor_drm.h+46 -51 reply
4/13drm/panthor: Add a PANTHOR_BO_SYNC ioctldrivers/gpu/drm/panthor/panthor_drv.c drivers/gpu/drm/panthor/panthor_gem.c drivers/gpu/drm/panthor/panthor_gem.h +1 more+179 -10 replies
5/13drm/panthor: Add an ioctl to query BO flagsdrivers/gpu/drm/panthor/panthor_drv.c include/uapi/drm/panthor_drm.h+81 -00 replies
6/13drm/panthor: Add flag to map GEM object Write-Back Cacheabledrivers/gpu/drm/panthor/panthor_drv.c drivers/gpu/drm/panthor/panthor_gem.c drivers/gpu/drm/panthor/panthor_sched.c +1 more+66 -50 replies
7/13drm/panthor: Bump the driver version to 1.7drivers/gpu/drm/panthor/panthor_drv.c+5 -10 replies
8/13drm/panfrost: Provide a custom dma_buf implementationdrivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c drivers/gpu/drm/panfrost/panfrost_gem.h+127 -00 replies
9/13drm/panfrost: Expose the selected coherency protocol to the UMDdrivers/gpu/drm/panfrost/panfrost_device.h drivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gpu.c +2 more+40 -50 replies
10/13drm/panfrost: Add a PANFROST_SYNC_BO ioctldrivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c drivers/gpu/drm/panfrost/panfrost_gem.h +1 more+182 -00 replies
11/13drm/panfrost: Add an ioctl to query BO flagsdrivers/gpu/drm/panfrost/panfrost_drv.c include/uapi/drm/panfrost_drm.h+52 -00 replies
12/13drm/panfrost: Add flag to map GEM object Write-Back Cacheabledrivers/gpu/drm/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_gem.c drivers/gpu/drm/panfrost/panfrost_gem.h +1 more+49 -30 replies
13/13drm/panfrost: Bump the driver version to 1.6drivers/gpu/drm/panfrost/panfrost_drv.c+4 -10 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchSteven PriceKarunika Choo
1/13R-b
2/13R-b
3/13R-b R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 00/13] drm/panfrost, panthor: Cached maps and explicit flushing

This series implements cached maps and explicit flushing for both panfrost and panthor.

The PanVK MR to use this lives here:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385

This version moves away from the code sharing proposed at the drm_prime/gem_shmem level and hand-roll a bunch of things that could potentially be shared. The goal here is to take the path of least resistance and discuss this controversial code-sharing topic in a follow-up MR. Dropping driver maintainers Cc-ed on v7 since they should now be aware that we changed gears and hand-rolled our own thing in pan{thor,frost}.

Changes in v2:
- Expose the coherency so userspace can know when it should skip cache maintenance
- Hook things up at drm_gem_object_funcs level to dma-buf cpu_prep hooks can be implemented generically
- Revisit the semantics of the flags passed to gem_sync()
- Add BO_QUERY_INFO ioctls to query BO flags on imported objects and let the UMD know when cache maintenance is needed on those

Changes in v3:
- New patch to fix panthor_gpu_coherency_set()
- No other major changes, check each patch changelog for more details

Changes in v4:
- Two trivial fixes, check each patch changelog for more details

Changes in v5:
- Add a way to overload dma_buf_ops while still relying on the drm_prime boilerplate
- Add default shmem implementation for dma_buf_ops::{begin,end}_cpu_access()
- Provide custom dma_buf_ops to deal with CPU cache flushes around CPU accesses when the BO is CPU-cacheable
- Go back to a version of drm_gem_shmem_sync() that only deals with cache maintenance, and adjust the semantics to make it clear this is the only thing it cares about
- Adjust the BO_SYNC ioctls according to the new drm_gem_shmem_sync() semantics

Changes in v6:
- No major changes, check the changelog in each patch for more details

Changes in v7:
- Drop the drm_prime/gem_shmem helpers and duplicate the logic in panthor/panfrost

Changes in v8:
- Fix a double struct field assignment and collect R-b tags

Boris Brezillon (8):
drm/panthor: Provide a custom dma_buf implementation drm/panthor: Fix panthor_gpu_coherency_set() drm/panthor: Expose the selected coherency protocol to the UMD drm/panthor: Add a PANTHOR_BO_SYNC ioctl
drm/panthor: Add an ioctl to query BO flags drm/panfrost: Provide a custom dma_buf implementation drm/panfrost: Expose the selected coherency protocol to the UMD drm/panfrost: Add an ioctl to query BO flags

Faith Ekstrand (4):
drm/panthor: Bump the driver version to 1.7 drm/panfrost: Add a PANFROST_SYNC_BO ioctl drm/panfrost: Add flag to map GEM object Write-Back Cacheable drm/panfrost: Bump the driver version to 1.6

Loïc Molinari (1):
drm/panthor: Add flag to map GEM object Write-Back Cacheable

 drivers/gpu/drm/panfrost/panfrost_device.h |   1 +
 drivers/gpu/drm/panfrost/panfrost_drv.c    | 101 ++++++++-
 drivers/gpu/drm/panfrost/panfrost_gem.c    | 239 ++++++++++++++++++++
 drivers/gpu/drm/panfrost/panfrost_gem.h    |  10 +
 drivers/gpu/drm/panfrost/panfrost_gpu.c    |  26 ++-
 drivers/gpu/drm/panfrost/panfrost_regs.h   |  10 +-
 drivers/gpu/drm/panthor/panthor_device.c   |  10 +-
 drivers/gpu/drm/panthor/panthor_drv.c      |  79 ++++++-
 drivers/gpu/drm/panthor/panthor_gem.c      | 240 ++++++++++++++++++++-
 drivers/gpu/drm/panthor/panthor_gem.h      |   6 +
 drivers/gpu/drm/panthor/panthor_gpu.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c    |  18 +-
 include/uapi/drm/panfrost_drm.h            |  76 ++++++-
 include/uapi/drm/panthor_drm.h             | 157 +++++++++++++-
 14 files changed, 953 insertions(+), 22 deletions(-)
Signature · 1 line
2.51.1