Re: [PATCH v6 2/5] drm/panthor: record current and maximum device clock frequencies

2024-09-16 Thread Steven Price
Adrián Larumbe Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_devfreq.c | 18 +- > drivers/gpu/drm/panthor/panthor_device.h | 6 ++ > 2 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_devfr

Re: [PATCH v6 1/5] drm/panthor: introduce job cycle and timestamp accounting

2024-09-16 Thread Steven Price
On 13/09/2024 13:42, 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 and > after a user CS. > > A separate

Re: [PATCH] drm/panthor: Lock the VM resv before calling drm_gpuvm_bo_obtain_prealloc()

2024-09-13 Thread Steven Price
the VM resv lock when > calling this function. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_mmu.c | 8 > 1 file changed, 8 inse

Re: [PATCH v2 2/2] drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query

2024-09-06 Thread Steven Price
With Boris' BIT() macro change: Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panthor/panthor_drv.c | 61 ++- > include/uapi/drm/panthor_drm.h| 22 ++ > 2 files changed, 64 insertions(+), 19 deletions(-) > > di

[PATCH v2] drm/panthor: Display FW version information

2024-09-06 Thread Steven Price
. So output this as a drm_info() so that it's obvious from a dmesg log which firmware binary is being used. Reviewed-by: Boris Brezillon Reviewed-by: Liviu Dudau Signed-off-by: Steven Price --- v2: * Fix indentation * Also update the FW interface message to include "using interface"

[PATCH] drm/panthor: Display FW version information

2024-09-05 Thread Steven Price
The firmware binary has a git SHA embedded into it which can be used to identify which firmware binary is being loaded. Output this as a drm_info() so that it's obvious from a dmesg log which firmware binary is being used. Signed-off-by: Steven Price --- drivers/gpu/drm/panthor/panthor

Re: [PATCH 2/2] drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query

2024-09-05 Thread Steven Price
On 05/09/2024 12:13, Mary Guillemard wrote: > Expose allowed group priorities with a new device query. > > This new uAPI will be used in Mesa to properly report what priorities a > user can use for EGL_IMG_context_priority. > > Since this extends the uAPI and because userland needs a way to > adv

Re: [PATCH 1/2] drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority

2024-09-05 Thread Steven Price
On 05/09/2024 12:13, Mary Guillemard wrote: > This adds a new value to drm_panthor_group_priority exposing the > realtime priority to userspace. > > This is required to implement NV_context_priority_realtime in Mesa. > > Signed-off-by: Mary Guillemard Reviewe

Re: [PATCH 1/2] drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority

2024-09-05 Thread Steven Price
Hi Mihail, On 05/09/2024 14:54, Mihail Atanassov wrote: > Hi Mary, > > On 05/09/2024 12:13, Mary Guillemard wrote: >> This adds a new value to drm_panthor_group_priority exposing the >> realtime priority to userspace. >> >> This is required to implement NV_context_priority_realtime in Mesa. >> >>

Re: [PATCH] drm/panthor: Don't add write fences to the shared BOs

2024-09-05 Thread Steven Price
lock") > Cc: Matthew Brost > Cc: Simona Vetter > Cc: > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/pant

Re: [PATCH] drm/panthor: Don't declare a queue blocked if deferred operations are pending

2024-09-05 Thread Steven Price
("drm/panthor: Add the scheduler logical block") > Cc: > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panth

Re: [RFC PATCH 00/10] drm/panthor: Add user submission

2024-09-04 Thread Steven Price
On 04/09/2024 14:20, Boris Brezillon wrote: > + Adrian, who has been looking at the shrinker stuff for Panthor > > On Wed, 4 Sep 2024 13:46:12 +0100 > Steven Price wrote: > >> On 04/09/2024 12:34, Christian König wrote: >>> Hi Boris, >>> >>&

Re: [RFC PATCH 00/10] drm/panthor: Add user submission

