Re: [PATCH] drm/panthor: Reset queue slots if termination fails

2025-05-15 Thread Boris Brezillon
that are not terminated correctly. > > Signed-off-by: Ashley Smith Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_sched.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_sch

Re: [PATCH 1/3] drm/panfrost: Add BO labelling to Panfrost

2025-05-07 Thread Boris Brezillon
On Wed, 7 May 2025 14:01:04 +0100 Adrián Larumbe wrote: > On 06.05.2025 08:54, Boris Brezillon wrote: > > On Thu, 24 Apr 2025 03:21:30 +0100 > > Adrián Larumbe wrote: > > > > > Unlike in Panthor, from where this change is based on, there is no need > > >

Re: [PATCH 1/3] drm/panfrost: Add BO labelling to Panfrost

2025-05-06 Thread Boris Brezillon
On Thu, 24 Apr 2025 03:21:30 +0100 Adrián Larumbe wrote: > Unlike in Panthor, from where this change is based on, there is no need > to support tagging of BO's other than UM-exposed ones, so all strings > can be freed with kfree(). > > This commit is done in preparation of a following one that w

Re: [PATCH 3/3] drm/panfrost: show device-wide list of DRM GEM objects over DebugFS

2025-05-06 Thread Boris Brezillon
On Thu, 24 Apr 2025 03:21:32 +0100 Adrián Larumbe wrote: > This change is essentially a Panfrost port of commit a3707f53eb3f > ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS"). > > The DebugFS file is almost the same as in Panthor, minus the GEM object > usage flags, since

Re: [PATCH 2/3] drm/panfrost: Add driver IOCTL for setting BO labels

2025-05-05 Thread Boris Brezillon
On Thu, 24 Apr 2025 03:21:31 +0100 Adrián Larumbe wrote: > Allow UM to label a BO for which it possesses a DRM handle. > > Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 44 - > driver

Re: [PATCH v3] drm/gem: Internally test import_attach for imported objects

2025-05-05 Thread Boris Brezillon
On Wed, 30 Apr 2025 11:07:17 +0200 Simona Vetter wrote: > On Wed, Apr 16, 2025 at 11:38:03AM +0200, Simona Vetter wrote: > > On Wed, Apr 16, 2025 at 08:57:45AM +0200, Thomas Zimmermann wrote: > > > Test struct drm_gem_object.import_attach to detect imported objects. > > > > > > During object c

Re: [PATCH] drm/panthor: Fix build warning when DEBUG_FS is disabled

2025-04-29 Thread Boris Brezillon
On Thu, 24 Apr 2025 19:40:34 +0100 Adrián Larumbe wrote: > Commit a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM > objects over DebugFS") causes a build warning and linking error when > built without support for DebugFS, because of a non-inline non-static > function declaration in a

Re: [PATCH] drm/doc: Start documenting aspects specific to tile-based renderers

2025-04-28 Thread Boris Brezillon
Hi Iago, On Mon, 28 Apr 2025 08:55:07 +0200 Iago Toral wrote: > Hi, > > Pitching in to describe the situation for v3d: Thanks for chiming in. > > El vie, 18-04-2025 a las 14:25 +0200, Boris Brezillon escribió: > > (...) > > +For all these reasons, the til

Re: [PATCH] drm/doc: Start documenting aspects specific to tile-based renderers

2025-04-28 Thread Boris Brezillon
Hi Steve, On Wed, 23 Apr 2025 10:41:53 +0100 Steven Price wrote: > On 18/04/2025 13:25, Boris Brezillon wrote: > > Tile-based GPUs come with a set of constraints that are not present > > when immediate rendering is used. This new document tries to explain > > the dif

Re: [PATCH] drm/doc: Start documenting aspects specific to tile-based renderers

2025-04-28 Thread Boris Brezillon
Hi Alyssa, On Wed, 23 Apr 2025 10:47:21 -0400 Alyssa Rosenzweig wrote: > Steven wanted non-Mali eyes, so with my Imaginapple hat on... > > > +All lot of embedded GPUs are using tile-based rendering instead of > > immediate > > s/All lot of/Many/ Will change that. > > > +- Complex geometr

Re: [PATCH 09/15] drm/panthor: Test for imported buffers with drm_gem_is_imported()

2025-04-25 Thread Boris Brezillon
h is just an artifact of the import. Prepares > > to make import_attach optional. > > > > Signed-off-by: Thomas Zimmermann > > Cc: Boris Brezillon > > Cc: Steven Price > > Cc: Liviu Dudau > > --- > > drivers/gpu/drm/panthor/panthor_gem.c | 2 +- &g

Re: [PATCH] drm/panthor: fix building without CONFIG_DEBUG_FS

2025-04-24 Thread Boris Brezillon
On Thu, 24 Apr 2025 14:10:16 +0200 "Arnd Bergmann" wrote: > On Thu, Apr 24, 2025, at 13:41, Boris Brezillon wrote: > > On Thu, 24 Apr 2025 13:25:47 +0200 > >> +#ifdef CONFIG_DEBUG_FS > >>bo->debugfs.flags = usage_flags | > &g

