Re: [PATCH] drm/panfrost: Set DMA max segment size

2020-09-10 Thread Steven Price
On 03/09/2020 14:59, Robin Murphy wrote: Since all we do with scatterlists is map them in the MMU, we don't have any hardware constraints on how they're laid out. Let the DMA layer know so it won't warn when DMA API debugging is enabled. Signed-off-by: Robin Murphy Applied to drm-misc-next S

Re: [PATCH] drm/panfrost: Ensure GPU quirks are always initialised

2020-09-10 Thread Steven Price
On 09/09/2020 13:29, Steven Price wrote: The GPU 'CONFIG' registers used to work around hardware issues are cleared on reset so need to be programmed every time the GPU is reset. However panfrost_device_reset() failed to do this. To avoid this in future instead move t

Re: [PATCH v2 11/38] drm/gem: add _locked suffix to drm_object_put

2020-05-15 Thread Steven Price
subject is wrong: s/drm_object_put/drm_gem_object_put/ Otherwise with that fixes LTGM: Reviewed-By: Steven Price Steve --- drivers/gpu/drm/drm_gem.c | 6 +++--- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 ++-- drivers/gpu/drm/msm/msm_drv.c | 2 +- dri

Re: [PATCH v2 27/38] drm/panfrost: remove _unlocked suffix in drm_object_put_unlocked

2020-05-15 Thread Steven Price
. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Signed-off-by: Emil Velikov Acked-by: Sam Ravnb

Re: [PATCH v2 13/38] drm: remove _unlocked suffix in drm_object_put_unlocked

2020-05-15 Thread Steven Price
Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) NIT: The subject is wrong: s/drm_object_put/drm_gem_object_put/ With that fixed: Reviewed-by: Steven Price Steve --- Documentation/gpu/drm-mm.rst | 2 +- drivers/gpu/drm/drm_client.c

Re: [PATCH v2 12/38] drm/gem: add drm_object_put helper

2020-05-15 Thread Steven Price
drivers one by one, dropping the suffix. v2: add missing space after function name (Jani) Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) NIT: The subject is wrong: s/drm_object_put/drm_gem_object_put/ With that fixed: Reviewed-by: Steven Price Steve --- include/drm/drm_gem.h

Re: [PATCH] drm/panfrost: fix runtime pm imbalance on error

2020-05-20 Thread Steven Price
On 20/05/2020 12:05, Dinghao Liu wrote: pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Actually I think we have the opposi

Re: [PATCH] drm/panfrost: fix runtime pm imbalance on error

2020-05-22 Thread Steven Price
On 21/05/2020 08:00, dinghao@zju.edu.cn wrote: Hi Steve, There are two bailing out points in panfrost_job_hw_submit(): one is the error path beginning from pm_runtime_get_sync(), the other one is the error path beginning from WARN_ON() in the if statement. The pm imbalance fixed in this patc

[PATCH] drm/panfrost: Fix inbalance of devfreq record_busy/idle()

2020-05-22 Thread Steven Price
ll to panfrost_devfreq_record_idle() even if it is cleaning up multiple jobs. Move the call inside the loop to ensure that the number of _record_idle() calls matches the number of _record_busy() calls. Fixes: 9e62b885f715 ("drm/panfrost: Simplify devfreq utilisation tracking") Signed-off-by: Steven Price ---

Re: [PATCH] [v2] drm/panfrost: Fix runtime PM imbalance on error

2020-05-27 Thread Steven Price
On 22/05/2020 14:41, Dinghao Liu wrote: The caller expects panfrost_job_hw_submit() to increase runtime PM usage counter. The refcount decrement on the error branch of WARN_ON() will break the counter balance and needs to be removed. Signed-off-by: Dinghao Liu Reviewed-by: Steven Price

Re: [PATCH 02/15] drm/panfrost: clean headers in devfreq

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Don't include not required headers and sort them. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gp

Re: [PATCH 01/15] drm/panfrost: avoid static declaration

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: This declaration can be avoided so change it. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Convert busy_count to a simple int protected by spinlock. Signed-off-by: Clément Péron Looks like a fairly mechanical cleanup. Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu

Re: [PATCH 03/15] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-05-28 Thread Steven Price
ld be safe. As you note this wouldn't work without devfreq anyway. Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 79

