Re: [PATCH v3 2/2] drm/gem-shmem: Add import attachment warning to locked pin function

2024-05-02 Thread Boris Brezillon
On Wed, 1 May 2024 07:56:00 +0100 Adrián Larumbe wrote: > Commit ec144244a43f ("drm/gem-shmem: Acquire reservation lock in GEM > pin/unpin callbacks") moved locking DRM object's dma reservation to > drm_gem_shmem_object_pin, and made drm_gem_shmem_pin_locked public, so we > need to make sure the

Re: [PATCH v2 4/4] drm/panthor: Fix an off-by-one in the heap context retrieval logic

2024-04-30 Thread Boris Brezillon
On Tue, 30 Apr 2024 17:40:54 +0100 Liviu Dudau wrote: > On Tue, Apr 30, 2024 at 01:28:52PM +0200, Boris Brezillon wrote: > > ID 0 is reserved to encode 'no-tiler-heap', the heap ID range is > > [1:MAX_HEAPS_PER_POOL], which we occasionally need to turn in

[PATCH] drm/panthor: Fix the FW reset logic

2024-04-30 Thread Boris Brezillon
nthor: Add the FW logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_fw.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c index 181395e2859a..fedf962745

[PATCH v2 3/4] drm/panthor: Relax the constraints on the tiler chunk size

2024-04-30 Thread Boris Brezillon
initial/max heap memory size - Fix the panthor_heap_create() kerneldoc Fixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_heap.c | 8 include/uapi/drm/panthor_drm.h | 6 +- 2 files change

[PATCH v2 4/4] drm/panthor: Fix an off-by-one in the heap context retrieval logic

2024-04-30 Thread Boris Brezillon
p logical block") Reported-by: Eric Smith Signed-off-by: Boris Brezillon Tested-by: Eric Smith --- drivers/gpu/drm/panthor/panthor_heap.c | 35 +++--- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_heap.c b/drivers/gpu/drm/pa

[PATCH v2 2/4] drm/panthor: Make sure the tiler initial/max chunks are consistent

2024-04-30 Thread Boris Brezillon
ixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_heap.c | 3 +++ include/uapi/drm/panthor_drm.h | 8 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/p

[PATCH v2 1/4] drm/panthor: Fix tiler OOM handling to allow incremental rendering

2024-04-30 Thread Boris Brezillon
d the scheduler logical block") Signed-off-by: Antonino Maniscalco Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_heap.c | 12 drivers/gpu/drm/panthor/panthor_sched.c | 7 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/pa

[PATCH v2 0/4] drm/panthor: Collection of tiler heap related fixes

2024-04-30 Thread Boris Brezillon
nthor: Fix tiler OOM handling to allow incremental rendering Boris Brezillon (3): drm/panthor: Make sure the tiler initial/max chunks are consistent drm/panthor: Relax the constraints on the tiler chunk size drm/panthor: Fix an off-by-one in the heap context retrieval logic drivers/gpu/drm/pa

Re: [PATCH 2/3] drm/panthor: Make sure the tiler initial/max chunks are consistent

2024-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2024 11:43:39 +0100 Steven Price wrote: > On 25/04/2024 10:28, Steven Price wrote: > > On 25/04/2024 08:18, Boris Brezillon wrote: > >> It doesn't make sense to have a maximum number of chunks smaller than > >> the initial number of chunks attach

[PATCH] drm/panthor: Kill the faulty_slots variable in panthor_sched_suspend()

2024-04-25 Thread Boris Brezillon
We can use upd_ctx.timedout_mask directly, and the faulty_slots update in the flush_caches_failed situation is never used. Suggested-by: Suggested-by: Steven Price Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_sched.c | 10 +++--- 1 file changed, 3 insertions(+), 7

Re: [PATCH 3/3] drm/panthor: Relax the check on the tiler chunk size

2024-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2024 10:28:56 +0100 Steven Price wrote: > On 25/04/2024 08:18, Boris Brezillon wrote: > > The field used to store the chunk size if 12 bits wide, and the encoding > NIT: ^^ is > > > is chunk_size = chunk_header.chunk_si

Re: [PATCH 1/3] drm/panthor: Fix tiler OOM handling to allow incremental rendering

2024-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2024 10:28:49 +0100 Steven Price wrote: > On 25/04/2024 08:18, Boris Brezillon wrote: > > From: Antonino Maniscalco > > > > If the kernel couldn't allocate memory because we reached the maximum > > number of chunks but no render passes are

[PATCH] drm/panthor: Make sure we handled the unknown group state properly

2024-04-25 Thread Boris Brezillon
group as unusable after that point, to prevent the potential corruption from creeping in other places if we continue executing stuff on this context. Reported-by: Dan Carpenter Suggested-by: Steven Price Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_sched.c | 37

[PATCH 3/3] drm/panthor: Relax the check on the tiler chunk size