Re: [PATCH] drm/panthor: fix building without CONFIG_DEBUG_FS

2025-04-24 Thread Boris Brezillon
On Thu, 24 Apr 2025 13:25:47 +0200 Arnd Bergmann wrote: > From: Arnd Bergmann > > When debugfs is disabled, including panthor_gem.h causes warnings > about a non-static global function defined in a header: > > In file included from drivers/gpu/drm/panthor/panthor_drv.c:30: > drivers/gpu/drm/pa

Re: [PATCH v10 0/4] Panthor BO tagging and GEMS debug display

2025-04-23 Thread Boris Brezillon
On Wed, 23 Apr 2025 03:12:30 +0100 Adrián Larumbe wrote: > This patch series is aimed at providing UM with detailed memory profiling > information in debug builds. It is achieved through a device-wide list of > DRM GEM objects, and also implementing the ability to label BO's from UM > through a n

Re: [PATCH v10 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-23 Thread Boris Brezillon
On Wed, 23 Apr 2025 09:01:49 +0200 Boris Brezillon wrote: > > + > > +enum panthor_debugfs_gem_usage_flags { > > + PANTHOR_DEBUGFS_GEM_USAGE_KERNEL_BIT = 0, > > + PANTHOR_DEBUGFS_GEM_USAGE_FW_MAPPED_BIT = 1, > > Now that you print the flags as raw hex value

Re: [PATCH v10 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-23 Thread Boris Brezillon
l BO and/or mapped onto the FW's address space. > > GEM state and usage flag meanings are printed in the file prelude, so > that UM parsing tools can interpret the numerical values in the table. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Liviu Dudau >

Re: [PATCH v3] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-22 Thread Boris Brezillon
On Thu, 17 Apr 2025 14:19:42 +0200 Boris Brezillon wrote: > Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by > panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can > have a file offset but can't be mapped anyway, because > panthor_gem_mmap() will filter the

Re: [PATCH v9 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-22 Thread Boris Brezillon
On Fri, 18 Apr 2025 21:15:32 +0100 Adrián Larumbe wrote: > Hi Boris, > > On 18.04.2025 10:04, Boris Brezillon wrote: > > On Fri, 18 Apr 2025 03:27:07 +0100 > > Adrián Larumbe wrote: > > > > > +#ifdef CONFIG_DEBUG_FS > > > +static void > >

Re: [PATCH v9 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-18 Thread Boris Brezillon
On Fri, 18 Apr 2025 03:27:07 +0100 Adrián Larumbe wrote: > + static const char * const gem_state_flags_names[] = { > + [PANTHOR_DEBUGFS_GEM_STATE_FLAG_IMPORTED] = "imported", > + [PANTHOR_DEBUGFS_GEM_STATE_FLAG_EXPORTED] = "exported", Okay, I think I know where the fl

[PATCH] drm/doc: Start documenting aspects specific to tile-based renderers

2025-04-18 Thread Boris Brezillon
document will be updated with new materials as we refine the libraries we add to help deal with tilers, and have more drivers converted to follow the rules listed here. Signed-off-by: Boris Brezillon --- Documentation/gpu/drm-tile-based-renderer.rst | 201 ++ Documentation/gpu/index.rst

Re: [PATCH v9 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-18 Thread Boris Brezillon
On Fri, 18 Apr 2025 10:11:56 +0200 Boris Brezillon wrote: > On Fri, 18 Apr 2025 03:27:07 +0100 > Adrián Larumbe wrote: > > > + static const char * const gem_state_flags_names[] = { > > + [PANTHOR_DEBUGFS_GEM_STATE_FLAG_IMPORTED] = "imported", FYI,

Re: [PATCH v9 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-18 Thread Boris Brezillon
On Fri, 18 Apr 2025 03:27:07 +0100 Adrián Larumbe wrote: > +#ifdef CONFIG_DEBUG_FS > +static void > +panthor_gem_debugfs_format_flags(char flags_str[], int flags_len, > + const char * const names[], u32 name_count, > + u32 flags) > +{ > +

Re: [PATCH v2 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 16:13:49 +0100 Steven Price wrote: > On 17/04/2025 15:49, Boris Brezillon wrote: > > Currently, we pick the MMIO offset based on the size of the pgoff_t > > type seen by the process that manipulates the FD, such that a 32-bit > > process can always map

[PATCH v2 0/2] drm/panthor: Fix panthor+FEX-Emu

2025-04-17 Thread Boris Brezillon
at we need [1]https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34573 Boris Brezillon (2): drm/panthor: Add missing explicit padding in drm_panthor_gpu_info drm/panthor: Fix the user MMIO offset logic for emulators drivers/gpu/drm/panthor/panthor_device.h | 18 drivers/gpu/drm/p

[PATCH v2 1/2] drm/panthor: Add missing explicit padding in drm_panthor_gpu_info

2025-04-17 Thread Boris Brezillon
hor which are either arm32 or arm64 where the 64-bit alignment of u64 fields is already enforced a the compiler level. Changes in v2: - Rename the garbage field into pad0 and adjust the comment accordingly - Add Liviu's R-b Fixes: 0f25e493a246 ("drm/panthor: Add uAPI") Signed-off-b

[PATCH v2 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
IO_OFFSET requests to race with mmap() requests - Don't do the is_user_mmio_offset test twice in panthor_mmap() - Improve the uAPI docs Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.h | 18 drivers/gpu/drm/panthor/panthor_drv.c| 56 +

Re: [PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 14:10:31 +0200 Boris Brezillon wrote: > > I can't help feeling we can just simplify this to: > > > > u64 mmio_offset = pfile->user_mmio.offset; > > > > if (offset >= mmio_offset) { > >

Re: [PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 12:33:01 +0100 Liviu Dudau wrote: > On Thu, Apr 17, 2025 at 11:41:18AM +0100, Steven Price wrote: > > On 17/04/2025 11:05, Boris Brezillon wrote: > > > Currently, we pick the MMIO offset based on the size of the pgoff_t > > > type seen by the proc

Re: [PATCH v8 2/4] drm/panthor: Add driver IOCTL for setting BO labels

2025-04-17 Thread Boris Brezillon
On Tue, 15 Apr 2025 20:15:31 +0100 Adrián Larumbe wrote: > +/** > + * struct drm_panthor_bo_set_label - Arguments passed to > DRM_IOCTL_PANTHOR_BO_SET_LABEL > + */ > +struct drm_panthor_bo_set_label { > + /** @handle: Handle of the buffer object to label. */ > + __u32 handle; > + Funny

[PATCH v3] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-17 Thread Boris Brezillon
INVAL Changes in v3: - Don't leak the BO ref - Add R-bs Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Liviu Dudau --- drivers/gpu/drm/panthor/panthor_drv.c | 7 +++ drivers/gpu/drm/panthor/panthor_gem.c | 13 + 2 files changed, 8 insertions(+), 12

Re: [PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 11:41:18 +0100 Steven Price wrote: > On 17/04/2025 11:05, Boris Brezillon wrote: > > Currently, we pick the MMIO offset based on the size of the pgoff_t > > type seen by the process that manipulates the FD, such that a 32-bit > > process can always map

Re: [PATCH 1/2] drm/panthor: Fix missing explicit padding in drm_panthor_gpu_info

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 11:24:32 +0100 Steven Price wrote: > On 17/04/2025 11:05, Boris Brezillon wrote: > > drm_panthor_gpu_info::shader_present is currently automatically offset > > by 4 byte to meet Arm's 32-bit/64-bit field alignment rules, but those > > constraints don

Re: [PATCH v2] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 10:53:23 +0100 Matthew Auld wrote: > On 17/04/2025 10:32, Boris Brezillon wrote: > > Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by > > panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can > > have a file offset but can't

[PATCH 0/2] drm/panthor: Fix panthor+FEX-Emu

2025-04-17 Thread Boris Brezillon
hrough FEX without using the host mesa (if we were to use the thunked mesa lib, both the kernel and mesa would use MMIO_OFFSET_64BIT, and the problem doesn't exist anymore). Regards, Boris [1]https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34573 Boris Brezillon (2): drm/panthor: Fix m

[PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Boris Brezillon
e need a way to explicitly set the user MMIO offset from the UMD, such that the kernel doesn't have to guess it from the TIF_32BIT flag set on user thread. We keep the old behavior if DRM_PANTHOR_SET_USER_MMIO_OFFSET is never called. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/p

[PATCH 1/2] drm/panthor: Fix missing explicit padding in drm_panthor_gpu_info

2025-04-17 Thread Boris Brezillon
hor which are either arm32 or arm64 where the 64-bit alignment of u64 fields is already enforced a the compiler level. Fixes: 0f25e493a246 ("drm/panthor: Add uAPI") Signed-off-by: Boris Brezillon --- include/uapi/drm/panthor_drm.h | 12 1 file changed, 12 insertions(+)

Re: [PATCH v2] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-17 Thread Boris Brezillon
On Thu, 17 Apr 2025 11:32:47 +0200 Boris Brezillon wrote: > Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by > panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can > have a file offset but can't be mapped anyway, because > panthor_gem_mmap() will filter the

[PATCH v2] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-17 Thread Boris Brezillon
INVAL Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_drv.c | 5 + drivers/gpu/drm/panthor/panthor_gem.c | 13 + 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c

Re: [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path

2025-04-17 Thread Boris Brezillon
On Mon, 14 Apr 2025 15:01:20 +0200 Boris Brezillon wrote: > The panthor_gpu_coherency_init() call has been moved around, but the > error path hasn't been adjusted accordingly. Make sure we undo what > has been done before this call in case of failure. > > Fixes: 7d5a3b22f5b5

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-16 Thread Boris Brezillon
On Wed, 16 Apr 2025 16:16:05 +0100 Steven Price wrote: > On 15/04/2025 10:47, Boris Brezillon wrote: > > On Mon, 14 Apr 2025 16:34:35 +0100 > > Steven Price wrote: > > > >> On 14/04/2025 13:47, Boris Brezillon wrote: > >>> On Fri, 11 Apr 2025 1

Re: [PATCH] drm/panthor: Enforce DRM_PANTHOR_BO_NO_MMAP

2025-04-16 Thread Boris Brezillon
On Wed, 16 Apr 2025 15:26:42 +0100 Steven Price wrote: > On 15/04/2025 11:57, Boris Brezillon wrote: > > Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by > > panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can > > still be mmap-ed. > > >

Re: [PATCH v3] drm/gem: Internally test import_attach for imported objects

2025-04-16 Thread Boris Brezillon
Happens for calls to drm_mode_destroy_dumb_ioctl() that > clears the dma_buf field in drm_gem_object_exported_dma_buf_free(). Also happens when the GEM handle is released, which is the case we were hitting in Panthor. > > v3: > - only test for import_attach (Boris) Reviewed-by: Boris Brezillon > v2: >

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-15 Thread Boris Brezillon
On Mon, 14 Apr 2025 09:03:55 -0400 Alyssa Rosenzweig wrote: > > Actually, CSF stands in the way of re-allocating memory to other > > contexts, because once we've allocated memory to a tiler heap, the FW > > manages this pool of chunks, and recycles them. Mesa can intercept > > the "returned chunk

Re: [PATCH] drm/panthor: Enforce DRM_PANTHOR_BO_NO_MMAP

2025-04-15 Thread Boris Brezillon
On Tue, 15 Apr 2025 12:57:10 +0200 Boris Brezillon wrote: > Right now the DRM_PANTHOR_BO_NO_MMAP flag is ignored by > panthor_ioctl_bo_mmap_offset(), meaning BOs with this flag set can > still be mmap-ed. > > Fortunately, this bug only impacts user BOs, because kernel BOs are n

Re: [PATCH v2] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Boris Brezillon
On Tue, 15 Apr 2025 16:02:20 +0200 Thomas Zimmermann wrote: > Test struct drm_gem_object.import_attach.dmabuf to detect imported > objects. Warn if the stored state is inconsistent. > > During object clenaup, the dma_buf field might be NULL. Testing it in > an object's free callback then incorre

Re: [PATCH] drm/gem: Internally test import_attach for imported objects

2025-04-15 Thread Boris Brezillon
On Tue, 15 Apr 2025 14:19:20 +0200 Christian König wrote: > Am 15.04.25 um 12:45 schrieb Thomas Zimmermann: > > Hi > > > > Am 15.04.25 um 11:39 schrieb Christian König: > >> Am 15.04.25 um 11:20 schrieb Thomas Zimmermann: > >>> Test struct drm_gem_object.import_attach to detect imported > >>>

[PATCH] drm/panthor: Enforce DRM_PANTHOR_BO_NO_MMAP

2025-04-15 Thread Boris Brezillon
-ed anyway. Given all user BOs setting this flag are private anyway (not shareable), there's no potential data leak. Fixes: 4bdca1150792 ("drm/panthor: Add the driver frontend block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_drv.c | 5 + 1 file chang

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-15 Thread Boris Brezillon
On Mon, 14 Apr 2025 16:34:35 +0100 Steven Price wrote: > On 14/04/2025 13:47, Boris Brezillon wrote: > > On Fri, 11 Apr 2025 16:39:02 +0200 > > Boris Brezillon wrote: > > > >> On Fri, 11 Apr 2025 15:13:26 +0200 > >> Christian König wrote: > >&g

Re: [PATCH v3] drm/panthor: Make the timeout per-queue instead of per-job

2025-04-14 Thread Boris Brezillon
s not scheduled, we suspend the > > > timeout again which undoes what drm_sched_job_begin() did when calling > > > drm_sched_start_timeout(). So the timeout does not reset when a job > > > is finished. > > > > > > Co-developed-by: Boris Brezil

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-14 Thread Boris Brezillon
On Mon, 14 Apr 2025 16:34:47 +0200 Simona Vetter wrote: > On Mon, Apr 14, 2025 at 02:08:25PM +0100, Liviu Dudau wrote: > > On Mon, Apr 14, 2025 at 01:22:06PM +0200, Boris Brezillon wrote: > > > Hi Sima, > > > > > > On Fri, 11 Apr 2025 14:01

[PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path

2025-04-14 Thread Boris Brezillon
eported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/pant

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-14 Thread Boris Brezillon
On Fri, 11 Apr 2025 16:39:02 +0200 Boris Brezillon wrote: > On Fri, 11 Apr 2025 15:13:26 +0200 > Christian König wrote: > > > > > > >> Background is that you don't get a crash, nor error message, nor > > >> anything indicating what is happe

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-14 Thread Boris Brezillon
Hi Sima, On Fri, 11 Apr 2025 14:01:16 +0200 Simona Vetter wrote: > On Thu, Apr 10, 2025 at 08:41:55PM +0200, Boris Brezillon wrote: > > On Thu, 10 Apr 2025 14:01:03 -0400 > > Alyssa Rosenzweig wrote: > > > > > > > > In Panfrost and Lima, we

Re: [PATCH 1/4] drm/client: Do not pin in drm_client_buffer_vmap()

2025-04-14 Thread Boris Brezillon
lable until the vunmap happens. And as the pages > in DMA or SHMEM areas cannot be moved, there is no reason to call > pin. Hence remove the pin call. > > Update drm_client_buffer_vunmap() accordingly. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Boris Brezillon > ---

Re: [bug report] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()

2025-04-14 Thread Boris Brezillon
On Sat, 12 Apr 2025 17:39:58 +0300 Dan Carpenter wrote: > Hello Boris Brezillon, > > Commit 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() > after PM resume()") from Apr 4, 2025 (linux-next), leads to the > following Smatch static checker warning: &

Re: [PATCH v2 2/2] drm/panthor: Clean up 64-bit register definitions

2025-04-11 Thread Boris Brezillon
definitions. > > Suggested-by: Boris Brezillon > Signed-off-by: Karunika Choo Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_gpu.c | 12 ++-- > drivers/gpu/drm/panthor/panthor_gpu.h | 10 +-- > drivers/gpu/drm/panthor/panthor_mmu.c | 16 ++--- > dr

Re: [PATCH] drm/panthor: Add 64-bit and poll register accessors

2025-04-11 Thread Boris Brezillon
On Fri, 11 Apr 2025 16:17:56 +0100 Karunika Choo wrote: > On 10/04/2025 17:46, Boris Brezillon wrote: > > On Thu, 10 Apr 2025 17:35:46 +0100 > > Karunika Choo wrote: > > > >> This patch adds 64-bit register accessors to simplify register access in > >>

Re: [PATCH v2 1/2] drm/panthor: Add 64-bit and poll register accessors

2025-04-11 Thread Boris Brezillon
> functions. > > Signed-off-by: Karunika Choo Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_device.h | 71 > drivers/gpu/drm/panthor/panthor_fw.c | 9 +- > drivers/gpu/drm/panthor/panthor_gpu.c| 142 ++---

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-11 Thread Boris Brezillon
On Fri, 11 Apr 2025 15:13:26 +0200 Christian König wrote: > > > >> Background is that you don't get a crash, nor error message, nor > >> anything indicating what is happening. > > The job times out at some point, but we might get stuck in the fault > > handler waiting for memory, which is pre

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-11 Thread Boris Brezillon
On Fri, 11 Apr 2025 14:45:49 +0200 Christian König wrote: > Am 11.04.25 um 14:02 schrieb Boris Brezillon: > >>> I guess this leaves older GPUs that don't support incremental > >>> rendering in a bad place though. > >> Well what's the handling th

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-11 Thread Boris Brezillon
On Fri, 11 Apr 2025 12:55:57 +0200 Christian König wrote: > Am 11.04.25 um 10:38 schrieb Boris Brezillon: > > On Fri, 11 Apr 2025 10:04:07 +0200 > > Christian König wrote: > > > >> Am 10.04.25 um 20:41 schrieb Boris Brezillon: > >>> On Thu, 10 Apr 2

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-11 Thread Boris Brezillon
On Fri, 11 Apr 2025 10:04:07 +0200 Christian König wrote: > Am 10.04.25 um 20:41 schrieb Boris Brezillon: > > On Thu, 10 Apr 2025 14:01:03 -0400 > > Alyssa Rosenzweig wrote: > > > >>>>> In Panfrost and Lima, we don't have this concept of "in

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-11 Thread Boris Brezillon
Hi Christian, On Thu, 10 Apr 2025 20:52:27 +0200 Christian König wrote: > Am 10.04.25 um 19:20 schrieb Boris Brezillon: > > [SNIP] > >>>> Faulting is only legal when you have something like HMM, SVM or > >>>> whatever you call it. And then you can

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-10 Thread Boris Brezillon
On Thu, 10 Apr 2025 14:01:03 -0400 Alyssa Rosenzweig wrote: > > > > In Panfrost and Lima, we don't have this concept of "incremental > > > > rendering", so when we fail the allocation, we just fail the GPU job > > > > with an unhandled GPU fault. > > > > > > To be honest I think that this is

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-10 Thread Boris Brezillon
Hi Christian, On Thu, 10 Apr 2025 18:43:29 +0200 Christian König wrote: > Hi Boris, > > Am 10.04.25 um 17:53 schrieb Boris Brezillon: > > Hi Christian, > > > > On Thu, 10 Apr 2025 17:05:07 +0200 > > Christian König wrote: > > > >> Hi Boris,

Re: [PATCH] drm/panthor: Add 64-bit and poll register accessors

2025-04-10 Thread Boris Brezillon
On Thu, 10 Apr 2025 17:35:46 +0100 Karunika Choo wrote: > This patch adds 64-bit register accessors to simplify register access in > Panthor. It also adds 32-bit and 64-bit variants for read_poll_timeout. > > This patch also updates Panthor to use the new 64-bit accessors and poll > functions. >

Re: [PATCH v2 1/9] drm/panthor: Add 64-bit and poll register accessors

2025-04-10 Thread Boris Brezillon
On Wed, 9 Apr 2025 14:00:54 +0100 Karunika Choo wrote: > On 21/03/2025 07:48, Boris Brezillon wrote: > > On Thu, 20 Mar 2025 11:17:33 + > > Karunika Choo wrote: > > > >> This patch adds 64-bit register accessors to simplify register access in > >>

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-10 Thread Boris Brezillon
Hi Christian, On Thu, 10 Apr 2025 17:05:07 +0200 Christian König wrote: > Hi Boris, > > thanks for looping me in. Can you also send the full patch set to me since I > don't see that on the mailing list (yet maybe). > > Am 10.04.25 um 16:48 schrieb Boris Brezillon: >

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-10 Thread Boris Brezillon
ab MRs, here's a link [1] to a Draft > MR grouping those changes, but I'm in no way asking that the review > happens on gitlab. > > Regards, > > Boris > > [1]https://gitlab.freedesktop.org/panfrost/linux/-/merge_requests/16 > [2]https://lore.kernel.org/lkml/202503

Re: [PATCH v2 5/9] drm/panthor: Make getting GPU model name simple and extensible

2025-04-10 Thread Boris Brezillon
On Thu, 10 Apr 2025 14:20:59 +0100 Karunika Choo wrote: > On 21/03/2025 08:02, Boris Brezillon wrote: > > On Thu, 20 Mar 2025 11:17:37 + > > Karunika Choo wrote: > > > >> This patch replaces the previous panthor_model structure with a simple > >&

Re: [PATCH v2 2/9] drm/panthor: Use 64-bit and poll register accessors

2025-04-10 Thread Boris Brezillon
On Wed, 9 Apr 2025 14:07:20 +0100 Karunika Choo wrote: > On 21/03/2025 07:53, Boris Brezillon wrote: > > On Thu, 20 Mar 2025 11:17:34 + > > Karunika Choo wrote: > > > >> This patch updates Panthor to use the new 64-bit accessors and poll > >> func

Re: [PATCH v3 0/5] drm/panthor: Misc fixes

2025-04-10 Thread Boris Brezillon
On Fri, 4 Apr 2025 10:09:28 +0200 Boris Brezillon wrote: > Hello, > > This is a collection of fixes for bugs found while working on adding > JM support to panthor. Those are not particularly tied to JM support > and are worth having regardless. > > Note that the last two

Re: [PATCH v6 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-09 Thread Boris Brezillon
l BO and/or mapped onto the FW's address space. > > Signed-off-by: Adrián Larumbe A couple minor things below, once addressed, this is `Reviewed-by: Boris Brezillon ` > --- > drivers/gpu/drm/panthor/panthor_device.c | 5 + > drivers/gpu/drm/panthor/panthor_device.h | 1

Re: [PATCH v5 2/4] drm/panthor: Add driver IOCTL for setting BO labels

2025-04-09 Thread Boris Brezillon
On Tue, 8 Apr 2025 23:24:22 +0100 Adrián Larumbe wrote: > Allow UM to label a BO for which it possesses a DRM handle. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Liviu Dudau Just one minor doc issue below, but with this fixed, it's Reviewed-by: Boris Brezillon >

Re: [PATCH v5 3/4] drm/panthor: Label all kernel BO's

2025-04-09 Thread Boris Brezillon
n the > future, this would have to change. > > Signed-off-by: Adrián Larumbe Just one modification suggested on a label, but this looks good otherwise Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_fw.c| 8 +--- > drivers/gpu/drm/panthor

Re: [PATCH 1/2] dma-fence: Rename dma_fence_is_signaled()

2025-04-09 Thread Boris Brezillon
Hi Philipp, On Wed, 9 Apr 2025 14:06:37 +0200 Philipp Stanner wrote: > dma_fence_is_signaled()'s name strongly reads as if this function were > intended for checking whether a fence is already signaled. Also the > boolean it returns hints at that. > > The function's behavior, however, is more

Re: [PATCH v5 1/4] drm/panthor: Introduce BO labeling

2025-04-09 Thread Boris Brezillon
time, but allocating it is the responsibility > of callers. > > Signed-off-by: Adrián Larumbe One minor thing below, but this looks good otherwise Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_gem.c | 38 +++ > driv

Re: [PATCH v5 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-09 Thread Boris Brezillon
On Tue, 8 Apr 2025 23:24:24 +0100 Adrián Larumbe wrote: > Add a device DebugFS file that displays a complete list of all the DRM > GEM objects that are exposed to UM through a DRM handle. > > Since leaking object identifiers that might belong to a different NS is > inadmissible, this functional

Re: [PATCH v4 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-08 Thread Boris Brezillon
On Tue, 8 Apr 2025 14:38:44 +0100 Adrián Larumbe wrote: > > > diff --git a/drivers/gpu/drm/panthor/panthor_gem.c > > > b/drivers/gpu/drm/panthor/panthor_gem.c > > > index 44d027e6d664..2fc87be9b700 100644 > > > --- a/drivers/gpu/drm/panthor/panthor_gem.c > > > +++ b/drivers/gpu/drm/panthor/panth

Re: [PATCH v4 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-08 Thread Boris Brezillon
On Wed, 2 Apr 2025 12:54:29 +0100 Adrián Larumbe wrote: > +static void panthor_gem_debugfs_bo_print(struct panthor_gem_object *bo, > + struct seq_file *m, > + struct gem_size_totals *totals) > +{ > + unsigned int refco

Re: [PATCH v4 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-08 Thread Boris Brezillon
On Tue, 8 Apr 2025 15:38:18 +0100 Adrián Larumbe wrote: > On 08.04.2025 15:47, Boris Brezillon wrote: > On Tue, 8 Apr 2025 14:38:44 +0100 > Adrián Larumbe wrote: > > > > > > diff --git a/drivers/gpu/drm/panthor/panthor_gem.c > > > > > b/drivers/gpu

Re: [PATCH v2 16/32] Introduce drm_gpuvm_sm_map_ops_flags enums for sm_map_ops

2025-04-07 Thread Boris Brezillon
te (Danilo) > - Add doc (Danilo) > > Cc: Danilo Krummrich > Cc: Matthew Brost > Cc: Boris Brezillon > Cc: > Signed-off-by: Himal Prasad Ghimiray > > --- > RFC Link: > https://lore.kernel.org/intel-xe/20250314080226.2059819-1-himal.prasad.ghimi...@

Re: [PATCH v20 09/10] drm/shmem-helper: Switch drm_gem_shmem_vmap/vunmap to use pin/unpin

2025-04-07 Thread Boris Brezillon
On Fri, 4 Apr 2025 16:58:20 +0200 Thomas Zimmermann wrote: > Hi > > Am 04.04.25 um 16:52 schrieb Boris Brezillon: > > On Fri, 4 Apr 2025 10:01:50 +0200 > > Thomas Zimmermann wrote: > > > >>>> In your case, vmap an pin both intent to hold the shmem p

Re: [PATCH 1/3] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()

2025-04-05 Thread Boris Brezillon
On Tue, 1 Apr 2025 17:17:40 +0100 Liviu Dudau wrote: > On Tue, Apr 01, 2025 at 09:57:08AM +0200, Boris Brezillon wrote: > > When the device is coherent, panthor_gpu_coherency_init() will read > > GPU_COHERENCY_FEATURES to make sure the GPU supports the ACE-Lite > > coherency

Re: [PATCH v2 2/9] drm/panthor: Use 64-bit and poll register accessors

2025-04-05 Thread Boris Brezillon
On Thu, 20 Mar 2025 11:17:34 + Karunika Choo wrote: > This patch updates Panthor to use the new 64-bit accessors and poll > functions. nit: I don't think it makes sense to dissociate the introduction of the new helpers and their use. Could we squash this patch into the previous one? > > Si

[PATCH v3 4/8] drm/panthor: Add support for alloc-on-fault buffers

2025-04-05 Thread Boris Brezillon
This lets the UMD flag buffers are alloc-on-fault (AKA lazy allocation, AKA alloc-on-demand). The ultimate goal is to use this infrastructure for heap objects, but commit only deals with GEM/VM bits. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_drv.c | 20 +- drivers/gpu

Re: [PATCH v2 7/9] drm/panthor: Support GPU_CONTROL cache flush based on feature bit

2025-04-05 Thread Boris Brezillon
On Thu, 20 Mar 2025 11:17:39 + Karunika Choo wrote: > As the FLUSH_MEM and FLUSH_PT commands are deprecated in GPUs from > Mali-G720 onwards, this patch adds support for performing cache > maintenance via the FLUSH_CACHES command in GPU_CONTROL, in place of > FLUSH_MEM and FLUSH_PT based on P

[PATCH v3 2/5] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()

2025-04-05 Thread Boris Brezillon
has been resumed to prevent that. Changes in v2: - Add Liviu's R-b Changes in v3: - Add Steve's R-b Fixes: dd7db8d911a1 ("drm/panthor: Explicitly set the coherency mode") Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Reviewed-by: Steven Price --- dri

Re: [RFC PATCH v2 0/6] Introduce sparse DRM shmem object allocations

2025-04-05 Thread Boris Brezillon
Hi Thomas, On Mon, 31 Mar 2025 09:13:59 +0200 Thomas Zimmermann wrote: > Hi > > Am 26.03.25 um 03:14 schrieb Adrián Larumbe: > > This patch series is a proposal for implementing sparse page allocations > > for shmem objects. It was initially motivated by a kind of BO managed by > > the Panfrost

[PATCH v3 3/8] drm/panfrost: Switch to sparse gem shmem to implement our alloc-on-fault

2025-04-04 Thread Boris Brezillon
Use the new gem_shmem helpers providing sparse GEM backing so we can simplify the code, and finally have a non-blocking allocation scheme in the fault handler path. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- drivers/gpu/drm/panfrost/panfrost_gem.c | 37

[PATCH v3 7/8] drm/panthor: Make heap chunk allocation non-blocking

2025-04-04 Thread Boris Brezillon
Make heap chunk allocation non-blocking when we are in the growing path. This way, we can fail the job and signal its fence instead of blocking on memory reclaim, which will become problematic once we throw a memory shrinker into the mix. Signed-off-by: Boris Brezillon --- drivers/gpu/drm

[PATCH 0/3] drm/panthor: Misc fixes

2025-04-04 Thread Boris Brezillon
cking the writer/reader early on a fault will just make it crash, which is eventually want would happen anyway. Regards, Boris Boris Brezillon (3): drm/panthor: Call panthor_gpu_coherency_init() after PM resume() drm/panthor: Update panthor_mmu::irq::mask when needed drm/panthor: Let IRQ han

[PATCH 1/3] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()

2025-04-04 Thread Boris Brezillon
has been resumed to prevent that. Fixes: dd7db8d911a1 ("drm/panthor: Explicitly set the coherency mode") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panthor/pantho

[PATCH v3 1/5] drm/panthor: Fix GPU_COHERENCY_ACE[_LITE] definitions

2025-04-04 Thread Boris Brezillon
GPU_COHERENCY_ACE and GPU_COHERENCY_ACE_LITE definitions have been swapped. Changes in v2: - New patch Changes in v3: - Add Steve's R-b Reported-by: Liviu Dudau Fixes: 546b366600ef ("drm/panthor: Add GPU register definitions") Signed-off-by: Boris Brezillon Reviewed-b

Re: [PATCH v20 09/10] drm/shmem-helper: Switch drm_gem_shmem_vmap/vunmap to use pin/unpin

2025-04-04 Thread Boris Brezillon
On Fri, 4 Apr 2025 10:01:50 +0200 Thomas Zimmermann wrote: > >> In your case, vmap an pin both intent to hold the shmem pages in memory. > >> They might be build on top of the same implementation, but one should > >> not be implemented with the other because of their different meanings. > > But

Re: [PATCH v3 4/8] drm/panthor: Add support for alloc-on-fault buffers

2025-04-04 Thread Boris Brezillon
On Fri, 4 Apr 2025 11:26:30 +0200 Boris Brezillon wrote: > diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h > index 97e2c4510e69..8071f1c438e2 100644 > --- a/include/uapi/drm/panthor_drm.h > +++ b/include/uapi/drm/panthor_drm.h > @@ -615,6 +6

[PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-04 Thread Boris Brezillon
g/dri-devel/20250218232552.3450939-1-adrian.laru...@collabora.com/ Adrián Larumbe (1): drm/gem: Add helpers to request a range of pages on a GEM Boris Brezillon (7): drm/gem-shmem: Support sparse backing drm/panfrost: Switch to sparse gem shmem to implement our alloc-on-fault drm/panth

[PATCH v3 5/8] drm/panthor: Allow kernel BOs to pass DRM_PANTHOR_BO_ALLOC_ON_FAULT

2025-04-04 Thread Boris Brezillon
This will be used by the heap logic to allow for real non-blocking allocations when growing the heap. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_fw.c| 6 +++--- drivers/gpu/drm/panthor/panthor_gem.c | 7 ++- drivers/gpu/drm/panthor/panthor_gem.h | 4

[PATCH v3 6/8] drm/panthor: Add a panthor_vm_pre_fault_range() helper

2025-04-04 Thread Boris Brezillon
This allows one to pre-allocate resources on a sparse BO to avoid faulting when the GPU accesses the memory region. Will be used by the heap logic to pre-populate a heap object with a predefined number of chunks. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_mmu.c | 25

[PATCH v3 1/8] drm/gem: Add helpers to request a range of pages on a GEM

2025-04-04 Thread Boris Brezillon
From: Adrián Larumbe This new API provides a way to partially populate/unpopulate a GEM object, and also lets the caller specify the GFP flags to use for the allocation. This will help drivers that need to support sparse/alloc-on-demand GEM objects. Signed-off-by: Adrián Larumbe --- drivers/g

  1   2   3   4   5   6   7   8   9   10   >