Re: [PATCH 1/1] drm/panfrost: Add support for devcoredump

2022-06-07 Thread Adrián Larumbe
On 18.05.2022 13:54, Rob Clark wrote: > On Tue, May 17, 2022 at 10:42 AM Adrián Larumbe > wrote: > > > > In the event of a job timeout, debug dump information will be written into > > /sys/class/devcoredump. > > > > Inspired by etnaviv's similar featu

Re: [PATCH 1/1] drm/panfrost: Add support for devcoredump

2022-06-20 Thread Adrián Larumbe
Hi Steven, Thanks a lot for your feedback, it was quite useful. Also I'm sorry about having taken so long to write a reply, but other things held me back from working on Panfrost for way too long already. On 18.05.2022 12:03, Steven Price wrote: >On 17/05/2022 18:42, Adrián Larumbe wrot

[PATCH v2 0/1] devcoredump support for Panfrost GPU driver

2022-06-20 Thread Adrián Larumbe
r for header fields to something more representative. - Changed the dump header format to a union whose members are the different header types. Adrián Larumbe (1): drm/panfrost: Add support for devcoredump drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile

[PATCH v2 1/1] drm/panfrost: Add support for devcoredump

2022-06-20 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH v3 1/1] drm/panfrost: Add support for devcoredump

2022-06-21 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH v3 0/1] devcoredump support for Panfrost GPU driver

2022-06-21 Thread Adrián Larumbe
patch: - Added JS and MMU offset macros for selecting the right register in the dump rather than using magic numbers. - Added sanity check to make sure Panfrost's page size is the same as the CPU's - Added major and minor dump header version numbers Adrián Larumbe (1): drm/panfrost: A

[PATCH v4 0/2] devcoredump support for Panfrost GPU driver

2022-06-22 Thread Adrián Larumbe
. Adrián Larumbe (2): drm/panfrost: Add specific register offset macros for JS and MMU AS drm/panfrost: Add support for devcoredump drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gpu/drm/panfrost/panfrost_dump.c | 249

[PATCH v4 1/2] drm/panfrost: Add specific register offset macros for JS and MMU AS

2022-06-22 Thread Adrián Larumbe
Each Panfrost job has its own job slot and MMU address space set of registers, which are selected with a job-specific index. Turn the shift and stride used for selection of the right register set base into a define rather than using magic numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu

[PATCH v4 2/2] drm/panfrost: Add support for devcoredump

2022-06-22 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH] drm/meson: fix HDMI2 420 display mode selection logic

2022-05-15 Thread Adrián Larumbe
s videomode supports YCBCR420 output format. Fix the selection logic. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/meson_dw_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index 5cd2b2

[PATCH 0/1] devcoredump support for Panfrost GPU driver

2022-05-17 Thread Adrián Larumbe
. Mesa MR under review can be found at: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14034 Adrián Larumbe (1): drm/panfrost: Add support for devcoredump drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gpu/drm/panfrost

[PATCH 1/1] drm/panfrost: Add support for devcoredump

2022-05-17 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH] drm/panfrost: Give name to anonymous coredump object union

2022-09-12 Thread Adrián Larumbe
the Mesa build. Give it a name, and also rename pan_reg_hdr structure because it will always be prefixed by the union name. Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7195 Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_dump.c | 20 ++-- i

[PATCH 0/3] drm/meson: fix use-after-free driver unload issues

2022-09-18 Thread Adrián Larumbe
eep nodes to freed memory. All three patches have been tested on an Odroid N2+ plus SBC. Adrián Larumbe (3): drm/meson: reorder driver deinit sequence to fix use-after-free bug drm/meson: explicitly remove aggregate driver at module unload time drm/meson: remove drm bridges at aggregate driver

[PATCH 1/3] drm/meson: reorder driver deinit sequence to fix use-after-free bug

