This series implements cached maps and explicit flushing for both panfrost and panthor. To avoid code/bug duplication, the tricky guts of the cache flusing ioctl which walk the sg list are broken into a new common shmem helper which can be used by any driver.
The PanVK MR to use this lives here: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36385 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 Boris Brezillon (6): drm/gem: Add a drm_gem_object_funcs::sync() and a drm_gem_sync() helper drm/prime: Provide default ::{begin,end}_cpu_access() implementations drm/panthor: Expose the selected coherency protocol to the UMD drm/panthor: Add an ioctl to query BO flags drm/panfrost: Expose the selected coherency protocol to the UMD drm/panfrost: Add an ioctl to query BO flags Faith Ekstrand (6): drm/shmem: Add a drm_gem_shmem_sync() helper drm/panthor: Add a PANTHOR_BO_SYNC ioctl drm/panthor: Bump the driver version to 1.6 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/drm_gem.c | 10 ++ drivers/gpu/drm/drm_gem_shmem_helper.c | 89 +++++++++++ drivers/gpu/drm/drm_prime.c | 36 +++++ drivers/gpu/drm/panfrost/panfrost_device.h | 1 + drivers/gpu/drm/panfrost/panfrost_drv.c | 106 ++++++++++++- drivers/gpu/drm/panfrost/panfrost_gem.c | 23 +++ drivers/gpu/drm/panfrost/panfrost_gem.h | 2 + drivers/gpu/drm/panfrost/panfrost_gpu.c | 18 ++- drivers/gpu/drm/panfrost/panfrost_regs.h | 2 + drivers/gpu/drm/panthor/panthor_device.c | 6 +- drivers/gpu/drm/panthor/panthor_drv.c | 85 +++++++++- drivers/gpu/drm/panthor/panthor_gem.c | 24 +++ drivers/gpu/drm/panthor/panthor_gem.h | 3 + drivers/gpu/drm/panthor/panthor_gpu.c | 2 +- drivers/gpu/drm/panthor/panthor_sched.c | 18 ++- include/drm/drm_gem.h | 45 ++++++ include/drm/drm_gem_shmem_helper.h | 11 ++ include/drm/drm_prime.h | 5 + include/uapi/drm/panfrost_drm.h | 74 +++++++++ include/uapi/drm/panthor_drm.h | 171 ++++++++++++++++++++- 20 files changed, 717 insertions(+), 14 deletions(-) -- 2.51.0
