Re: [PATCH v2 00/15] drm: Add a driver for FW-based Mali GPUs

2023-09-27 Thread Steven Price
from panfrost, so they can acknowledge the GPL2 -> MIT+GPL2 > change. If I missed someone, please let me know. Regarding the relicensing, Arm agrees to the relicensing of the parts they hold copyright on. Acked-by: Steven Price Steve

Re: [PATCH] Documentation/gpu: fix Panfrost documentation build warnings

2023-10-05 Thread Steven Price
; @@ -5,7 +5,7 @@ > .. _panfrost-usage-stats: > > Panfrost DRM client usage stats implementation > -== > +== This fix is already present in drm-misc-next - I think Boris must have fixed it when applying. With that dropped: Reviewed-by: Steven Pri

Re: [PATCH 1/4] drm/panfrost: Implement ability to turn on/off GPU clocks in suspend

2023-10-30 Thread Steven Price
On 30/10/2023 13:22, AngeloGioacchino Del Regno wrote: > Currently, the GPU is being internally powered off for runtime suspend > and turned back on for runtime resume through commands sent to it, but > note that the GPU doesn't need to be clocked during the poweroff state, > hence it is possible t

Re: [PATCH 3/4] drm/panfrost: Implement ability to turn on/off regulators in suspend

2023-10-30 Thread Steven Price
On 30/10/2023 13:22, AngeloGioacchino Del Regno wrote: > Some platforms/SoCs can power off the GPU entirely by completely cutting > off power, greatly enhancing battery time during system suspend: add a > new pm_feature GPU_PM_VREG_OFF to allow turning off the GPU regulators > during full suspend o

Re: [PATCH 1/4] drm/panfrost: Implement ability to turn on/off GPU clocks in suspend

2023-11-01 Thread Steven Price
On 31/10/2023 10:33, AngeloGioacchino Del Regno wrote: >> Anyway, as for the GPU_PM_CLK_DIS feature - I feel like being >> extremely careful >> with this is still a good idea... thing is, even if we're sure that >> the GPU itself >> is fine with us turning off/on clocks (even aggressively), I'm no

Re: [PATCH] drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()

2023-11-08 Thread Steven Price
gt; Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price Thanks, Steve

Re: [PATCH v2 1/6] drm/panfrost: Perform hard reset to recover GPU if soft reset fails

2023-11-08 Thread Steven Price
On 02/11/2023 14:26, AngeloGioacchino Del Regno wrote: > Even though soft reset should ideally never fail, during development of > some power management features I managed to get some bits wrong: this > resulted in GPU soft reset failures, where the GPU was never able to > recover, not even after s

Re: [PATCH v2 2/6] drm/panfrost: Tighten polling for soft reset and power on

2023-11-08 Thread Steven Price
KRELLM running: 73200ns > > After this commit: > > GDM: user selection up/down:26690ns > GDM: Text Entry (typing user/password): 27917ns > GNOME Desktop, idling, GKRELLM running: 25304ns > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by

Re: [PATCH v2 3/6] drm/panfrost: Implement ability to turn on/off GPU clocks in suspend