2024-09-04 Thread Steven Price
On 04/09/2024 12:34, Christian König wrote: > Hi Boris, > > Am 04.09.24 um 13:23 schrieb Boris Brezillon: >> Please read up here on why that stuff isn't allowed: >> https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html#indefinite-dma-fences >> > panthor doesn't yet have

Re: [RFC PATCH 00/10] drm/panthor: Add user submission

2024-09-04 Thread Steven Price
On 04/09/2024 08:49, Christian König wrote: > Am 03.09.24 um 23:11 schrieb Simona Vetter: >> On Tue, Sep 03, 2024 at 03:46:43PM +0200, Christian König wrote: >>> Hi Steven, >>> >>> Am 29.08.24 um 15:37 schrieb Steven Price: >>>> Hi Christian, >>

Re: [PATCH v2] drm/panthor: flush FW AS caches in slow reset path

2024-09-02 Thread Steven Price
ally lead to a scheduler job timeout. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Cc: sta...@vger.kernel.org > Signed-off-by: Adrián Larumbe > Acked-by: Liviu Dudau Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.

Re: [PATCH v2] drm/panthor: Use the BITS_PER_LONG macro

2024-09-02 Thread Steven Price
of the > test > #23: FILE: drivers/gpu/drm/panthor/panthor_mmu.c:2696: > + if (BITS_PER_LONG < va_bits) { > > Signed-off-by: Jinjie Ruan Reviewed-by: Steven Price Thanks, I'll push to drm-misc-next. Steve > --- > v2: > - Also fix for below mmu_fe

Re: [PATCH -next] drm/panthor: Use the BITS_PER_LONG macro

2024-09-02 Thread Steven Price
On 31/08/2024 03:45, Jinjie Ruan wrote: > sizeof(unsigned long) * 8 is the number of bits in an unsigned long > variable, replace it with BITS_PER_LONG macro to make them simpler. > > And fix the warning: > WARNING: Comparisons should place the constant on the right side of the > test >

Re: [PATCH v3 1/2] drm/panfrost: Add SYSTEM_TIMESTAMP and SYSTEM_TIMESTAMP_FREQUENCY parameters

2024-09-02 Thread Steven Price
counter_get and panfrost_cycle_counter_put to > panfrost_ioctl_query_timestamp > - Handle possible overflow in panfrost_timestamp_read > Reviewed-by: Steven Price I'll push this to drm-misc-next. Thanks, Steve > Signed-off-by: Mary Guillemard > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 37

Re: [RFC PATCH 00/10] drm/panthor: Add user submission

2024-08-29 Thread Steven Price
Hi Christian, Mihail should be able to give more definitive answers, but I think I can answer your questions. On 29/08/2024 10:40, Christian König wrote: > Am 28.08.24 um 19:25 schrieb Mihail Atanassov: >> Hello all, >> >> This series implements a mechanism to expose Mali CSF GPUs' queue >> ringb

Re: [PATCH v4 1/4] drm/panthor: introduce job cycle and timestamp accounting

2024-08-19 Thread Steven Price
Hi Adrián, On 31/07/2024 13:41, Adrián Larumbe wrote: > Hi Steven, thanks for the remarks. > > On 19.07.2024 15:14, Steven Price wrote: >> On 16/07/2024 21:11, Adrián Larumbe wrote: >>> Enable calculations of job submission times in clock cycles and wall >>> ti

Re: [PATCH v2 2/2] drm/panfrost: Add cycle counter job requirement

2024-08-15 Thread Steven Price
mit message > - Squash uAPI changes and implementation in this commit > - Simplify changes based on Steven Price comments > > Signed-off-by: Mary Guillemard Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 8 +-- > drivers/gpu/

Re: [PATCH v2 1/2] drm/panfrost: Add SYSTEM_TIMESTAMP and SYSTEM_TIMESTAMP_FREQUENCY parameters