2024-04-25 Thread Boris Brezillon
a4f89 ("drm/panthor: Add the heap logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_heap.c | 2 +- include/uapi/drm/panthor_drm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_heap.c b/dr

[PATCH 2/3] drm/panthor: Make sure the tiler initial/max chunks are consistent

2024-04-25 Thread Boris Brezillon
ot;drm/panthor: Add the heap logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_heap.c | 3 +++ include/uapi/drm/panthor_drm.h | 8 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_heap.

[PATCH 1/3] drm/panthor: Fix tiler OOM handling to allow incremental rendering

2024-04-25 Thread Boris Brezillon
scheduler logical block") Signed-off-by: Antonino Maniscalco Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_sched.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/pantho

[PATCH 0/3] drm/panthor: Collection of tiler heap related fixes

2024-04-25 Thread Boris Brezillon
Boris Antonino Maniscalco (1): drm/panthor: Fix tiler OOM handling to allow incremental rendering Boris Brezillon (2): drm/panthor: Make sure the tiler initial/max chunks are consistent drm/panthor: Relax the check on the tiler chunk size drivers/gpu/drm/panthor/panthor_heap.c | 5 - dr

Re: [PATCH v2] drm/panfrost: Fix dma_resv deadlock at drm object pin time

2024-04-24 Thread Boris Brezillon
lass_mutex){+.+.}-{3:3}, at: > drm_gem_pin+0x2c/0x80 [drm] > > Fix it by assuming the object's reservation had already been locked by the > time we reach panfrost_gem_pin. > > Do the same thing for the Lima driver, as it most likely suffers from the > same issue. > &g

Re: [PATCH v2 1/3] drm/panthor: introduce job cycle and timestamp accounting

2024-04-23 Thread Boris Brezillon
On Tue, 23 Apr 2024 22:32:34 +0100 Adrián Larumbe wrote: > Enable calculations of job submission times in clock cycles and wall > time. This is done by expanding the boilerplate command stream when running > a job to include instructions that compute said times right before an after > a user CS.

Re: [PATCH] drm/panfrost: Fix dma_resv deadlock at drm object pin time

2024-04-21 Thread Boris Brezillon
lass_mutex){+.+.}-{3:3}, at: > drm_gem_pin+0x2c/0x80 [drm] > > Fix it by assuming the object's reservation had already been locked by the > time we reach panfrost_gem_pin. > > Cc: Thomas Zimmermann > Cc: Dmitry Osipenko > Cc: Boris Brezillon > Cc: Steven Price > F

Re: [PATCH] drm/panthor: clean up some types in panthor_sched_suspend()

2024-04-17 Thread Boris Brezillon
would likely be a bug if anything > > were stored there. > > > > Signed-off-by: Dan Carpenter > > Reviewed-by: Steven Price Reviewed-by: Boris Brezillon > > If you fancy a bit more clean-up then I think faulty_slots is completely > redundant as a separate v

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-03 Thread Boris Brezillon
t all call-sites accordingly. " Thanks, Boris > --- > This is spotted by smatch and the patch is only compile tested > > v1->v2: Fix the function panthor_vm_get_heap_pool() to only return error > pointers and handle the caller sites [Suggested by Boris Brezillon] > -

Re: [PATCH] drm/panthor: Fix error code in panthor_gpu_init()

2024-04-03 Thread Boris Brezillon
On Tue, 2 Apr 2024 12:56:19 +0300 Dan Carpenter wrote: > This code accidentally returns zero/success on error because of a typo. > It should be "irq" instead of "ret". The other thing is that if > platform_get_irq_byname() were to return zero then the error code would > be cmplicated. Fortunate

Re: [PATCH] drm/panthor: Fix off by one in panthor_fw_get_cs_iface()

2024-04-03 Thread Boris Brezillon
On Tue, 2 Apr 2024 12:56:42 +0300 Dan Carpenter wrote: > The ->iface.streams[csg_slot][] array has MAX_CS_PER_CSG elements so > this > comparison needs to be >= to prevent an out of bounds access. > > Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") > Signed-off-by: Dan Carpenter

Re: [PATCH] drm/panthor: Fix a couple -ENOMEM error codes

2024-04-03 Thread Boris Brezillon
On Tue, 2 Apr 2024 12:58:09 +0300 Dan Carpenter wrote: > These error paths forgot to set the error code to -ENOMEM. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Signed-off-by: Dan Carpenter Queued to drm-misc-next. Thanks, Boris > --- > drivers/gpu/drm/panthor/pa

Re: [PATCH] drm/panthor: Fix NULL vs IS_ERR() bug in panthor_probe()

2024-04-03 Thread Boris Brezillon
On Tue, 2 Apr 2024 03:40:40 -0700 Harshit Mogalapalli wrote: > The devm_drm_dev_alloc() function returns error pointers. > Update the error handling to check for error pointers instead of NULL. > > Fixes: 4bdca1150792 ("drm/panthor: Add the driver frontend block") > Signed-off-by: Harshit Mogal