2023-11-08 Thread Steven Price
;comp->pm_features & BIT(GPU_PM_CLK_DIS)) { > + clk_disable(pfdev->clock); > + > + if (pfdev->bus_clock) > + clk_disable(pfdev->bus_clock); NIT: I would normally expect panfrost_device_resume() to have the opposite or

Re: [PATCH v2 4/6] drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs

2023-11-08 Thread Steven Price
sleep .resume() handler and .runtime_resume() (so the time > refers to T_Resume + T_Runtime_Resume): > > Average Panfrost-only system sleep resume time, before: ~28000ns > Average Panfrost-only system sleep resume time, after: ~33500ns > > Signed-off-by: AngeloGioacchino Del Re

Re: [PATCH v2 6/6] drm/panfrost: Set regulators on/off during system sleep on MediaTek SoCs

2023-11-08 Thread Steven Price
On 02/11/2023 14:26, AngeloGioacchino Del Regno wrote: > All of the MediaTek SoCs supported by Panfrost can completely cut power > to the GPU during full system sleep without any user-noticeable delay > in the resume operation, as shown by measurements taken on multiple > MediaTek SoCs. > > As an

Re: [PATCH v2 5/6] drm/panfrost: Implement ability to turn on/off regulators in suspend

2023-11-08 Thread Steven Price
On 02/11/2023 14:26, AngeloGioacchino Del Regno wrote: > Some platforms/SoCs can power off the GPU entirely by completely cutting > off power, greatly enhancing battery time during system suspend: add a > new pm_feature GPU_PM_VREG_OFF to allow turning off the GPU regulators > during full suspend o

Re: [PATCH v3 1/6] drm/panfrost: Perform hard reset to recover GPU if soft reset fails

2023-11-10 Thread Steven Price
cchino Del Regno > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_gpu.c | 13 ++--- > drivers/gpu/drm/panfrost/panfrost_regs.h | 1 + > 2 files changed, 11 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost

Re: [PATCH v3 3/6] drm/panfrost: Implement ability to turn on/off GPU clocks in suspend

2023-11-10 Thread Steven Price
> resulting in a full system lockup. > > Doing this only for full system sleep never showed issues during my > testing by suspending and resuming the system continuously for more > than 100 cycles. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by:

Re: [PATCH v3 5/6] drm/panfrost: Implement ability to turn on/off regulators in suspend

2023-11-10 Thread Steven Price
full suspend only on selected platforms. > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_device.c | 19 ++- > drivers/gpu/drm/panfrost/panfrost_device.h | 2 ++ > 2 files changed, 20 inser

Re: [PATCH v3 6/6] drm/panfrost: Set regulators on/off during system sleep on MediaTek SoCs

2023-11-10 Thread Steven Price
t; MT8186, MT8192, MT8195 were tested manually with over 100 suspend/resume > cycles with GNOME DE (Mutter + Wayland). > > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 6 +++--- > 1 file changed,

Re: [PATCH v3 0/6] drm/panfrost: Turn off clocks and regulators in PM

2023-11-10 Thread Steven Price
On 09/11/2023 10:25, AngeloGioacchino Del Regno wrote: > Changes in v3: > - Fixed the order of set_opp/opp_put in patch [5/6] > - Clearly specified MediaTek SoC models in patches [4/6], [6/6] > - Reordered clk_disable() for suspend in patch [3/6] > - Fixed blank line removal and alignment in pa

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

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 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 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 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 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 v4 04/14] drm/panthor: Add the GPU logical block

2024-02-08 Thread Steven Price
(don't output registers that are > not updated for protected interrupts). > - Minor code tidy ups > > Cc: Alexey Sheplyakov # MIT+GPL2 relicensing > Co-developed-by: Steven Price > Signed-off-by: Steven Price > Signed-off-by: Boris Brezillon > Acked-by: Steven Price #

Re: [PATCH v4 05/14] drm/panthor: Add GEM logical block

2024-02-09 Thread Steven Price
r_fw_mem and be used everywhere we were > using panthor_gem_create_and_map() before) > - Adjust things to match drm_gpuvm changes > - Change return of panthor_gem_create_with_handle() to int > > Co-developed-by: Steven Price > Signed-off-by: Steven Price > Signed-off-by: Boris Bre

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

2024-02-09 Thread Steven Price
> resv prep and more) > - Drop the per-AS lock and use slots_lock (fixes a race on vm->as.id) > - Set as.id to -1 when reusing an address space from the LRU list > - Drop misleading comment about page faults > - Remove check for irq being assigned in panthor_mmu_unplug() > >

Re: [PATCH v4 09/14] drm/panthor: Add the heap logical block