Re: [PATCH 04/15] drm/panfrost: introduce panfrost_devfreq struct

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Introduce a proper panfrost_devfreq to deal with devfreq variables. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h

Re: [PATCH 09/15] drm/panfrost: dynamically alloc regulators

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Signed-off-by: Clément Péron LGTM: Reviewed-by: Steven Price --- driver

Re: [PATCH 10/15] drm/panfrost: add regulators to devfreq

2020-05-28 Thread Steven Price
looks like it should work - thanks for doing this! Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 19 +++ drivers/gpu/drm/panfrost/panfrost_devfreq.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_device.c | 11 +++ 3 files changed, 28 inser

Re: [PATCH 07/15] drm/panfrost: use device_property_present to check for OPP

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Instead of expecting an error from dev_pm_opp_of_add_table() do a simple device_property_present() check. Signed-off-by: Clément Péron I'm not sure I understand why this is better. We seem to have more code to do roughly the same thing just with the

Re: [PATCH 11/15] drm/panfrost: set devfreq clock name

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Some SoCs have several clocks defined and the OPP core needs to know the exact name of the clk to use. Set the clock name to "core". Signed-off-by: Clément Péron This is unfortunately a regression for the RK3288. The device tree binding doesn't req

Re: [PATCH 08/15] drm/panfrost: move devfreq_init()/fini() in device

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Later we will introduce devfreq probing regulator if they are present. As regulator should be probe only one time we need to get this logic in the device_init(). panfrost_device is already taking care of devfreq_resume() and devfreq_suspend(), so it's no

Re: [PATCH 06/15] drm/panfrost: properly handle error in probe

2020-05-28 Thread Steven Price
On 10/05/2020 17:55, Clément Péron wrote: Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Signed-off-by: Clément Péron LGTM: Reviewed-by: Steven Price --- drivers/gpu/drm

Re: [PATCH i-g-t] panfrost: Test labeling functionality

2020-05-29 Thread Steven Price
On 28/05/2020 14:38, Rohan Garg wrote: Introduce tests to cover the new generic labeling ioctl's being reviewed here [1]. Signed-off-by: Rohan Garg [1] https://patchwork.freedesktop.org/series/77267/ Signed-off-by: Rohan Garg A few comments below. --- include/drm-uapi/drm.h| 23 ++

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-29 Thread Steven Price
On 29/05/2020 13:35, Clément Péron wrote: Hi Robin, On Fri, 29 May 2020 at 14:20, Robin Murphy wrote: On 2020-05-10 17:55, Clément Péron wrote: Convert busy_count to a simple int protected by spinlock. A little more reasoning might be nice. I have follow the modification requested for li

Re: [PATCH] drm/panfrost: Use kvfree() to free bo->sgts in panfrost_mmu_map_fault_addr()