Re: [PATCH 1/2] drm/panthor: Cleanup unused variable 'cookie'

2024-04-03 Thread Boris Brezillon
s: 962f88b9c916 ("drm/panthor: Drop the dev_enter/exit() sections in > _irq_suspend/resume()") > Cc: Boris Brezillon > Cc: Steven Price > Signed-off-by: Liviu Dudau Queued both patches to drm-misc-next. > --- > drivers/gpu/drm/panthor/panthor_device.h | 4 >

Re: [PATCH 2/2] drm/panthor: Fix some kerneldoc warnings

2024-04-02 Thread Boris Brezillon
logical block") > Cc: Boris Brezillon > Cc: Steven Price > Signed-off-by: Liviu Dudau Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_sched.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/pan

Re: [PATCH 1/2] drm/panthor: Cleanup unused variable 'cookie'

2024-04-02 Thread Boris Brezillon
s: 962f88b9c916 ("drm/panthor: Drop the dev_enter/exit() sections in > _irq_suspend/resume()") > Cc: Boris Brezillon > Cc: Steven Price > Signed-off-by: Liviu Dudau Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_device.h | 4 > 1 file

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Boris Brezillon
On Tue, 2 Apr 2024 17:44:18 +0300 Dan Carpenter wrote: > On Tue, Apr 02, 2024 at 04:38:38PM +0200, Boris Brezillon wrote: > > On Tue, 2 Apr 2024 07:14:11 -0700 > > Harshit Mogalapalli wrote: > > > > > Currently panthor_vm_get_heap_pool() returns both ERR_PTR()

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Boris Brezillon
n error > pointers and handle the caller sites [Suggested by Boris Brezillon] > - Also merge these IS_ERR() vs NULL bugs into same patch > > v2->v3: pull out error checking for devm_drm_dev_alloc() failure. > --- > drivers/gpu/drm/panthor/panthor_drv.c | 4 ++-

Re: [PATCH v2] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Boris Brezillon
On Tue, 2 Apr 2024 19:35:41 +0530 Harshit Mogalapalli wrote: > Hi Boris, > On 02/04/24 19:32, Boris Brezillon wrote: > > On Tue, 2 Apr 2024 06:47:08 -0700 > > Harshit Mogalapalli wrote: > > > >> 1. The devm_drm_dev_alloc() function returns error pointers. &

Re: [PATCH] drm/panthor: Fix NULL vs IS_ERR() bug in panthor_probe()

2024-04-02 Thread Boris Brezillon
t; Signed-off-by: Harshit Mogalapalli Reviewed-by: Boris Brezillon > --- > This is spotted by smatch and the patch is only compile tested > --- > drivers/gpu/drm/panthor/panthor_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/pant

Re: [PATCH v2] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Boris Brezillon
thor: Add the driver frontend block") > Signed-off-by: Harshit Mogalapalli > --- > This is spotted by smatch and the patch is only compile tested > > v1->v2: Fix the function panthor_vm_get_heap_pool() to only return error > pointers and handle the caller sites [Suggested by Bori

Re: [PATCH] drm/panthor: Fix NULL vs IS_ERR() bug in panthor_ioctl_tiler_heap_destroy()

2024-04-02 Thread Boris Brezillon
On Tue, 2 Apr 2024 18:52:12 +0530 Harshit Mogalapalli wrote: > Hello Boris, > > On 02/04/24 18:03, Boris Brezillon wrote: > > Hello Harshit, > > > > On Tue, 2 Apr 2024 03:33:58 -0700 > > Harshit Mogalapalli wrote: > > > >> panth

Re: [PATCH] drm/panthor: Fix NULL vs IS_ERR() bug in panthor_ioctl_tiler_heap_destroy()

2024-04-02 Thread Boris Brezillon
Hello Harshit, On Tue, 2 Apr 2024 03:33:58 -0700 Harshit Mogalapalli wrote: > panthor_vm_get_heap_pool() returns ERR_PTR on failure. > > Fixes: 4bdca1150792 ("drm/panthor: Add the driver frontend block") > Signed-off-by: Harshit Mogalapalli > --- > This is spotted by smatch and the patch is o

Re: [PATCH] drm/panthor: Fix a couple -ENOMEM error codes

2024-04-02 Thread Boris Brezillon
On Tue, 2 Apr 2024 12:58:09 +0300 Dan Carpenter wrote: > These error paths forgot to set the error code to -ENOMEM. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon > --- &

Re: [PATCH] drm/panthor: Fix off by one in panthor_fw_get_cs_iface()

2024-04-02 Thread Boris Brezillon
> Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_fw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_fw.c > b/drivers/gpu/drm/panthor/panthor_fw.c > index 33