2022-09-18 Thread Adrián Larumbe
ge_detach is called for every single bridge linked to the encoder, including the one whose memory had already been deallocated. Fix by calling component_unbind_all after drm_dev_put. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/meson_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 3/3] drm/meson: remove drm bridges at aggregate driver unbind time

2022-09-18 Thread Adrián Larumbe
007] == Fix by keeping track of which encoders were initialised in the meson_drm structure and manually removing their bridges at aggregate driver's unbind time. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/mes

[PATCH 2/3] drm/meson: explicitly remove aggregate driver at module unload time

2022-09-18 Thread Adrián Larumbe
x27;remove' driver callback for meson-drm, and explicitly deleting the aggregate device. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/meson_drv.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_d

Re: [PATCH] drm/panfrost: Give name to anonymous coredump object union

2022-09-18 Thread Adrián Larumbe
Hi Steven, On 13.09.2022 09:45, Steven Price wrote: >On 12/09/2022 17:44, Adrián Larumbe wrote: >> Building Mesa's Perfetto requires including the panfrost drm uAPI header in >> C++ code, but the C++ compiler requires anonymous unions to have only >> public non-static d

Re: [PATCH 3/3] drm/meson: remove drm bridges at aggregate driver unbind time

2022-09-20 Thread Adrián Larumbe
On 19.09.2022 15:03, Neil Armstrong wrote: > On 19/09/2022 03:09, Adrián Larumbe wrote: > > drm bridges added by meson_encoder_hdmi_init and meson_encoder_cvbs_init > > were not manually removed at module unload time, which caused dangling > > references to freed memory to

[PATCH 2/2] drm/panfrost: replace endian-specific types with generic ones

2022-09-20 Thread Adrián Larumbe
/mesa/mesa/-/issues/7252 Fixes: 730c2bf4ad39 ("drm/panfrost: Add support for devcoredump") Signed-off-by: Adrián Larumbe --- include/uapi/drm/panfrost_drm.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/include/uapi/drm/panfrost_drm.

[PATCH 1/2] drm/panfrost: Remove type name from internal structs

2022-09-20 Thread Adrián Larumbe
From: Steven Price The two structs internal to struct panfrost_dump_object_header were named, but sadly that is incompatible with C++, causing an error: "an anonymous union may only have public non-static data members". However nothing refers to struct pan_reg_hdr and struct pan_bomap_hdr and th

[PATCH v2 3/3] drm/meson: remove drm bridges at aggregate driver unbind time

2022-09-20 Thread Adrián Larumbe
007] == Fix by keeping track of which encoders were initialised in the meson_drm structure and manually removing their bridges at aggregate driver's unbind time. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/meson/mes

Re: [PATCH v4 2/2] drm/panfrost: Add support for devcoredump

2022-07-18 Thread Adrián Larumbe
Hi Steven, once again thanks for the feedback. I was off for some time and then busy with other stuff, but I can finally work on a new revision for the patch On 23.06.2022 13:23, Steven Price wrote: > On 22/06/2022 15:36, Adrián Larumbe wrote: > > In the event of a job timeout, d

[PATCH v5 0/2] devcoredump support for Panfrost GPU driver

2022-07-18 Thread Adrián Larumbe
patch: - Added MMU and JS base and stride macros for range checks within panfrost_core_dump_registers - Fixed dereference-before-assignment BO pointer bug - Chose the right-sized endianness conversion function for header's valid bit Adrián Larumbe (2): drm/panfrost: Add specific reg

[PATCH v5 2/2] drm/panfrost: Add support for devcoredump

2022-07-18 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH v5 1/2] drm/panfrost: Add specific register offset macros for JS and MMU AS

2022-07-18 Thread Adrián Larumbe
Each Panfrost job has its own job slot and MMU address space set of registers, which are selected with a job-specific index. Turn the shift and stride used for selection of the right register set base into a define rather than using magic numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu

[PATCH v6 2/2] drm/panfrost: Add support for devcoredump