2024-02-12 Thread Steven Price
ernel_bo abstraction for the heap context and heap > chunks > - Drop the panthor_heap_gpu_ctx struct as it is opaque to the driver > - Ensure that the heap context is aligned to the GPU cache line size > - Minor code tidy ups > > Co-developed-by: Steven Price > Signed-off-by: Steven

Re: [PATCH 0/1] Always record job cycle and timestamp information

2024-02-14 Thread Steven Price
Hi Adrián, On 14/02/2024 12:14, Adrián Larumbe wrote: > A driver user expressed interest in being able to access engine usage stats > through fdinfo when debugfs is not built into their kernel. In the current > implementation, this wasn't possible, because it was assumed even for > inflight jobs e

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

2024-02-14 Thread Steven Price
be a good reason > - Account for drm_sched changes > - Provide a panthor_queue_put_syncwait_obj() > - Unconditionally return groups to their idle list in > panthor_sched_suspend() > - Condition of sched_queue_{,delayed_}work fixed to be only when a reset > isn't pending or

Re: [PATCH v4 09/14] drm/panthor: Add the heap logical block

2024-02-15 Thread Steven Price
On 14/02/2024 17:33, Boris Brezillon wrote: > On Mon, 12 Feb 2024 11:40:55 + > Steven Price wrote: > >> On 22/01/2024 16:30, Boris Brezillon wrote: >>> Tiler heap growing requires some kernel driver involvement: when the >>> tiler runs out of heap memory, it

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] 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: 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/panfrost: Really power off GPU cores in panfrost_gpu_power_off()

2023-11-22 Thread Steven Price
gt;> Il 21/11/23 16:34, Krzysztof Kozlowski ha scritto: >>>>> On 08/11/2023 14:20, Steven Price wrote: >>>>>> On 02/11/2023 14:15, AngeloGioacchino Del Regno wrote: >>>>>>> The layout of the registers {TILER,SHADER,L2}_PWROFF_LO, used to >&

Re: [PATCH 1/2] drm/panfrost: Consider dma-buf imported objects as resident

2023-11-27 Thread Steven Price
-counting system wide (both the exporter and importer could show the memory usage). But I think we're better off over-counting rather than under-counting. Reviewed-by: Steven Price > Signed-off-by: Adrián Larumbe > Fixes: 9ccdac7aa822 ("drm/panfrost: Add fdinfo support for memory sta

Re: [PATCH 2/2] drm/panfrost: Fix incorrect updating of current device frequency