2024-08-15 Thread Steven Price
On 14/08/2024 12:21, Mary Guillemard wrote: > Expose system timestamp and frequency supported by the GPU. > > Mali uses an external timer as GPU system time. On ARM, this is wired to > the generic arch timer so we wire cntfrq_el0 as device frequency. > > This new uAPI will be used in Mesa to impl

Re: [PATCH 3/3] drm/panfrost: Handle JD_REQ_CYCLE_COUNT

2024-08-08 Thread Steven Price
On 07/08/2024 17:08, Mary Guillemard wrote: > If a job requires cycle counters or system timestamps propagation, we > must enable cycle counting before issuing a job and disable it right > after the job completes. > > Since this extends the uAPI and because userland needs a way to advertise > feat

Re: [PATCH 2/3] drm/panfrost: Add cycle counter job requirement

2024-08-08 Thread Steven Price
On 07/08/2024 17:08, Mary Guillemard wrote: > Extend the uAPI with a new job requirement flag for cycle > counters. This requirement is used by userland to indicate that a job > requires cycle counters or system timestamp to be propagated. (for use > with write value timestamp jobs) > > We cannot

Re: [PATCH 1/3] drm/panfrost: Add SYSTEM_TIMESTAMP and SYSTEM_TIMESTAMP_FREQUENCY parameters

2024-08-08 Thread Steven Price
On 07/08/2024 17:08, Mary Guillemard wrote: > Expose system timestamp and frequency supported by the GPU. > > Mali uses the generic arch timer as GPU system time so we currently > wire cntvct_el0 and cntfrq_el0 respectively to those parameters. > We could have directly read those values from userl

Re: [PATCH] drm/panfrost: Mark simple_ondemand governor as softdep

2024-07-25 Thread Steven Price
Hi Dragan, On 25/07/2024 09:24, Dragan Simic wrote: > Hello Steven and Boris, > Another option has become available for expressing additional module > dependencies, weakdeps. [1][2]  Long story short, weakdeps are similar > to softdeps, in the sense of telling the initial ramdisk utilities to >

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-24 Thread Steven Price
On 24/07/2024 15:27, Daniel Almeida wrote: > Hi Steven! > >> On 24 Jul 2024, at 10:54, Steven Price wrote: >> >> [1] Although I have to admit for a debugging feature like devcoredump >> there might well be pressure to implement this in C as well purely so >>

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-24 Thread Steven Price
On 24/07/2024 14:15, Rob Herring wrote: > On Wed, Jul 24, 2024 at 3:59 AM Steven Price wrote: >> >> Hi Boris, >> >> On 23/07/2024 17:06, Boris Brezillon wrote: >>> Hi Steve, >>> >>> On Mon, 15 Jul 2024 10:12:16 +0100 >>> Steven Price

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-24 Thread Steven Price
Hi Boris, Sounds like we're violently agreeing with each other ;) Just want to reply to a couple of points. On 24/07/2024 11:44, Boris Brezillon wrote: > Hi Steve, > > On Wed, 24 Jul 2024 09:59:36 +0100 > Steven Price wrote: > >> Hi Boris, >> >> On 2

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-24 Thread Steven Price
Hi Boris, On 23/07/2024 17:06, Boris Brezillon wrote: > Hi Steve, > > On Mon, 15 Jul 2024 10:12:16 +0100 > Steven Price wrote: > >> I note it also shows that the "panthor_regs.rs" would ideally be shared. >> For arm64 we have been moving to generating s

Re: [PATCH v4 4/4] drm/panthor: add sysfs knob for enabling job profiling

2024-07-19 Thread Steven Price
igned-off-by: Adrián Larumbe Reviewed-by: Steven Price Although we should probably copy/paste Documentation/ABI/testing/sysfs-driver-panfrost-profiling - or at least mention somewhere that the same knob is available for panthor. Steve > --- > drivers/gpu/drm/