2022-07-29 Thread Adrián Larumbe
In the event of a job timeout, debug dump information will be written into /sys/class/devcoredump. Inspired by etnaviv's similar feature. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/Makefile| 3 +- drivers/gp

[PATCH v6 0/2] devcoredump support for Panfrost GPU driver

2022-07-29 Thread Adrián Larumbe
: - Expressed MMU_AS_STRIDE as a bitshift to avoid yet another magic number and removed misleading comment on the same line. Adrián Larumbe (2): drm/panfrost: Add specific register offset macros for JS and MMU AS drm/panfrost: Add support for devcoredump drivers/gpu/drm/panfrost/Kconfig

[PATCH v6 1/2] drm/panfrost: Add specific register offset macros for JS and MMU AS

2022-07-29 Thread Adrián Larumbe
Each Panfrost job has its own job slot and MMU address space set of registers, which are selected with a job-specific index. Turn the shift and stride used for selection of the right register set base into a define rather than using magic numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu

[PATCH v3 0/3] Add additional YUV420 bus format check for dw-meson's bridge enable

2023-06-25 Thread Adrián Larumbe
ree commits to accurately reflect the modified files' subsystem. - Add v1's Acked-by tags from subsystem maintainer v2: - Add commit message to patch number 3 in the series Adrián Larumbe (3): drm/bridge: dw-hdmi: change YUV420 selection logic at clock setup drm

[PATCH v3 2/3] drm/bridge: dw-hdmi: truly enforce 420-only formats when drm mode demands it

2023-06-25 Thread Adrián Larumbe
The current output bus format selection logic is enforcing YUV420 even when the drm mode allows for other bus formats as well. Fix it by adding check for 420-only drm modes. Signed-off-by: Adrián Larumbe Acked-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 --- 1 file

[PATCH v3 3/3] drm/bridge: dw-hdmi: remove dead code and fix indentation

2023-06-25 Thread Adrián Larumbe
The hdmi_datamap enum is no longer in use. Also reindent enable_audio's call params. Signed-off-by: Adrián Larumbe Acked-by: Neil Armstrong --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gp

[PATCH v3 1/3] drm/bridge: dw-hdmi: change YUV420 selection logic at clock setup

2023-06-25 Thread Adrián Larumbe
will configure a colour space based on the bus format that doesn't match the pixel value we had calculated as described above. Fix it by bringing back dw-hdmi bus format check when picking the right pixel clock. Signed-off-by: Adrián Larumbe Acked-by: Neil Armstrong --- drivers/gpu/drm/b

[PATCH 0/3] Add additional YUV420 bus format check for dw-meson's bridge enable

2023-05-28 Thread Adrián Larumbe
I fixed it by bringing back dw-hdmi bus format check in dw-meson. The second patch makes sure YUV420 bus format is the only one being returned by dw-hdmi's output format bridge function when that's the only drm mode allowed. Adrián Larumbe (3): drm/meson: dw-hdmi: change YUV420 selec

[PATCH 1/3] drm/meson: dw-hdmi: change YUV420 selection logic at clock setup

2023-05-28 Thread Adrián Larumbe
will configure a colour space based on the bus format that doesn't match the pixel value we had calculated as described above. Fix it by bringing back dw-hdmi bus format check when picking the right pixel clock. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.

[PATCH 3/3] dw-hdmi: remove dead code and fix indentation

2023-05-28 Thread Adrián Larumbe
Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 1afb8f2603a0..0accfb51509c 100644

[PATCH 2/3] dw-hdmi: truly enforce 420-only formats when drm mode demands it

2023-05-28 Thread Adrián Larumbe
The current output bus format selection logic is enforcing YUV420 even when the drm mode allows for other bus formats as well. Fix it by adding check for 420-only drm modes. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 --- 1 file changed, 4 insertions

[PATCH] drm: bridge: dw_hdmi: fix connector access for scdc

2023-06-01 Thread Adrián Larumbe
ing the bridge enablement stage. Signed-off-by: Adrián Larumbe Fixes: 5d844091f237 ("drm/scdc-helper: Pimp SCDC debugs") --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b