2020-06-08 Thread Steven Price
On 05/06/2020 19:52, Denis Efremov wrote: Use kvfree() to free bo->sgts, because the memory is allocated with kvmalloc_array(). Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Cc: sta...@vger.kernel.org Signed-off-by: Denis Efremov Well spotted, but there's another

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 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: [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 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 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: [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: [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 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: [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: [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 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 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 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

[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

[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"

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

Re: [PATCH v2 04/15] drm/panthor: Add the device logical block

2023-08-30 Thread Steven Price
On 29/08/2023 15:00, Boris Brezillon wrote: > On Fri, 11 Aug 2023 16:47:56 +0100 > Steven Price wrote: > >> On 09/08/2023 17:53, Boris Brezillon wrote: >>> The panthor driver is designed in a modular way, where each logical >>> block is dealing with a specific

Re: [PATCH v2 08/15] drm/panthor: Add the MMU/VM logical block

2023-08-30 Thread Steven Price
On 29/08/2023 16:33, Boris Brezillon wrote: > On Mon, 14 Aug 2023 16:53:09 +0100 > Steven Price wrote: > >>> + >>> +/** >>> + * struct panthor_vm_op_ctx - VM operation context >>> + * >>> + * With VM operations potentially taking place

Re: [PATCH v2 09/15] drm/panthor: Add the FW logical block

2023-08-30 Thread Steven Price
On 29/08/2023 17:15, Boris Brezillon wrote: > On Wed, 16 Aug 2023 17:01:56 +0100 > Steven Price wrote: > >> On 09/08/2023 17:53, Boris Brezillon wrote: [...] >>> +/** >>> + * panthor_fw_mem_alloc() - Allocate a FW memory object and map it to the &

Re: [PATCH v2 08/15] drm/panthor: Add the MMU/VM logical block

2023-08-30 Thread Steven Price
On 30/08/2023 15:53, Boris Brezillon wrote: > On Wed, 30 Aug 2023 15:12:43 +0100 > Steven Price wrote: > >> On 29/08/2023 16:33, Boris Brezillon wrote: >>> On Mon, 14 Aug 2023 16:53:09 +0100 >>> Steven Price wrote: >>> >>>>> + >

Re: [PATCH v2 12/15] drm/panthor: Add the driver frontend block

2023-08-31 Thread Steven Price
On 29/08/2023 18:46, Boris Brezillon wrote: > On Mon, 21 Aug 2023 12:31:29 +0100 > Steven Price wrote: > >> On 09/08/2023 17:53, Boris Brezillon wrote: [...] >>> + * // Collect signal operations on all jobs, such that each job can pick >>> + * // from it fo

Re: [PATCH v2] MAINTAINERS: Add Boris Brezillon as Panfrost driver maintainer

2023-08-31 Thread Steven Price
lyssa, who left Collabora and stepped down from working > on Panfrost. > > Acked-by: Boris Brezillon > Acked-by: Tomeu Vizoso > Acked-by: Alyssa Rosenzweig > Signed-off-by: Dmitry Osipenko FWIW: Acked-by: Steven Price Steve > --- > > Changelog: > > v2:

Re: [PATCH v2 1/6] drm/panfrost: Add cycle count GPU register definitions

2023-08-31 Thread Steven Price
On 24/08/2023 02:34, Adrián Larumbe wrote: > These GPU registers will be used when programming the cycle counter, which > we need for providing accurate fdinfo drm-cycles values to user space. > > Signed-off-by: Adrián Larumbe Reviewed-by: Steven Price > --- > driver

Re: [PATCH v2 2/6] drm/panfrost: Add fdinfo support GPU load metrics

2023-08-31 Thread Steven Price
On 24/08/2023 02:34, Adrián Larumbe wrote: > The drm-stats fdinfo tags made available to user space are drm-engine, > drm-cycles, drm-max-freq and drm-curfreq, one per job slot. > > This deviates from standard practice in other DRM drivers, where a single > set of key:value pairs is provided for t

Re: [PATCH v2 02/15] drm/panthor: Add uAPI

2023-09-04 Thread Steven Price
On 01/09/2023 17:10, Boris Brezillon wrote: > On Wed, 9 Aug 2023 18:53:15 +0200 > Boris Brezillon wrote: > >> +/** >> + * DOC: MMIO regions exposed to userspace. >> + * >> + * .. c:macro:: DRM_PANTHOR_USER_MMIO_OFFSET >> + * >> + * File offset for all MMIO regions being exposed to userspace. Don

Re: [PATCH v2 2/6] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-04 Thread Steven Price
On 31/08/2023 22:34, Adrián Larumbe wrote: > On 31.08.2023 16:54, Steven Price wrote: >> On 24/08/2023 02:34, Adrián Larumbe wrote: >>> The drm-stats fdinfo tags made available to user space are drm-engine, >>> drm-cycles, drm-max-freq and drm-curfreq, one per job slot.

Re: [PATCH v16 20/20] drm/panfrost: Switch to generic memory shrinker

2023-09-04 Thread Steven Price
On 03/09/2023 18:07, Dmitry Osipenko wrote: > Replace Panfrost's custom memory shrinker with a common drm-shmem > memory shrinker. > > Tested-by: Steven Price # Firefly-RK3288 I just gave this version of the series a spin and I can trigger the following warnin

Re: [PATCH v2 02/15] drm/panthor: Add uAPI

2023-09-04 Thread Steven Price
On 04/09/2023 10:26, Boris Brezillon wrote: > On Mon, 4 Sep 2023 08:42:08 +0100 > Steven Price wrote: > >> On 01/09/2023 17:10, Boris Brezillon wrote: >>> On Wed, 9 Aug 2023 18:53:15 +0200 >>> Boris Brezillon wrote: >>> >>>>

Re: [PATCH v2 02/15] drm/panthor: Add uAPI

2023-09-06 Thread Steven Price
On 04/09/2023 17:25, Robin Murphy wrote: > On 2023-09-04 17:16, Boris Brezillon wrote: >> On Mon, 4 Sep 2023 16:22:19 +0100 >> Steven Price wrote: >> >>> On 04/09/2023 10:26, Boris Brezillon wrote: >>>> On Mon, 4 Sep 2023 08:42:08 +0100 >>>>

Re: [PATCH v16 20/20] drm/panfrost: Switch to generic memory shrinker

2023-09-06 Thread Steven Price
On 05/09/2023 09:08, Boris Brezillon wrote: > On Mon, 4 Sep 2023 14:20:24 +0100 > Steven Price wrote: > >> On 03/09/2023 18:07, Dmitry Osipenko wrote: >>> Replace Panfrost's custom memory shrinker with a common drm-shmem >>> memory shrinker. >>>

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 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] 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] 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
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/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

[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: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

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/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 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 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 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 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] 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

[PATCH] drm/panfrost: Remove incorrect IS_ERR() check

2023-10-20 Thread Steven Price
r/376713ff-9a4f-4ea3-b097-fb5efb685d95@moroto.mountain Signed-off-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_dump.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_dump.c b/drivers/gpu/drm/panfrost/panfrost_dump.c ind

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] 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 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

[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] 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

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: [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: [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: [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 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 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: [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: [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
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
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: [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: [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 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 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 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 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 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 v5 2/6] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-18 Thread Steven Price
takes to process the GPU interrupt, which means additional time and > + * GPU cycles will be added in excess to the real figure. > + * - Secondly, the pipelining done by the Job Manager (2 job slots per > + * engine) implies there is no way to know exactly how much

Re: [PATCH v5 3/6] drm/panfrost: Add fdinfo support for memory stats

2023-09-18 Thread Steven Price
x27;s shrinker mutex, but drm_show_memory_stats takes > over the drm file's object handle database spinlock, so there's potential > for a race condition here. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gp

Re: [PATCH v5 4/6] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-18 Thread Steven Price
> > Signed-off-by: Adrián Larumbe > Reviewed-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/drm_file.c | 5 - > include/drm/drm_gem.h | 9 + > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_f

Re: [PATCH v5 5/6] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-18 Thread Steven Price
On 14/09/2023 23:38, Adrián Larumbe wrote: > BO's RSS is updated every time new pages are allocated on demand and mapped > for the object at GPU page fault's IRQ handler, but only for heap buffers. > The reason this is unnecessary for non-heap buffers is that they are mapped > onto the GPU's VA spa

Re: [PATCH v5 6/6] drm/drm-file: Show finer-grained BO sizes in drm_show_memory_stats

2023-09-18 Thread Steven Price
is clearly an improvement. Reviewed-by: Steven Price > --- > drivers/gpu/drm/drm_file.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c > index 762965e3d503..34cfa128ffe5 100644 > --- a/

Re: [PATCH v5 5/6] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-18 Thread Steven Price
On 18/09/2023 11:32, Boris Brezillon wrote: > On Mon, 18 Sep 2023 11:01:43 +0100 > Steven Price wrote: > >> On 14/09/2023 23:38, Adrián Larumbe wrote: >>> BO's RSS is updated every time new pages are allocated on demand and mapped >>> for the object at GPU

Re: [PATCH v6 2/6] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-22 Thread Steven Price
;>> counting >>>> mechanism was introduced, and a job flag that tells us whether a >>>> given job >>>> increased the refcount. This is necessary, because user space can >>>> toggle >>>> cycle counting through a debugfs file, a

Re: [PATCH 1/7] drm: Do not round to megabytes for greater than 1MiB sizes in fdinfo stats

2023-09-27 Thread Steven Price
f eyeballing fdinfo text directly. > > Signed-off-by: Tvrtko Ursulin > Cc: Rob Clark > Cc: Adrián Larumbe > Cc: steven.pr...@arm.com Reviewed-by: Steven Price > --- > drivers/gpu/drm/drm_file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

<    2   3   4   5   6   7   8   9   10   >