Re: [PATCH v4 3/4] drm/panthor: enable fdinfo for memory stats

2024-07-19 Thread Steven Price
ned-off-by: Adrián Larumbe > Reviewed-by: Liviu Dudau Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_gem.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_gem.c > b/drivers/gpu/drm/panthor/panthor_gem.c &g

Re: [PATCH v4 2/4] drm/panthor: add DRM fdinfo support

2024-07-19 Thread Steven Price
is governed by a flag that is by default > disabled in the present commit, and supporting manual toggle of it will be > the matter of a later commit. > > Signed-off-by: Adrián Larumbe Reviewed-by: Steven Price Steve > --- > drivers/gpu/drm/panthor/panthor_devfreq.c | 18 +++

Re: [PATCH v4 1/4] drm/panthor: introduce job cycle and timestamp accounting

2024-07-19 Thread Steven Price
On 16/07/2024 21:11, 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. > > Those numbe

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-15 Thread Steven Price
On 12/07/2024 15:35, Daniel Almeida wrote: > Hi Steven, thanks for the review! > >> >> This is defining the ABI to userspace and as such we'd need a way of >> exporting this for userspace tools to use. The C approach is a header in >> include/uabi. I'd also suggest making it obvious this enum can'

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-12 Thread Steven Price
Hi Daniel, I'm not a Rust expert so I'll have to defer to others on Rust-style. I'll try to concentrate on Mali-specific parts. Apologies if you feel this is too early, but hopefully it gives some ideas on how to improve before it actually gets merged. On 10/07/2024 23:50, Daniel Almeida wrote: >

Re: [PATCH] drm/panthor: Record devfreq busy as soon as a job is started

2024-07-04 Thread Steven Price
On 03/07/2024 16:56, Steven Price wrote: > If a queue is already assigned to the hardware, then a newly submitted > job can start straight away without waiting for the tick. However in > this case the devfreq infrastructure isn't notified that the GPU is > busy. By the time the

[PATCH] drm/panthor: Record devfreq busy as soon as a job is started

2024-07-03 Thread Steven Price
ll be accounted for the GPU being busy. Fix this by recording the GPU as busy directly in queue_run_job() in the case where there is a CSG assigned and therefore we just ring the doorbell. Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Signed-off-by: Steven Price -

Re: [PATCH v3 0/7] Support fdinfo runtime and memory stats on Panthor

2024-07-03 Thread Steven Price
On 24/06/2024 12:23, Adrián Larumbe wrote: > Hi Steven, > > On 13.06.2024 16:28, Steven Price wrote: >> On 06/06/2024 01:49, Adrián Larumbe wrote: >>> This patch series enables userspace utilities like gputop and nvtop to >>> query a render context's fdin

Re: [PATCH] drm/panfrost: Mark simple_ondemand governor as softdep

2024-07-03 Thread Steven Price
On 03/07/2024 14:20, Boris Brezillon wrote: > On Wed, 03 Jul 2024 14:42:37 +0200 > Dragan Simic wrote: > >> Hello everyone, >> >> On 2024-06-17 22:17, Dragan Simic wrote: >> >> Just checking, could this patch be accepted, please? > > Yes, sorry for the delay. Here's my > > Reviewed-by: Boris

Re: [PATCH] drm/panfrost: Mark simple_ondemand governor as softdep

2024-07-03 Thread Steven Price
//forum.pine64.org/showthread.php?tid=15458 >> [4] >> https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0b59052999de577ab732b719cfbeb89504d >> [5] >> https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f4489054668ad >> >> Cc: Diederik

Re: [PATCH 2/2] drm/panthor: Fix sync-only jobs

2024-07-01 Thread Steven Price
done. > > Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Boris Brezillon Looks correct to me. Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 41 - > include/uapi/drm/panth

Re: [PATCH 1/2] drm/panthor: Don't check the array stride on empty uobj arrays