[PATCH v2 3/3] dw-hdmi: remove dead code and fix indentation

2023-06-12 Thread Adrián Larumbe
The hdmi_datamap enum is no longer in use. Also reindent enable_audio's call params. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-h

[PATCH v2 2/3] dw-hdmi: truly enforce 420-only formats when drm mode demands it

2023-06-12 Thread Adrián Larumbe
The current output bus format selection logic is enforcing YUV420 even when the drm mode allows for other bus formats as well. Fix it by adding check for 420-only drm modes. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 --- 1 file changed, 4 insertions

[PATCH v2 0/3] Add additional YUV420 bus format check for dw-meson's bridge enable

2023-06-12 Thread Adrián Larumbe
This is v2 of: https://lore.kernel.org/dri-devel/20230528140001.1057084-1-adrian.laru...@collabora.com/ The only difference is having added an actual commit message to patch number 3 in the series. Adrián Larumbe (3): drm/meson: dw-hdmi: change YUV420 selection logic at clock setup dw-hdmi

[PATCH v2 1/3] drm/meson: dw-hdmi: change YUV420 selection logic at clock setup

2023-06-12 Thread Adrián Larumbe
will configure a colour space based on the bus format that doesn't match the pixel value we had calculated as described above. Fix it by bringing back dw-hdmi bus format check when picking the right pixel clock. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.

[PATCH 0/2] Add fdinfo support to Panfrost

2023-08-08 Thread Adrián Larumbe
privileged user or accessed with IGT's gputop utility. Adrián Larumbe (2): drm/panfrost: Add fdinfo support to Panfrost drm/panfrost: Add drm memory stats display through fdinfo drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++ drivers/gpu/drm/panfrost/panfrost_device.h

[PATCH 2/2] drm/panfrost: Add drm memory stats display through fdinfo

2023-08-08 Thread Adrián Larumbe
For drm_show_memory_stats to produce a more accurate report, provide a new Panfrost DRM object callback that decides whether an object is resident in memory or eligible for purging. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_drv.c | 8 ++-- drivers/gpu/drm/panfrost

[PATCH 1/2] drm/panfrost: Add fdinfo support to Panfrost

2023-08-08 Thread Adrián Larumbe
We calculate the amount of time the GPU spends on a job with ktime samples, and then add it to the cumulative total for the open DRM file, which is what will be eventually exposed through the 'fdinfo' DRM file descriptor. Signed-off-by: Adrián Larumbe --- drivers/gpu/dr

Re: [PATCH 1/2] drm/panfrost: Add fdinfo support to Panfrost

2023-08-23 Thread Adrián Larumbe
'fdinfo' DRM file descriptor. >> >> Signed-off-by: Adrián Larumbe >> --- >> drivers/gpu/drm/panfrost/panfrost_device.c | 12 >> drivers/gpu/drm/panfrost/panfrost_device.h | 10 +++ >> drivers/gpu/drm/panfrost/panfrost_drv.c| 32 ++

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

2023-08-23 Thread Adrián Larumbe
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 --- drivers/gpu/drm/panfrost/panfrost_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm

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

2023-08-23 Thread Adrián Larumbe
calculations. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 drivers/gpu/drm/panfrost/panfrost_devfreq.h | 3 ++ drivers/gpu/drm/panfrost/panfrost_device.h | 13 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 45 - drivers/gpu

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

2023-08-23 Thread Adrián Larumbe
ly be backed by system memory after successive GPU page faults. Provide a new DRM object generic function that would allow drivers to return a more accurate RSS size for their BOs. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/drm_file.c | 5 - include/drm/drm_gem.h | 9 + 2 fi

[PATCH v2 0/6] Add fdinfo support to Panfrost