Re: [PATCH] drm/panthor: Fix error code in panthor_gpu_init()

2024-04-02 Thread Boris Brezillon
or code would > be cmplicated. Fortunately, it does not so we can just change <= to > < 0. > > Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") > Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/panthor/panthor_gpu.c | 4

Re: [PATCH] drm/panthor: Fix clang -Wunused-but-set-variable in tick_ctx_apply()

2024-04-02 Thread Boris Brezillon
On Thu, 28 Mar 2024 09:22:07 -0700 Nathan Chancellor wrote: > Clang warns (or errors with CONFIG_WERROR): > > drivers/gpu/drm/panthor/panthor_sched.c:2048:6: error: variable > 'csg_mod_mask' set but not used [-Werror,-Wunused-but-set-variable] >2048 | u32 csg_mod_mask = 0, free_cs

Re: [PATCH v3 1/3] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel

2024-04-02 Thread Boris Brezillon
On Tue, 26 Mar 2024 12:12:03 +0100 Boris Brezillon wrote: > When mapping an IO region, the pseudo-file offset is dependent on the > userspace architecture. panthor_device_mmio_offset() abstracts that > away for us by turning a userspace MMIO offset into its kernel > equivalent, but

Re: [PATCH v6 10/14] drm/panthor: Add the scheduler logical block

2024-03-28 Thread Boris Brezillon
Hi Nathan, On Thu, 28 Mar 2024 08:38:09 -0700 Nathan Chancellor wrote: > Hi Boris, > > On Thu, Feb 29, 2024 at 05:22:24PM +0100, Boris Brezillon wrote: > > > --- > > drivers/gpu/drm/panthor/panthor_sched.c | 3502 +++ > > drivers/gpu/drm/

Re: [PATCH v3 3/3] drm/panthor: Drop the dev_enter/exit() sections in _irq_suspend/resume()

2024-03-26 Thread Boris Brezillon
On Tue, 26 Mar 2024 12:12:05 +0100 Boris Brezillon wrote: > There's no reason for _irq_suspend/resume() to be called after the > device has been unplugged, and keeping this dev_enter/exit() > section in _irq_suspend() is turns _irq_suspend() into a NOP

[PATCH v3 2/3] drm/panthor: Fix ordering in _irq_suspend()

2024-03-26 Thread Boris Brezillon
ock") Reported-by: Steven Price Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h in

[PATCH v3 3/3] drm/panthor: Drop the dev_enter/exit() sections in _irq_suspend/resume()

2024-03-26 Thread Boris Brezillon
e118 ("drm/panthor: Add the device logical block") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.h | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/pa

[PATCH v3 1/3] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel

2024-03-26 Thread Boris Brezillon
Larumbe Reported-by: Lukas F. Hartmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10835 Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_device.c | 8 drivers/gpu/drm/panthor/panthor_device.h | 24 dri

Re: [PATCH] drm/panthor: Fix wrong kernel-doc format in the uAPI header