2024-07-01 Thread Steven Price
oris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_drv.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c > b/drivers/gpu/drm/panthor/panthor_drv.c > index b8a84f26b3ef..b5e7b

Re: [PATCH v3 0/7] Support fdinfo runtime and memory stats on Panthor

2024-06-13 Thread Steven Price
On 06/06/2024 01:49, Adrián Larumbe wrote: > This patch series enables userspace utilities like gputop and nvtop to > query a render context's fdinfo file and figure out rates of engine > and memory utilisation. > > Previous discussion can be found at > https://lore.kernel.org/dri-devel/2024042321

Re: [PATCH v3 2/2] drm/panfrost: Add support for Mali on the MT8188 SoC

2024-06-12 Thread Steven Price
-Yu Tsai > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c > b/drivers/gpu/drm/pa

Re: [PATCH v2 2/2] drm/panfrost: Add support for Mali on the MT8188 SoC

2024-06-05 Thread Steven Price
On 05/06/2024 12:43, AngeloGioacchino Del Regno wrote: > Il 05/06/24 11:18, Steven Price ha scritto: >> On 04/06/2024 13:39, AngeloGioacchino Del Regno wrote: >>> MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new >>> compatible and platform data using the sam

Re: [PATCH v2 2/2] drm/panfrost: Add support for Mali on the MT8188 SoC

2024-06-05 Thread Steven Price
On 04/06/2024 13:39, AngeloGioacchino Del Regno wrote: > MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new > compatible and platform data using the same supplies and the > same power domain lists as MT8183 (one regulator, three power > domains). > > Signed-off-by: AngeloGioacchino Del Reg

Re: [PATCH 4/6] drm/imagination: Add compatible string entry for Series6XT

2024-06-03 Thread Steven Price
On 03/06/2024 04:29, Chen-Yu Tsai wrote: > On Fri, May 31, 2024 at 7:18 PM Frank Binns wrote: >> >> On Thu, 2024-05-30 at 16:35 +0800, Chen-Yu Tsai wrote: >>> The MediaTek MT8173 comes with a PowerVR Rogue GX6250, which is part >>> of the Series6XT, another variation of the Rogue family of GPUs. >

Re: [PATCH] drm: use "0" instead of "" for deprecated driver date

2024-05-10 Thread Steven Price
On 10/05/2024 10:09, Jani Nikula wrote: > libdrm does not like the empty string for driver date. Use "0" instead, > which has been used by virtio previously. > > Reported-by: Steven Price > Closes: https://lore.kernel.org/r/9d0cff47-308e-4b11-a9f3-4157dc26b...@arm.com &g

Re: [PATCH] drm: deprecate driver date

2024-05-10 Thread Steven Price
On 10/05/2024 10:13, Jani Nikula wrote: > On Thu, 09 May 2024, Steven Price wrote: >> On 29/04/2024 17:43, Jani Nikula wrote: >>> The driver date serves no useful purpose, because it's hardly ever >>> updated. The information is misleading at best. >>>

Re: [PATCH] drm: deprecate driver date

2024-05-09 Thread Steven Price
On 29/04/2024 17:43, Jani Nikula wrote: > The driver date serves no useful purpose, because it's hardly ever > updated. The information is misleading at best. > > As described in Documentation/gpu/drm-internals.rst: > > The driver date, formatted as MMDD, is meant to identify the date > o

Re: [PATCH 3/4] drm/panthor: Reset the FW VM to NULL on unplug

2024-05-03 Thread Steven Price
On 02/05/2024 19:38, Boris Brezillon wrote: > This way get NULL derefs instead of use-after-free if the FW VM is > referenced after the device has been unplugged. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.c | 1 +

Re: [PATCH 4/4] drm/panthor: Call panthor_sched_post_reset() even if the reset failed

2024-05-03 Thread Steven Price
ble, although I hope this case doesn't happen in practice ;) Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.c | 7 +-- > drivers/gpu/drm/panthor/panthor_sched.c | 19 ++- > drivers/gpu/drm/panthor/panthor_sched.h | 2 +- > 3