2023-08-23 Thread Adrián Larumbe
f RSS size for BO's. - Implemente selection of drm-memory region size units - Removed locking of shrinker's mutex in GEM obj status function Adrián Larumbe (6): drm/panfrost: Add cycle count GPU register definitions drm/panfrost: Add fdinfo support GPU load metrics drm/panfr

[PATCH v2 6/6] drm/drm-file: Allow size unit selection in drm_show_memory_stats

2023-08-23 Thread Adrián Larumbe
multiplier of a 10-power of 2, so 1 would give us size in Kib and 2 in Mib. If we want drm-file functions to pick the highest unit, then 0 should be passed. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/drm_file.c | 22 +- drivers/gpu/drm/msm/msm_drv.c | 2

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

2023-08-23 Thread Adrián Larumbe
e's object handle database spinlock, so there's potential for a race condition here. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_drv.c | 9 +++-- drivers/gpu/drm/panfrost/panfrost_gem.c | 12 drivers/gpu/drm/panfrost/panfrost_gem.h | 1 +

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

2023-08-23 Thread Adrián Larumbe
ng storage for it might have already been allocated by the exporting driver. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_gem.c | 22 ++ drivers/gpu/drm/panfrost/panfrost_gem.h | 5 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 16 +++- 3 fil

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

2024-08-29 Thread Adrián Larumbe
On 29.08.2024 15:57, Liviu Dudau wrote: > Hi Adrián, > > On Sat, Aug 17, 2024 at 11:10:17AM +0200, Boris Brezillon wrote: > > On Fri, 16 Aug 2024 19:52:49 +0100 > > Adrián Larumbe wrote: > > > > > In the off-chance that waiting for the firmware to signal its

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

2024-09-02 Thread Adrián Larumbe
("drm/panthor: Add the MMU/VM logical block") Cc: sta...@vger.kernel.org Signed-off-by: Adrián Larumbe Acked-by: Liviu Dudau --- drivers/gpu/drm/panthor/panthor_fw.c | 8 +++- drivers/gpu/drm/panthor/panthor_mmu.c | 21 ++--- drivers/gpu/drm/panthor/panthor_mmu.h | 1

[PATCH v5 0/4] Support fdinfo runtime and memory stats on Panthor

2024-09-03 Thread Adrián Larumbe
t definition. - Precompute size of group's syncobj BO to avoid code duplication. - Some minor nits. Adrián Larumbe (4): drm/panthor: introduce job cycle and timestamp accounting drm/panthor: add DRM fdinfo support drm/panthor: enable fdinfo for memory stats drm/panthor: add sysfs knob fo

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

2024-09-03 Thread Adrián Larumbe
or a given set of enablement mask, and these are passed as the number of credits when initialising a DRM scheduler job. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_device.h | 22 ++ drivers/gpu/drm/panthor/panthor_sched.c | 327 --- 2 files ch

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

2024-09-03 Thread Adrián Larumbe
commit, and supporting manual toggle of it will be the matter of a later commit. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_devfreq.c | 18 - drivers/gpu/drm/panthor/panthor_device.h | 14 +++ drivers/gpu/drm/panthor/panthor_drv.c | 35

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

2024-09-03 Thread Adrián Larumbe
Implement drm object's status callback. Also, we consider a PRIME imported BO to be resident if its matching dma_buf has an open attachment, which means its backing storage had already been allocated. Signed-off-by: Adrián Larumbe Reviewed-by: Liviu Dudau --- drivers/gpu/drm/pa

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

2024-09-03 Thread Adrián Larumbe
mate input values and output format in a documentation file. Signed-off-by: Adrián Larumbe --- Documentation/gpu/panthor.rst | 46 +++ drivers/gpu/drm/panthor/panthor_drv.c | 39 +++ 2 files changed, 85 insertions(+) create mode 100644 Documen

Re: [PATCH v2 6/6] drm/drm-file: Allow size unit selection in drm_show_memory_stats