2024-03-26 Thread Boris Brezillon
On Tue, 26 Mar 2024 10:30:55 +0100 Boris Brezillon wrote: > The kernel doc prefix is /** not /*. > > Reported-by: Stephen Rothwell > Signed-off-by: Boris Brezillon Queued to drm-misc-next. > --- > include/uapi/drm/panthor_drm.h | 4 ++-- > 1 file changed, 2 inser

Re: [PATCH][next] drm/panthor: Fix spelling mistake "readyness" -> "readiness"

2024-03-26 Thread Boris Brezillon
On Tue, 26 Mar 2024 10:02:19 + Colin Ian King wrote: > There is a spelling mistake in a drm_err message. Fix it. > > Signed-off-by: Colin Ian King Queued to drm-misc-next. > --- > drivers/gpu/drm/panthor/panthor_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --gi

Re: [PATCH][next] drm/panthor: Fix spelling mistake "readyness" -> "readiness"

2024-03-26 Thread Boris Brezillon
On Tue, 26 Mar 2024 10:14:37 + Liviu Dudau wrote: > On Tue, Mar 26, 2024 at 10:02:19AM +, Colin Ian King wrote: > > There is a spelling mistake in a drm_err message. Fix it. > > > > Signed-off-by: Colin Ian King > > Acked-by: Liviu Dudau > > Boris, can you also pick this one up whe

Re: [PATCH v2 2/3] drm/panthor: Fix ordering in _irq_suspend()

2024-03-26 Thread Boris Brezillon
On Tue, 26 Mar 2024 09:58:17 + Liviu Dudau wrote: > On Mon, Mar 25, 2024 at 07:02:13PM +0100, Boris Brezillon wrote: > > On Mon, 25 Mar 2024 17:16:16 + > > Liviu Dudau wrote: > > > > > On Mon, Mar 25, 2024 at 02:57:04PM +0100, Boris Brezillon wro

[PATCH] drm/panthor: Fix wrong kernel-doc format in the uAPI header

2024-03-26 Thread Boris Brezillon
The kernel doc prefix is /** not /*. Reported-by: Stephen Rothwell Signed-off-by: Boris Brezillon --- include/uapi/drm/panthor_drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h index 373df80f41ed

Re: [PATCH v2 3/3] drm/panthor: Actually suspend IRQs in the unplug path

2024-03-25 Thread Boris Brezillon
On Mon, 25 Mar 2024 17:24:17 + Liviu Dudau wrote: > On Mon, Mar 25, 2024 at 02:57:05PM +0100, Boris Brezillon wrote: > > panthor_xxx_irq_suspend() doesn't mask the interrupts if drm_dev_unplug() > > has been called, which is always the case when our panthor_xxx_unpl

Re: [PATCH v2 2/3] drm/panthor: Fix ordering in _irq_suspend()

2024-03-25 Thread Boris Brezillon
On Mon, 25 Mar 2024 17:16:16 + Liviu Dudau wrote: > On Mon, Mar 25, 2024 at 02:57:04PM +0100, Boris Brezillon wrote: > > Make sure we set suspended=true last to avoid generating an irq storm > > in the unlikely case where an IRQ happens between the suspended=true > &g

[PATCH v2 3/3] drm/panthor: Actually suspend IRQs in the unplug path

2024-03-25 Thread Boris Brezillon
nally. v2: - Add Steve's R-b Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- Found inadvertently while debugging another issue. I guess I managed to call rmmod during a PING and that led to the FW int

[PATCH v2 1/3] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel

2024-03-25 Thread Boris Brezillon
y: Lukas F. Hartmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10835 Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_device.c | 8 drivers/gpu/drm/panthor/panthor_device.h | 24 drivers/gpu/drm/panthor/p

[PATCH v2 2/3] drm/panthor: Fix ordering in _irq_suspend()

2024-03-25 Thread Boris Brezillon
Make sure we set suspended=true last to avoid generating an irq storm in the unlikely case where an IRQ happens between the suspended=true assignment and the _INT_MASK update. v2: - New patch Reported-by: Steven Price Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.h

Re: [PATCH 2/2] drm/panthor: Actually suspend IRQs in the unplug path

2024-03-25 Thread Boris Brezillon
On Mon, 25 Mar 2024 11:17:24 + Steven Price wrote: > On 25/03/2024 10:41, Boris Brezillon wrote: > > panthor_xxx_irq_suspend() doesn't mask the interrupts if drm_dev_unplug() > > has been called, which is always the case when our panthor_xxx_unplug() > > helpe

Re: [PATCH 1/2] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel

2024-03-25 Thread Boris Brezillon
On Mon, 25 Mar 2024 11:12:40 + Steven Price wrote: > On 25/03/2024 10:41, Boris Brezillon wrote: > > When mapping an IO region, the pseudo-file offset is dependent on the > > userspace architecture. panthor_device_mmio_offset() abstract that away > > for us by turning a

[PATCH 1/2] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel

2024-03-25 Thread Boris Brezillon
at. Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") Reported-by: Adrián Larumbe Reported-by: Lukas F. Hartmann Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10835 Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.c | 11 +++---

[PATCH 2/2] drm/panthor: Actually suspend IRQs in the unplug path

2024-03-25 Thread Boris Brezillon
nally. Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") Signed-off-by: Boris Brezillon --- Found inadvertently while debugging another issue. I guess I managed to call rmmod during a PING and that led to the FW interrupt handler being executed after the device s

Re: [PATCH] drm/panthor: Don't use virt_to_pfn()

2024-03-25 Thread Boris Brezillon
On Mon, 18 Mar 2024 15:11:42 + Robin Murphy wrote: > On 18/03/2024 2:51 pm, Steven Price wrote: > > virt_to_pfn() isn't available on x86 (except to xen) so breaks > > COMPILE_TEST builds. Avoid its use completely by instead storing the > > struct page pointer allocated in panthor_device_init(

Re: [PATCH v2] drm/panthor: Fix the CONFIG_PM=n case

2024-03-25 Thread Boris Brezillon
On Mon, 18 Mar 2024 16:31:17 +0100 Boris Brezillon wrote: > Putting a hard dependency on CONFIG_PM is not possible because of a > circular dependency issue, and it's actually not desirable either. In > order to support this use case, we forcibly resume at init time, and > suspe

[PATCH v2] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
ops's definition Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.eoimq8wk-...@intel.com/ Signed-off-by: Boris Brezillon --- Tested by faking CONFIG_PM=n in the driver (basically commenting all pm_runtime calls, and making the panthor_device_susp

Re: [PATCH] drm/panthor: Don't use virt_to_pfn()

2024-03-18 Thread Boris Brezillon
On Mon, 18 Mar 2024 15:11:42 + Robin Murphy wrote: > On 18/03/2024 2:51 pm, Steven Price wrote: > > virt_to_pfn() isn't available on x86 (except to xen) so breaks > > COMPILE_TEST builds. Avoid its use completely by instead storing the > > struct page pointer allocated in panthor_device_init(

Re: [PATCH] drm/panthor: Don't use virt_to_pfn()

2024-03-18 Thread Boris Brezillon
tead. > > Signed-off-by: Steven Price Reviewed-by: Boris Brezillon Thanks, Boris > --- > drivers/gpu/drm/panthor/panthor_device.c | 10 ++ > drivers/gpu/drm/panthor/panthor_device.h | 2 +- > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
On Mon, 18 Mar 2024 14:34:07 + Steven Price wrote: > On 18/03/2024 14:18, Boris Brezillon wrote: > > On Mon, 18 Mar 2024 13:49:52 + > > Steven Price wrote: > > > >> On 18/03/2024 13:08, Boris Brezillon wrote: > >>> On Mon, 18 Mar 202

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
On Mon, 18 Mar 2024 13:49:52 + Steven Price wrote: > On 18/03/2024 13:08, Boris Brezillon wrote: > > On Mon, 18 Mar 2024 11:31:05 + > > Steven Price wrote: > > > >> On 18/03/2024 08:58, Boris Brezillon wrote: > >>> Putting a hard dependency

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
On Mon, 18 Mar 2024 11:31:05 + Steven Price wrote: > On 18/03/2024 08:58, Boris Brezillon wrote: > > Putting a hard dependency on CONFIG_PM is not possible because of a > > circular dependency issue, and it's actually not desirable either. In > > order to support

Re: [PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
On Mon, 18 Mar 2024 12:18:53 + Robin Murphy wrote: > On 18/03/2024 8:58 am, Boris Brezillon wrote: > > Putting a hard dependency on CONFIG_PM is not possible because of a > > circular dependency issue, and it's actually not desirable either. In > > order to support

[PATCH] drm/panthor: Fix the CONFIG_PM=n case

2024-03-18 Thread Boris Brezillon
l.org/oe-kbuild-all/202403031944.eoimq8wk-...@intel.com/ Signed-off-by: Boris Brezillon --- Tested by faking CONFIG_PM=n in the driver (basically commenting all pm_runtime calls, and making the panthor_device_suspend/resume() calls unconditional in the panthor_device_unplug/init() path)

Re: [PATCH] Revert "drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue"

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 14:41:42 + Liviu Dudau wrote: > On Mon, Mar 11, 2024 at 02:26:50PM +0200, Jani Nikula wrote: > > On Mon, 11 Mar 2024, Boris Brezillon wrote: > > > > > On Mon, 11 Mar 2024 13:51:46 +0200 > > > Jani Nikula wrote: > > > &

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 14:59:39 +0100 Boris Brezillon wrote: > On Mon, 11 Mar 2024 14:58:37 +0100 > Boris Brezillon wrote: > > > On Mon, 11 Mar 2024 13:46:23 + > > Steven Price wrote: > > > > > On 11/03/2024 13:36, Robin Murphy wrote: > >

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 14:58:37 +0100 Boris Brezillon wrote: > On Mon, 11 Mar 2024 13:46:23 + > Steven Price wrote: > > > On 11/03/2024 13:36, Robin Murphy wrote: > > > On 2024-03-11 1:22 pm, Boris Brezillon wrote: > > >> On Mon, 11 Mar 2024 13:11

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 13:46:23 + Steven Price wrote: > On 11/03/2024 13:36, Robin Murphy wrote: > > On 2024-03-11 1:22 pm, Boris Brezillon wrote: > >> On Mon, 11 Mar 2024 13:11:28 + > >> Robin Murphy wrote: > >> > >>> On 2024-03-11 11:5

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 13:11:28 + Robin Murphy wrote: > On 2024-03-11 11:52 am, Boris Brezillon wrote: > > On Mon, 11 Mar 2024 13:49:56 +0200 > > Jani Nikula wrote: > > > >> On Mon, 11 Mar 2024, Boris Brezillon > >> wrote: > >>> O

Re: [PATCH] Revert "drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue"

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 13:51:46 +0200 Jani Nikula wrote: > On Mon, 11 Mar 2024, Boris Brezillon wrote: > > On Mon, 11 Mar 2024 13:16:19 +0200 > > Jani Nikula wrote: > > > >> This reverts commit 674dc7f61aefea81901c21402946074927e63f1a. > >> > >

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 13:49:56 +0200 Jani Nikula wrote: > On Mon, 11 Mar 2024, Boris Brezillon wrote: > > On Mon, 11 Mar 2024 13:05:01 +0200 > > Jani Nikula wrote: > > > >> This breaks the config for me: > >> > >> SYNCinclude/config/au

Re: [PATCH] Revert "drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue"

2024-03-11 Thread Boris Brezillon
> drivers/iommu/amd/Kconfig:3: symbol AMD_IOMMU depends on IOMMU_SUPPORT > For a resolution refer to Documentation/kbuild/kconfig-language.rst > subsection "Kconfig recursive dependency limitations" > > Fixes: 674dc7f61aef ("drm/panthor: Fix undefined > panthor_d

Re: [PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-11 Thread Boris Brezillon
On Mon, 11 Mar 2024 13:05:01 +0200 Jani Nikula wrote: > This breaks the config for me: > > SYNCinclude/config/auto.conf.cmd > GEN Makefile > drivers/iommu/Kconfig:14:error: recursive dependency detected! > drivers/iommu/Kconfig:14: symbol IOMMU_SUPPORT is selected by DRM_PANTHOR

Re: [PATCH v3 1/1] drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs

2024-03-11 Thread Boris Brezillon
On Wed, 6 Mar 2024 08:33:47 + Tvrtko Ursulin wrote: > On 06/03/2024 01:56, Adrián Larumbe wrote: > > Debugfs isn't always available in production builds that try to squeeze > > every single byte out of the kernel image, but we still need a way to > > toggle the timestamp and cycle counter reg

Re: [PATCH v3 1/1] drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs

2024-03-11 Thread Boris Brezillon
On Wed, 6 Mar 2024 01:56:36 + Adrián Larumbe wrote: > > +static ssize_t profiling_show(struct device *dev, > + struct device_attribute *attr, char *buf) > +{ > + struct panfrost_device *pfdev = dev_get_drvdata(dev); > + > + return sysfs_emit(buf, "%d\n", p

Re: [PATCH 0/3] drm/panthor: Fix 3 issues reported by the kernel test bot

2024-03-11 Thread Boris Brezillon
On Mon, 4 Mar 2024 10:08:09 +0100 Boris Brezillon wrote: > Hello, > > Here are three trivial fixes for bugs reported by the intel kernel test > bot. > > Regards, > > Boris > > Boris Brezillon (3): > drm/panthor: Fix panthor_devfreq kerneldoc > drm/pa

Re: [PATCH] drm/panthor: Add support for performance counters

2024-03-08 Thread Boris Brezillon
On Fri, 8 Mar 2024 17:02:15 + Liviu Dudau wrote: > On Fri, Mar 08, 2024 at 04:15:15PM +0100, Boris Brezillon wrote: > > On Fri, 8 Mar 2024 13:52:18 + > > Liviu Dudau wrote: > > > > > Hi Adrián, > > > > > > Thanks for the patch a

Re: [PATCH] drm/panthor: Add support for performance counters

2024-03-08 Thread Boris Brezillon
On Fri, 8 Mar 2024 13:52:18 + Liviu Dudau wrote: > Hi Adrián, > > Thanks for the patch and appologies for taking a bit longer to respond, > I was trying to gather some internal Arm feedback before replying. > > On Tue, Mar 05, 2024 at 04:58:16PM +, Adrián Larumbe wrote: > > This brings

Re: [PATCH v3 1/1] drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs

2024-03-06 Thread Boris Brezillon
> profiled for fdinfo's drm engine and cycle calculations. > > Drop the debugfs knob and replace it with a sysfs file that accomplishes > the same functionality, and document its ABI in a separate file. > > Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon >

Re: [PATCH v2 1/1] drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs

2024-03-04 Thread Boris Brezillon
On Mon, 4 Mar 2024 16:04:34 + Steven Price wrote: > On 02/03/2024 15:48, Adrián Larumbe wrote: > > Debugfs isn't always available in production builds that try to squeeze > > every single byte out of the kernel image, but we still need a way to > > toggle the timestamp and cycle counter regis

Re: [PATCH 2/3] drm/panthor: Explicitly include page.h for the {virt,__phys)_to_pfn() defs

2024-03-04 Thread Boris Brezillon
On Mon, 4 Mar 2024 11:16:48 + Liviu Dudau wrote: > On Mon, Mar 04, 2024 at 10:08:11AM +0100, Boris Brezillon wrote: > > Something on arm[64] must be including , but things fail > > to compile on sparc64. Make sure this header is included explicitly > > so this driver can

Re: [PATCH 2/3] drm/panthor: Explicitly include page.h for the {virt,__phys)_to_pfn() defs

2024-03-04 Thread Boris Brezillon
On Mon, 4 Mar 2024 12:31:23 + Steven Price wrote: > On 04/03/2024 09:08, Boris Brezillon wrote: > > Something on arm[64] must be including , but things fail > > to compile on sparc64. Make sure this header is included explicitly > > so this driver can be compile-te

[PATCH 2/3] drm/panthor: Explicitly include page.h for the {virt, __phys)_to_pfn() defs

2024-03-04 Thread Boris Brezillon
-...@intel.com/ Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index bfe8da4a6e4c..68e467ee458a 100644 --- a/drivers/gpu/drm/panthor

[PATCH 3/3] drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

2024-03-04 Thread Boris Brezillon
follow-up. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.eoimq8wk-...@intel.com/ Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/Kconfig | 1 + drivers/gpu/drm/panthor/panthor_device.c | 2 -- 2 files changed, 1 insertion(+), 2 deletion

[PATCH 1/3] drm/panthor: Fix panthor_devfreq kerneldoc

2024-03-04 Thread Boris Brezillon
Missing '*' to have a valid kerneldoc prefix. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403031019.6jvroqgt-...@intel.com/ Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_devfreq.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 0/3] drm/panthor: Fix 3 issues reported by the kernel test bot

2024-03-04 Thread Boris Brezillon
Hello, Here are three trivial fixes for bugs reported by the intel kernel test bot. Regards, Boris Boris Brezillon (3): drm/panthor: Fix panthor_devfreq kerneldoc drm/panthor: Explicitly include page.h for the {virt,__phys)_to_pfn() defs drm/panthor: Fix undefined

Re: [PATCH v6 00/14] drm: Add a driver for CSF-based Mali GPUs

2024-03-01 Thread Boris Brezillon
On Thu, 29 Feb 2024 17:22:14 +0100 Boris Brezillon wrote: > Boris Brezillon (13): > drm/panthor: Add uAPI > drm/panthor: Add GPU register definitions > drm/panthor: Add the device logical block > drm/panthor: Add the GPU logical block > drm/panthor: Add GEM log

[PATCH v6 10/14] drm/panthor: Add the scheduler logical block

2024-02-29 Thread Boris Brezillon
ypos in comments fixed. Co-developed-by: Steven Price Signed-off-by: Steven Price Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Maxime Ripard Acked-by: Heiko Stuebner --- drivers/gpu/drm/panthor/panthor_sched.c | 3502 +++ drivers/gpu/drm/panthor

[PATCH v6 14/14] drm/panthor: Add an entry to MAINTAINERS

2024-02-29 Thread Boris Brezillon
Add an entry for the Panthor driver to the MAINTAINERS file. v6: - Add Maxime's and Heiko's acks v4: - Add Steve's R-b v3: - Add bindings document as an 'F:' line. - Add Steven and Liviu as co-maintainers. Signed-off-by: Boris Brezillon Reviewed-by: Steven Price

[PATCH v6 12/14] drm/panthor: Allow driver compilation

2024-02-29 Thread Boris Brezillon
nd help text to (hopefully) describe which GPUs are to be supported by this driver and which are for panfrost. Co-developed-by: Steven Price Signed-off-by: Steven Price Signed-off-by: Boris Brezillon Acked-by: Steven Price # MIT+GPL2 relicensing,Arm Acked-by: Grant Likely # MIT+GPL2 rel

[PATCH v6 07/14] drm/panthor: Add the MMU/VM logical block

2024-02-29 Thread Boris Brezillon
Steven Price Signed-off-by: Steven Price Signed-off-by: Boris Brezillon Acked-by: Steven Price # MIT+GPL2 relicensing,Arm Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro Acked-by: Boris Brezillon # MIT+GPL2 relicensing,Collabora Reviewed-by: Steven Price Acked-by: Maxime Ripard

[PATCH v6 11/14] drm/panthor: Add the driver frontend block

2024-02-29 Thread Boris Brezillon
rom panthor_submit_ctx_add_job(). - Fix typos in comments. Co-developed-by: Steven Price Signed-off-by: Steven Price Signed-off-by: Boris Brezillon Acked-by: Steven Price # MIT+GPL2 relicensing,Arm Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro Acked-by: Boris Brezillon # MIT+GPL2 relicensing

[PATCH v6 08/14] drm/panthor: Add the FW logical block

2024-02-29 Thread Boris Brezillon
atural alignment is good enough. - Other minor code improvements. Co-developed-by: Steven Price Signed-off-by: Steven Price Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Acked-by: Maxime Ripard Acked-by: Heiko Stuebner --- drivers/gpu/drm/panthor/panthor_fw.c | 1362 +

[PATCH v6 13/14] dt-bindings: gpu: mali-valhall-csf: Add support for Arm Mali CSF GPUs

2024-02-29 Thread Boris Brezillon
tforms are still work in progress, hence the bindings are left incomplete here. v2: - New commit Signed-off-by: Liviu Dudau Cc: Krzysztof Kozlowski Cc: Rob Herring Cc: Conor Dooley Cc: devicet...@vger.kernel.org Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring Acked-by: Maxime Ripard

<    1   2   3   4   5   6   7   8   9   10   >