Re: [PATCH 2/4] drm/panthor: Keep a ref to the VM at the panthor_kernel_bo level

2024-05-03 Thread Steven Price
On 02/05/2024 19:38, Boris Brezillon wrote: > Avoids use-after-free situations when panthor_fw_unplug() is called > and the kernel BO was mapped to the FW VM. > > Signed-off-by: Boris Brezillon It makes the code more readable too - I like it. Reviewed-by: Steven Price > ---

Re: [PATCH 1/4] drm/panthor: Force an immediate reset on unrecoverable faults

2024-05-03 Thread Steven Price
On 02/05/2024 19:38, Boris Brezillon wrote: > If the FW reports an unrecoverable fault, we need to reset the GPU > before we can start re-using it again. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.c | 1 +

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

2024-05-03 Thread Steven Price
quot;drm/panthor: Add the heap logical block") > Reported-by: Eric Smith > Signed-off-by: Boris Brezillon > Tested-by: Eric Smith Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panthor/panthor_heap.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 del

Re: [PATCH v3 5/5] drm/panthor: Document drm_panthor_tiler_heap_destroy::handle validity constraints

2024-05-02 Thread Steven Price
On 02/05/2024 16:40, Boris Brezillon wrote: > Make sure the user is aware that drm_panthor_tiler_heap_destroy::handle > must be a handle previously returned by > DRM_IOCTL_PANTHOR_TILER_HEAP_CREATE. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- &

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

2024-05-02 Thread Steven Price
On 02/05/2024 16:40, Boris Brezillon wrote: > The heap ID is used to index the heap context pool, and allocating > in the [1:MAX_HEAPS_PER_POOL] leads to an off-by-one. This was > originally to avoid returning a zero heap handle, but given the handle > is formed with (vm_id << 16) | heap_id, with v

Re: [PATCH v3 3/5] drm/panthor: Relax the constraints on the tiler chunk size

2024-05-02 Thread Steven Price
or_heap_create() kerneldoc > > Fixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") > Signed-off-by: Boris Brezillon > Reviewed-by: Liviu Dudau > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_heap.c | 8 > include/uapi/dr

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

2024-05-02 Thread Steven Price
On 02/05/2024 15:15, Boris Brezillon wrote: > On Thu, 2 May 2024 15:03:51 +0100 > Steven Price wrote: > >> On 30/04/2024 12:28, Boris Brezillon wrote: >>> ID 0 is reserved to encode 'no-tiler-heap', the heap ID range is >>> [1:MAX_HEAPS_PER_POOL], which

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

2024-05-02 Thread Steven Price
On 30/04/2024 12:28, 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 into an index > in the [0:MAX_HEAPS_PER_POOL-1] when we want to access the context object. This might be a silly question, but

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

2024-05-02 Thread Steven Price
kerneldoc >> >> Fixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") >> Signed-off-by: Boris Brezillon Other than the typo Adrián pointed out below... Reviewed-by: Steven Price >> --- >> drivers/gpu/drm/panthor/panthor_heap.c | 8 >&

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

2024-05-02 Thread Steven Price
unk_count > 0" constraint while at it. > > v2: > - Fix the check > > Fixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panthor/panthor_heap.c

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

2024-05-02 Thread Steven Price
OMEM for all kind of allocation > failures > - Document the panthor_heap_grow() semantics > > Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Antonino Maniscalco > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Thanks, Ste

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

2024-05-02 Thread Steven Price
o the MCU_CONTROL register. > > Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions

Re: [PATCH] drm/panthor: Add defer probe for firmware load

2024-04-25 Thread Steven Price
Hi Javier, On 25/04/2024 10:22, Javier Martinez Canillas wrote: > Steven Price writes: > > Hello Steven, > >> On 13/04/2024 12:49, Andy Yan wrote: >>> From: Andy Yan >>> >>> The firmware in the rootfs will not be accessible until we >>> a

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