2023-08-30 Thread Adrián Larumbe
ts is to be interpreted as the >> integer multiplier of a 10-power of 2, so 1 would give us size in Kib and 2 >> in Mib. If we want drm-file functions to pick the highest unit, then 0 >> should be passed. >> >> Signed-off-by: Adrián Larumbe >> --- >> drivers

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

2023-08-31 Thread Adrián Larumbe
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. >> >> This deviates from standard practice in

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

2023-08-31 Thread Adrián Larumbe
On 30.08.2023 12:31, Boris Brezillon wrote: >On Thu, 24 Aug 2023 02:34:46 +0100 >Adrián Larumbe wrote: > >> A new DRM GEM object function is added so that drm_show_memory_stats can >> provider more accurate memory usage numbers. > > s/provider/provide/ > >>

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

2023-08-31 Thread Adrián Larumbe
On 30.08.2023 12:17, Boris Brezillon wrote: >On Thu, 24 Aug 2023 02:34:45 +0100 >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. > >Pretty sure this has

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

2023-08-31 Thread Adrián Larumbe
On 30.08.2023 12:52, Boris Brezillon wrote: >On Thu, 24 Aug 2023 02:34:48 +0100 >Adrián Larumbe wrote: > >> BO's RSS is updated every time new pages are allocated and mapped for the >> object, either in its entirety at creation time for non-heap buffers, or >> el

[PATCH v3 1/8] drm/panfrost: Add cycle count GPU register definitions

2023-09-05 Thread Adrián Larumbe
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: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_regs.h | 5 + 1 file

[PATCH v3 0/8] Add fdinfo support to Panfrost

2023-09-05 Thread Adrián Larumbe
previous multiplier for more accurate BO size numbers - Removed special handling of Prime imported BO RSS - Use rss_size only for heap objects - Use bo->base.madv instead of specific purgeable flag - Fixed kernel test robot warnings Adrián Larumbe (8): drm/panfrost: Add cycle count GPU

[PATCH v3 4/8] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-05 Thread Adrián Larumbe
job IRQ and the actual time of the sample. - Time spent in the engine queue waiting for the GPU to pick up the next job. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 +++ drivers/gpu/drm/panfrost/panfrost_devfreq.h | 3 ++ drivers/gpu/drm/panfrost

[PATCH v3 2/8] drm/panfrost: Enable cycle counter register upon job submission

2023-09-05 Thread Adrián Larumbe
. Toggling of GPU cycle counting has to be done through a module parameter. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_device.c | 5 +++ drivers/gpu/drm/panfrost/panfrost_device.h | 6 +++ drivers/gpu/drm/panfrost/panfrost_gpu.c| 43 ++ drivers

[PATCH v3 5/8] drm/panfrost: Add fdinfo support for memory stats

2023-09-05 Thread Adrián Larumbe
e's object handle database spinlock, so there's potential for a race condition here. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_drv.c | 1 + drivers/gpu/drm/panfrost/panfrost_gem.c | 14 ++ 2 files changed, 15 insertions(+) diff --git a/driv

[PATCH v3 3/8] drm/panfrost: Enable debugfs toggling of cycle counter register

2023-09-05 Thread Adrián Larumbe
Allow user space to decide whether the cycle counting register should be enabled. The main goal is letting tools like nvtop or IGT's gputop access this information in debug builds to obtain engine utilisation numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Mak

[PATCH v3 7/8] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-05 Thread Adrián Larumbe
their entirety at BO creation time. This calculation is unnecessary for imported PRIME objects, since heap buffers cannot be exported by our driver, and the actual BO RSS size is the one reported in its attached dmabuf structure. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panf

[PATCH v3 6/8] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-05 Thread Adrián Larumbe
ly be backed by system memory after successive GPU page faults. Provide a new DRM object generic function that would allow drivers to return a more accurate RSS size for their BOs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon --- drivers/gpu/drm/drm_file.c | 5 - include/drm/drm

[PATCH v3 8/8] drm/drm-file: Show finer-grained BO sizes in drm_show_memory_stats