2023-11-27 Thread Steven Price
assigned instead. Good catch - I'd not looked at the performance governor. I'd assumed that one was "too simple to be wrong" ;) Reviewed-by: Steven Price > > Signed-off-by: Adrián Larumbe > Fixes: f11b0417eec2 ("drm/panfrost: Add fdinfo sup

Re: [PATCH 0/2] Panfrost devfreq and GEM status fixes

2023-11-30 Thread Steven Price
On 25/11/2023 20:52, Adrián Larumbe wrote: > During recent development of the Mali CSF GPU Panthor driver, a user > noticed that GPU frequency values as reported by fdinfo were > incorrect. This was traced back to incorrect handling of frequency value > updates. The same problem was seen in Panfros

Re: [PATCH v3 1/3] drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq

2023-12-01 Thread Steven Price
s > > Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in > panfrost_gpu_power_off()") > Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_gpu.c | 12 > 1 file changed,

Re: [PATCH v3 2/3] drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

2023-12-01 Thread Steven Price
; Signed-off-by: AngeloGioacchino Del Regno > Reviewed-by: Steven Price Although this now makes the job IRQ look out of place - I'm not sure why we have the struct panfrost_job_slot as a separately allocated structure either. Anyway - that's irrelevant to this patch! Steve >

Re: [PATCH v3 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-01 Thread Steven Price
On 01/12/2023 11:14, Boris Brezillon wrote: > On Fri, 1 Dec 2023 11:40:27 +0100 > AngeloGioacchino Del Regno > wrote: > >> To make sure that we don't unintentionally perform any unclocked and/or >> unpowered R/W operation on GPU registers, before turning off clocks and >> regulators we must make

Re: [PATCH v4 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-04 Thread Steven Price
o address the > possible corner case of unintentional IRQ unmasking because of ISR > execution after a call to synchronize_irq(). > > At resume, clear each is_suspended bit in the reset path of JOB/MMU > to allow unmasking the interrupts. > > Signed-off-by: AngeloGioacchino Del R

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/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] 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: 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: [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: [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: [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: [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 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 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 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 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] 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 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: 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] 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: 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 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 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 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 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 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 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 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 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 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 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 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 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 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 +

[PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-28 Thread Steven Price
size parameter in the call to dma_mmap_wc as the offset may not be non-zero. Signed-off-by: Tu Vuong Signed-off-by: Steven Price Reviewed-by: Brian Starkey CC: Brian Starkey CC: Liviu Dudau --- drivers/gpu/drm/drm_gem_cma_helper.c | 13 - 1 file changed, 8 insertions(+), 5 deletions

Re: [PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-29 Thread Steven Price
On Thu, 2017-09-28 at 10:29 +0200, Daniel Vetter wrote: > On Thu, Sep 28, 2017 at 10:23 AM, Liviu Dudau > wrote: > > Hi Daniel, > > > > On Thu, Sep 28, 2017 at 09:40:35AM +0200, Daniel Vetter wrote: > > > On Wed, Sep 27, 2017 at 4:01 PM, Steven Price >

Re: [PATCH v19 17/30] drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()

2024-01-25 Thread Steven Price
lon > Co-developed-by: Dmitry Osipenko > Signed-off-by: Dmitry Osipenko Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 13 + > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfro

Re: [PATCH v19 18/30] drm/panfrost: Explicitly get and put drm-shmem pages

2024-01-25 Thread Steven Price
), to make sure we're not trying to purge a BO that > already had its pages released. > > Signed-off-by: Dmitry Osipenko Reviewed-by: Steven Price Although I don't like the condition in panfrost_gem_mapping_release() for drm_gem_shmem_put_pages() and assigning NULL to

Re: [PATCH v19 18/30] drm/panfrost: Explicitly get and put drm-shmem pages

2024-01-26 Thread Steven Price
On 26/01/2024 09:39, Boris Brezillon wrote: > On Thu, 25 Jan 2024 16:47:24 + > Steven Price wrote: > >> On 05/01/2024 18:46, Dmitry Osipenko wrote: >>> To simplify the drm-shmem refcnt handling, we're moving away from >>> the implicit get_pages() that i

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

2023-12-06 Thread Steven Price
On 05/12/2023 08:48, Boris Brezillon wrote: > Hi Steve, > > I forgot to mention that I intentionally dropped your R-b, because > there was a gazillion of changes all over the place, and I thought it > deserved a fresh review. No problem, I'll re-review the patches. Thanks for getting the v3 out t

Re: [PATCH v3 01/14] drm/panthor: Add uAPI

2023-12-06 Thread Steven Price
gs in > -pedantic mode. > - Drop property core_group_count as it can be easily calculated by the > number of bits set in l2_present. > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price NIT: I believe the signed-off lines should be like: Co-developed-by: Steven

Re: [PATCH v3 02/14] drm/panthor: Add GPU register definitions

2023-12-06 Thread Steven Price
t doesn't exist post-CSF > - Remove CSF_GPU_LATEST_FLUSH_ID_DEFAULT > - Add GPU_L2_FEATURES_LINE_SIZE for extracting the GPU cache line size > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price > Acked-by: Steven Price # MIT+GPL2 relicensing,Arm > Acked-by: G

Re: [PATCH v3 03/14] drm/panthor: Add the device logical block

2023-12-06 Thread Steven Price
-way in > panthor_device_reset_work() > - Replace CSF_GPU_LATEST_FLUSH_ID_DEFAULT with a constant '1' and a > comment to explain. Also remove setting the dummy flush ID on suspend. > - Remove drm_WARN_ON() in panthor_exception_name() > - Check pirq->suspended in panthor_xxx_irq_r

Re: [PATCH v3 03/14] drm/panthor: Add the device logical block

2023-12-07 Thread Steven Price
On 07/12/2023 08:56, Boris Brezillon wrote: > On Thu, 7 Dec 2023 09:12:43 +0100 > Boris Brezillon wrote: > >> On Wed, 6 Dec 2023 16:55:42 + >> Steven Price wrote: >> >>> On 04/12/2023 17:32, Boris Brezillon wrote: >>>> The panthor driver

Re: [PATCH v3 04/14] drm/panthor: Add the GPU logical block

2023-12-07 Thread Steven Price
rotected interrupts). > - Minor code tidy ups > > Cc: Alexey Sheplyakov # MIT+GPL2 relicensing > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price > Acked-by: Steven Price # MIT+GPL2 relicensing,Arm > Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro > Acked-by

Re: [PATCH v3 05/14] drm/panthor: Add GEM logical block

2023-12-07 Thread Steven Price
r_gem_create_with_handle() to int > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price > Acked-by: Steven Price # MIT+GPL2 relicensing,Arm > Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro > Acked-by: Boris Brezillon # MIT+GPL2 > relicensing,Collabora Looks ge

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

2023-12-08 Thread Steven Price
e slots_lock (fixes a race on vm->as.id) > - Set as.id to -1 when reusing an address space from the LRU list > - Drop misleading comment about page faults > - Remove check for irq being assigned in panthor_mmu_unplug() > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven P

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

2023-12-08 Thread Steven Price
al alignment is good enough. > - Other minor code improvements. > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price One typo below (I think it might even have been mine...), but otherwise Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.c

Re: [PATCH v3 09/14] drm/panthor: Add the heap logical block

2023-12-08 Thread Steven Price
t; v3: > - Add a FIXME for the heap OOM deadlock Sadly I don't have any better solutions that what you've described in the FIXME. Other than the deadlock FIXME: Reviewed-by: Steven Price Steve > - Use the panthor_kernel_bo abstraction for the heap context and heap > chu

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

2023-12-11 Thread Steven Price
bj() > - Unconditionally return groups to their idle list in > panthor_sched_suspend() > - Condition of sched_queue_{,delayed_}work fixed to be only when a reset > isn't pending or in progress. > - Several typos in comments fixed. > > Signed-off-by: Boris Brezillon

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

2023-12-13 Thread Steven Price
nthor_submit_ctx_add_job(). > - Fix typos in comments. > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price > Acked-by: Steven Price # MIT+GPL2 relicensing,Arm > Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro > Acked-by: Boris Brezillon # MIT+GPL2 >

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

2023-12-13 Thread Steven Price
o be > supported by this driver and which are for panfrost. > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven Price > Acked-by: Steven Price # MIT+GPL2 relicensing,Arm > Acked-by: Grant Likely # MIT+GPL2 relicensing,Linaro > Acked-by: Boris Brezillon # MIT+

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

2023-12-13 Thread Steven Price
On 04/12/2023 17:33, Boris Brezillon wrote: > Add an entry for the Panthor driver to the MAINTAINERS file. > > v3: > - Add bindings document as an 'F:' line. > - Add Steven and Liviu as co-maintainers. > > Signed-off-by: Boris Brezillon > Signed-off-by: Steven

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 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 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 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 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 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 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 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] drm/panthor: Add FOP_UNSIGNED_OFFSET to fop_flags

2024-09-20 Thread Steven Price
e render node the WARN() added by the patch > gets triggered. > > Fixes: 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to fop_flags") > Cc: Christian Brauner > Signed-off-by: Liviu Dudau Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_drv.c |

<    3   4   5   6   7   8