2024-04-25 Thread Steven Price
On 25/04/2024 11:39, Boris Brezillon wrote: > 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 I'm obviously too full of suggestions! ;) And you're d

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

2024-04-25 Thread Steven Price
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 attached to the context. >> >> Fix the uAPI header to reflect the

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

2024-04-25 Thread Steven Price
t; When an unknown state is detected, we trigger a reset, and consider the > 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:

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

2024-04-25 Thread Steven Price
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_size << 12, which gives us a > theoretical [4k:8M] range. This range is further limited by > im

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

2024-04-25 Thread Steven Price
tives, and start over from where it stopped). > > Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Antonino Maniscalco > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Although I think the real issue here is that we haven&#

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

2024-04-25 Thread Steven Price
unk_count > 0" constraint while at it. > > Fixes: 9cca48fa4f89 ("drm/panthor: Add the heap logical block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_heap.c | 3 +++ > include/uapi/drm/panthor_drm.

Re: [PATCH] drm/panthor: Add defer probe for firmware load

2024-04-15 Thread Steven Price
On 13/04/2024 12:49, Andy Yan wrote: > From: Andy Yan > > The firmware in the rootfs will not be accessible until we > are in the SYSTEM_RUNNING state, so return EPROBE_DEFER until > that point. > This let the driver can load firmware when it is builtin. The usual solution is that the firmware s

Re: [bug report] drm/panthor: Add the scheduler logical block

2024-04-10 Thread Steven Price
On 10/04/2024 15:34, Dan Carpenter wrote: > On Wed, Apr 10, 2024 at 03:11:52PM +0100, Steven Price wrote: >> On 08/04/2024 08:35, Dan Carpenter wrote: >>> Hello Boris Brezillon, >>> >>> Commit de8548813824 ("drm/panthor: Add the scheduler logical block&qu

Re: [bug report] drm/panthor: Add the scheduler logical block

2024-04-10 Thread Steven Price
On 08/04/2024 08:35, Dan Carpenter wrote: > Hello Boris Brezillon, > > Commit de8548813824 ("drm/panthor: Add the scheduler logical block") > from Feb 29, 2024 (linux-next), leads to the following Smatch static > checker warning: > > drivers/gpu/drm/panthor/panthor_sched.c:1153 > csg_slot_

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

2024-04-08 Thread Steven Price
ot;suspended_slots" is a u64 and "upd_ctx.timedout_mask". The > mask clears out the top 32 bits which would likely be a bug if anything > were stored there. > > Signed-off-by: Dan Carpenter Reviewed-by: Steven Price If you fancy a bit more clean-up then I think faulty_slots is completely

Re: [PATCH] drm/panfrost: fix power transition timeout warnings

2024-03-28 Thread Steven Price
On 22/03/2024 16:45, Christian Hewitt wrote: > Increase the timeout value to prevent system logs on Amlogic boards flooding > with power transition warnings: > > [ 13.047638] panfrost ffe4.gpu: shader power transition timeout > [ 13.048674] panfrost ffe4.gpu: l2 power transition timeou

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

2024-03-28 Thread Steven Price
24 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Nathan Chancellor Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panthor/panthor_sched.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm

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

2024-03-27 Thread Steven Price
s, which we don't want. > > v3: > - New patch > > Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") > Signed-off-by: Boris Brezillon LGTM Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.h | 17 --

Re: [PATCH] drm/panfrost: Only display fdinfo's engine and cycle tags when profiling is on

2024-03-25 Thread Steven Price
On 16/03/2024 23:13, Adrián Larumbe wrote: > If job accounting is disabled, then both fdinfo's drm-engine and drm-cycle > key values will remain immutable. In that case, it makes more sense not to > display them at all to avoid confusing user space profiling tools. > > Signed-off-by: Adrián Larumb

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

2024-03-25 Thread Steven Price
On 25/03/2024 13:57, 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 > assignment and the _INT_MASK update. > > v2: > - New patch > > Reported-by: Steve

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

2024-03-25 Thread Steven Price
On 25/03/2024 11:43, Boris Brezillon wrote: > 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 cal

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

2024-03-25 Thread Steven Price
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() > helpers are called. Fix that by introducing a panthor_xxx_unplug() helper > that does what panthor_xxx_

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

2024-03-25 Thread Steven Price
ses: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10835 > Signed-off-by: Boris Brezillon Pesky 32 bit again ;) Looks fine, although I'm wondering whether you'd consider squashing something like the below on top? I think it helps contain the 32 bit specific code to the one place. Eithe

