| From: |
| Boris Brezillon <boris.brezillon-AT-collabora.com> |
| To: |
| Steven Price <steven.price-AT-arm.com> |
| Subject: |
| [PATCH v7 00/13] drm/panfrost, panthor: Cached maps and explicit flushing |
| Date: |
| Wed, 03 Dec 2025 10:01:28 +0100 |
| Message-ID: |
| <20251203090141.227394-1-boris.brezillon@collabora.com> |
| Cc: |
| dri-devel-AT-lists.freedesktop.org, Maarten Lankhorst <maarten.lankhorst-AT-linux.intel.com>, Maxime Ripard <mripard-AT-kernel.org>, Thomas Zimmermann <tzimmermann-AT-suse.de>, David Airlie <airlied-AT-gmail.com>, Simona Vetter <simona-AT-ffwll.ch>, Faith Ekstrand <faith.ekstrand-AT-collabora.com>, Thierry Reding <thierry.reding-AT-gmail.com>, Mikko Perttunen <mperttunen-AT-nvidia.com>, Melissa Wen <mwen-AT-igalia.com>, Maíra Canal <mcanal-AT-igalia.com>, Lucas De Marchi <lucas.demarchi-AT-intel.com>, Thomas Hellström <thomas.hellstrom-AT-linux.intel.com>, Rodrigo Vivi <rodrigo.vivi-AT-intel.com>, Frank Binns <frank.binns-AT-imgtec.com>, Matt Coster <matt.coster-AT-imgtec.com>, Rob Clark <robin.clark-AT-oss.qualcomm.com>, Dmitry Baryshkov <lumag-AT-kernel.org>, Abhinav Kumar <abhinav.kumar-AT-linux.dev>, Jessica Zhang <jessica.zhang-AT-oss.qualcomm.com>, Sean Paul <sean-AT-poorly.run>, Marijn Suijten <marijn.suijten-AT-somainline.org>, Alex Deucher <alexander.deucher-AT-amd.com>, Christian König <christian.koenig-AT-amd.com>, amd-gfx-AT-lists.freedesktop.org, Boris Brezillon <boris.brezillon-AT-collabora.com>, kernel-AT-collabora.com |
| Archive-link: |
| Article |
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...
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. Keeping everyone Cc-ed on the previous
version involved, so they're aware of this change of direction,
sorry for the noise if you don't care :-/.
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
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.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/panfrost/panfrost_device.h | 1 +
drivers/gpu/drm/panfrost/panfrost_drv.c | 101 ++++++++-
drivers/gpu/drm/panfrost/panfrost_gem.c | 240 +++++++++++++++++++++
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, 954 insertions(+), 22 deletions(-)
--
2.51.1