2023-09-05 Thread Adrián Larumbe
The current implementation will try to pick the highest available size display unit as soon as the BO size exceeds that of the previous multiplier. By selecting a higher threshold, we could show more accurate size numbers. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/drm_file.c | 2 +- 1

Re: [PATCH v3 2/8] drm/panfrost: Enable cycle counter register upon job submission

2023-09-09 Thread Adrián Larumbe
On 06.09.2023 09:57, Boris Brezillon wrote: >On Tue, 5 Sep 2023 19:45:18 +0100 >Adrián Larumbe wrote: > >> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c >> b/drivers/gpu/drm/panfrost/panfrost_job.c >> index 033f5e684707..8b1bf6ac48f8 100644 >&g

Re: [PATCH v3 2/8] drm/panfrost: Enable cycle counter register upon job submission

2023-09-09 Thread Adrián Larumbe
On 06.09.2023 09:21, Boris Brezillon wrote: >On Tue, 5 Sep 2023 19:45:18 +0100 >Adrián Larumbe wrote: > >> In a future development, we will want to keep track of the number of GPU >> cycles spent on a given job. That means we should enable it only when the >> GPU ha

Re: [PATCH v3 7/8] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-09 Thread Adrián Larumbe
On 06.09.2023 10:01, Boris Brezillon wrote: >On Tue, 5 Sep 2023 19:45:23 +0100 >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. &g

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

2023-09-09 Thread Adrián Larumbe
On 06.09.2023 10:11, Boris Brezillon wrote: >On Tue, 5 Sep 2023 19:45:24 +0100 >Adrián Larumbe wrote: > >> The current implementation will try to pick the highest available size >> display unit as soon as the BO size exceeds that of the previous >> multiplier. &

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

2023-09-12 Thread Adrián Larumbe
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: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_regs.h | 5 + 1 file

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

2023-09-12 Thread Adrián Larumbe
their entirety at BO creation time. This calculation is unnecessary for imported PRIME objects, since heap buffers cannot be exported by our driver, and the actual BO RSS size is the one reported in its attached dmabuf structure. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panf

[PATCH v4 0/6] Add fdinfo support to Panfrost

2023-09-12 Thread Adrián Larumbe
sful mapping. - drm-file picks an fdinfo memory object size unit that doesn't lose precision. Adrián Larumbe (6): drm/panfrost: Add cycle count GPU register definitions drm/panfrost: Add fdinfo support GPU load metrics drm/panfrost: Add fdinfo support for memory stats drm/drm_file: A

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

2023-09-12 Thread Adrián Larumbe
power waste in case no engine usage measuring is necessary. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/Makefile | 2 + drivers/gpu/drm/panfrost/panfrost_debugfs.c | 20 drivers/gpu/drm/panfrost/panfrost_debugfs.h | 13 + drivers/gpu/drm/pan

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

2023-09-12 Thread Adrián Larumbe
ly be backed by system memory after successive GPU page faults. Provide a new DRM object generic function that would allow drivers to return a more accurate RSS size for their BOs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon --- drivers/gpu/drm/drm_file.c | 5 - include/drm/drm

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

2023-09-12 Thread Adrián Larumbe
igger BO's, their size will naturally be aligned on something bigger than a 4 KiB page, so in practice it is very unlikely their display unit would default to KiB. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/drm_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

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

2023-09-12 Thread Adrián Larumbe
e's object handle database spinlock, so there's potential for a race condition here. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++ drivers/gpu/drm/panfrost/panfrost_gem.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/driv

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

2024-03-05 Thread Adrián Larumbe
set of counters than the current one implies a counter reset, which also messes up with the ring buffer's extraction and insertion pointers. This is an unfortunate hardware limitation. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/Makefile | 3 +- drivers/gpu/drm/p

[PATCH 2/2] drm/panthor: Enable fdinfo for memory stats