Re: [PATCH] drm/panfrost: fix power transition timeout warnings

2024-03-25 Thread Steven Price
rost, so the impact to the rest of the system of a long wait is less. But 2ms doesn't sound an unreasonable timeout so: Reviewed-by: Steven Price > Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in > panfrost_gpu_power_off()") > Signed-off-by: Christi

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

2024-03-18 Thread Steven Price
lug time. > > v2: > - Drop the #ifdef CONFIG_PM section around panthor_pm_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 Reviewed-by: Steven P

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

2024-03-18 Thread Steven Price
On 18/03/2024 14:49, Boris Brezillon wrote: > 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/202

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

2024-03-18 Thread Steven Price
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() and using page_to_pfn() instead. Signed-off-by: Steven Price --- drivers/gpu/drm/panthor/panthor_dev

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

2024-03-18 Thread Steven Price
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 2024 11:31:05 + >>> Steven Price wrote: >>> >>>> On 18/03/202

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

2024-03-18 Thread Steven Price
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 on CONFIG_PM is not possible because of a >>> circular dependency issue, and i

Re: [PATCH] drm/panfrost: Only display fdinfo's engine and cycle tags when profiling is on

2024-03-18 Thread Steven Price
igned-off-by: Adrián Larumbe Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c > b/drivers/gpu/drm/panfrost/panfrost_drv.c >

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

2024-03-18 Thread Steven Price
me. > > Reported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202403031944.eoimq8wk-...@intel.com/ > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > Tested by faking CONFIG_PM=n in the driver (basically commenting

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

2024-03-11 Thread Steven Price
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:52 am, Boris Brezillon wrote: On Mon, 11 Mar 2024 13:49:56 +0200 Jani Nikula wrote:    > On Mon, 11 Mar

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

2024-03-06 Thread Steven Price
'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: Steven Price > --- > .../tes

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

2024-03-04 Thread Steven Price
'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 I'm happy with this. Reviewed-by: Steven Price B

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

2024-03-04 Thread Steven Price
it should be easy to relax the CONFIG_PM condition in the future if anyone has an actual need. Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/Kconfig | 1 + > drivers/gpu/drm/panthor/panthor_device.c | 2 -- > 2 files changed, 1 insertion(+), 2 deletions(-) >

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

2024-03-04 Thread Steven Price
includes asm/page.h. I can find examples of both. Either way: Reviewed-by: Steven Price > --- > 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_dev

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

2024-03-04 Thread Steven Price
On 04/03/2024 09:08, Boris Brezillon wrote: > 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 Reviewed-by: Ste

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

2024-02-21 Thread Steven Price
On 21/02/2024 16:12, 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 registers so that jobs can be > profiled for fdinfo's drm engine and

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

2024-02-19 Thread Steven Price
llers of panthor_vm_alloc_va() allocate the drm_mm_node > (embedded in panthor_kernel_bo now) > - Adjust things to match the latest drm_gpuvm changes (extobj tracking, > resv prep and more) > - Drop the per-AS lock and use slots_lock (fixes a race on vm->as.id) > - Set as.id

  1   2   3   4   5   6   7   8   >