[RFC PATCH 2/2] drm/panthor: register size of internal objects through fdinfo

2024-10-02 Thread Adrián Larumbe
cated only once at driver's initialisation time. Signed-off-by: Adrián Larumbe Cc: Rob Clark Cc: Tvrtko Ursulin Cc: Lucas De Marchi --- drivers/gpu/drm/panthor/panthor_device.c | 2 + drivers/gpu/drm/panthor/panthor_device.h | 6 +++ drivers/gpu/drm/panthor/panthor_drv.c| 16

[RFC PATCH 1/2] drm/drm_file: Add display of driver's internal memory size

2024-10-02 Thread Adrián Larumbe
ow_memory_stats. Drivers which have no interest in exposing the size of internal memory objects can keep passing NULL for unaltered behaviour. Signed-off-by: Adrián Larumbe Cc: Rob Clark Cc: Tvrtko Ursulin Cc: Lucas De Marchi --- drivers/gpu/drm/drm_file.c | 6 +- drivers/gpu/d

[RFC PATCH 0/2] Allow fdinfo to display size of internal BO's

2024-10-02 Thread Adrián Larumbe
/dri-devel/dqhnxhgho6spfh7xhw6yvs2iiqeqzeg63e6jqqpw2g7gkrfphn@dojsixyl4esv/ Adrián Larumbe (2): drm/drm_file: Add display of driver's internal memory size drm/panthor: register size of internal objects through fdinfo drivers/gpu/drm/drm_file.c | 6 ++- drivers/gpu/dr

[Freedreno] [PATCH v8 5/5] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-29 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 Reviewed-by: Boris Brezillon Revi

[Freedreno] [PATCH v8 1/5] drm/panfrost: Add cycle count GPU register definitions

2023-09-29 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 Reviewed-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[Freedreno] [PATCH v8 3/5] drm/panfrost: Add fdinfo support for memory stats

2023-09-29 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 Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++ drivers/gpu/drm/panfrost

[Freedreno] [PATCH v8 2/5] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-29 Thread Adrián Larumbe
power waste in case no engine usage measuring is necessary. Also add a documentation file explaining the possible values for fdinfo's engine keystrings and Panfrost-specific drm-curfreq- pairs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price R

[Freedreno] [PATCH v8 4/5] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-29 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 and purgeable sizes for their BOs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: A

[Freedreno] [PATCH v8 0/5] Add fdinfo support to Panfrost

2023-09-29 Thread Adrián Larumbe
ts unit size selection patch. v8: - Style improvements and addressing nitpicks. Adrián Larumbe (5): 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: Add DRM obj&#x

[Freedreno] [PATCH v7 1/5] drm/panfrost: Add cycle count GPU register definitions

2023-09-27 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

[Freedreno] [PATCH v7 4/5] drm/drm_file: Add DRM obj's RSS reporting function for fdinfo

2023-09-27 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 and purgeable sizes for their BOs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu

[Freedreno] [PATCH v7 5/5] drm/panfrost: Implement generic DRM object RSS reporting function

2023-09-27 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 Reviewed-by: Boris Brezillon Revi

[Freedreno] [PATCH v7 2/5] drm/panfrost: Add fdinfo support GPU load metrics

2023-09-27 Thread Adrián Larumbe
power waste in case no engine usage measuring is necessary. Add also documentation file explaining the possible values for fdinfo's engine keystrings and Panfrost-specific drm-curfreq- pairs. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- Documen

[Freedreno] [PATCH v7 0/5] Add fdinfo support to Panfrost

2023-09-27 Thread Adrián Larumbe
file with meaning of fdinfo strings. - BUILD_BUG_ON checking the engine name array size for fdinfo. - Added copyright notices for Amazon in Panfrost's new debugfs files. - Discarded fdinfo memory stats unit size selection patch. Adrián Larumbe (5): drm/panfrost: Add cycle count GPU registe

[Freedreno] [PATCH v7 3/5] drm/panfrost: Add fdinfo support for memory stats

2023-09-27 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 Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++ drivers/gpu/drm/panfrost/panfrost_gem.c | 14 ++

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

2023-09-22 Thread Adrián Larumbe
On 21.09.2023 11:14, Tvrtko Ursulin wrote: > >On 20/09/2023 16:32, Tvrtko Ursulin wrote: >> >> On 20/09/2023 00:34, Adrián Larumbe wrote: >> > The current implementation will try to pick the highest available size >> > display unit as soon as the

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

2023-09-22 Thread Adrián Larumbe
On 20.09.2023 16:32, Tvrtko Ursulin wrote: > >On 20/09/2023 00:34, 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. That can lead to loss of

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

2023-09-22 Thread Adrián Larumbe
On 20.09.2023 16:53, Tvrtko Ursulin wrote: > >On 20/09/2023 00:34, Adrián Larumbe wrote: >> Some BO's might be mapped onto physical memory chunkwise and on demand, >> like Panfrost's tiler heap. In this case, even though the >> drm_gem_shmem_object page array

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

2023-09-22 Thread Adrián Larumbe
On 20.09.2023 16:40, Tvrtko Ursulin wrote: >On 20/09/2023 00: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

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

2023-09-19 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 Reviewed-by: Steven Price --- drivers/gpu/drm

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

2023-09-19 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 Reviewed-by: Boris Brezillon Revi

[Freedreno] [PATCH v6 0/6] Add fdinfo support to Panfrost

2023-09-19 Thread Adrián Larumbe
the scheduler will make sure these values are read over in case of requeuing. - Moved putting of cycle counting refcnt into panfrost job dequeue function to avoid repetition. v6: - Fix wrong swapped-round engine time and cycle values in fdinfo drm print statements. Adrián Larumbe (6): drm

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

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

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

2023-09-19 Thread Adrián Larumbe
display unit selection threshold to render more accurate values. Signed-off-by: Adrián Larumbe Reviewed-by: Boris Brezillon 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

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

2023-09-19 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 Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++ drivers/gpu/drm/panfrost/panfrost_gem.c | 14 ++

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

2023-09-19 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

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

2023-09-14 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 Reviewed-by: Boris Brezillon ---

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

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

[Freedreno] [PATCH v5 0/6] Add fdinfo support to Panfrost

2023-09-14 Thread Adrián Larumbe
putting of cycle counting refcnt into panfrost job dequeue function to avoid repetition. 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: Ad

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

2023-09-14 Thread Adrián Larumbe
display unit selection threshold to render more accurate values. Signed-off-by: Adrián Larumbe --- 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

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

2023-09-14 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

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

2023-09-14 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

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

2023-09-14 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 Reviewed-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++ drivers/gpu/drm/panfrost/panfrost_gem.c | 14 ++ 2 files changed, 16 inserti

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

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

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

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

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

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

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

Re: [Freedreno] [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. &

Re: [Freedreno] [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: [Freedreno] [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: [Freedreno] [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

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

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

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

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

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

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

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

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

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

Re: [Freedreno] [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

Re: [Freedreno] [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: [Freedreno] [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: [Freedreno] [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: [Freedreno] [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

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

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

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

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

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

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

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