2024-03-05 Thread Adrián Larumbe
When vm-binding an already-created BO, the entirety of its virtual size is then backed by system memory, so its RSS is always the same as its virtual size. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_drv.c | 1 + drivers/gpu/drm/panthor/panthor_gem.c | 12 2

[PATCH 1/2] drm/panthor: Enable fdinfo for cycle and time measurements

2024-03-05 Thread Adrián Larumbe
queue slot number and the queue's index within the group. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_devfreq.c | 10 + drivers/gpu/drm/panthor/panthor_device.h | 11 ++ drivers/gpu/drm/panthor/panthor_drv.c | 31 drivers/gpu/drm/panthor/panthor_

[PATCH 0/2] Support fdinfo runtime and memory stats on Panthor

2024-03-05 Thread Adrián Larumbe
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. Adrián Larumbe (2): drm/panthor: Enable fdinfo for cycle and time measurements drm/panthor: Enable fdinfo for memory

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

2024-03-05 Thread Adrián Larumbe
s 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 --- .../testing/sysfs-driver-panfrost-profiling | 10 + Documentation/gpu/panfrost.rst| 9 drivers/gpu/drm/panfros

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

2024-03-05 Thread Adrián Larumbe
.laru...@collabora.com/ Adrián Larumbe (1): drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs .../testing/sysfs-driver-panfrost-profiling | 10 + Documentation/gpu/panfrost.rst| 9 drivers/gpu/drm/panfrost/Makefile | 2 - drive

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

2024-03-11 Thread Adrián Larumbe
On 11.03.2024 11:02, Boris Brezillon wrote: > On Wed, 6 Mar 2024 08:33:47 + > Tvrtko Ursulin wrote: > > > On 06/03/2024 01:56, Adrián Larumbe wrote: > > > Debugfs isn't always available in production builds that try to squeeze > > > every single byte

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

2024-03-16 Thread Adrián Larumbe
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 Larumbe --- drivers/gpu/drm/panfrost/panfrost_drv.c

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

2023-10-21 Thread Adrián Larumbe
On 20.10.2023 11:44, Steven Price wrote: > sg_page_iter_page() doesn't return an error code, so the IS_ERR() check > is wrong and the error path will never be executed. This also allows > simplifying the code to remove the local variable 'page'. > > CC: Adri

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

2024-07-15 Thread Adrián Larumbe
Hi Steven, thanks for the review. 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 fdinfo file and figure out rates of engine > &

[PATCH v4 0/4] Support fdinfo runtime and memory stats on Panthor

2024-07-16 Thread Adrián Larumbe
cycle and timestamp calculations and job accounting memory management, and a second one that enables fdinfo. - Moved NUM_INSTRS_PER_SLOT to the file prelude - Removed nelem variable from the group's struct definition. - Precompute size of group's syncobj BO to avoid code duplication. - Some

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

2024-07-16 Thread Adrián Larumbe
when initialising the DRM scheduler for each queue, with a profiled job contributing twice as many credits. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_device.h | 2 + drivers/gpu/drm/panthor/panthor_sched.c | 244 --- 2 files changed, 216 insertions(+), 30 d

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

2024-07-16 Thread Adrián Larumbe
This commit introduces a DRM device sysfs attribute that lets UM control the job accounting status in the device. The knob variable had been brought in as part of a previous commit, but now we're able to fix it manually. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_

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

2024-07-16 Thread Adrián Larumbe
commit, and supporting manual toggle of it will be the matter of a later commit. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/panthor/panthor_devfreq.c | 18 - drivers/gpu/drm/panthor/panthor_device.h | 10 + drivers/gpu/drm/panthor/panthor_drv.c | 33 drivers

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

2024-07-16 Thread Adrián Larumbe
Implement drm object's status callback. Also, we consider a PRIME imported BO to be resident if its matching dma_buf has an open attachment, which means its backing storage had already been allocated. Signed-off-by: Adrián Larumbe Reviewed-by: Liviu Dudau --- drivers/gpu/drm/pa

  1   2   3   4   5   >