[PATCH v2 5/5] drm/v3d: Introduce Runtime Power Management

2025-07-31 Thread Maíra Canal
using the kernel's Runtime PM framework. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/Makefile | 3 +- drivers/gpu/drm/v3d/v3d_debugfs.c | 23 ++- drivers/gpu/drm/v3d/v3d_drv.c | 83 ++- drivers/gpu/drm/v3d/v3d_drv.h | 18 +++

[PATCH v2 4/5] drm/v3d: Allocate all resources before enabling the clock

2025-07-31 Thread Maíra Canal
Move all resource allocation operations before actually enabling the clock, as those operation don't require the GPU to be powered on. While here, use devm_reset_control_get_optional_exclusive() instead of open-code it. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.c

[PATCH v2 3/5] clk: bcm: rpi: Maximize V3D clock

2025-07-31 Thread Maíra Canal
rate when the clock is enabled and set this option for V3D. Signed-off-by: Maíra Canal --- drivers/clk/bcm/clk-raspberrypi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c index 70acfa68827d84670c64

[PATCH v2 2/5] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-31 Thread Maíra Canal
_CRITICAL, as those are required to be on during the whole system operation. Link: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface [1] Signed-off-by: Maíra Canal --- About the pixel clock: currently, if we actually disable the pixel clock during a hotplug, the system will

[PATCH v2 0/5] Power Management for Raspberry Pi V3D GPU

2025-07-31 Thread Maíra Canal
source are cleaned in the inverse order of allocation (Philipp Zabel) --- Maíra Canal (4): clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing clk: bcm: rpi: Maximize V3D clock drm/v3d: Allocate all resources before enabling the clock drm/v3d: Introduce Runtim

[PATCH v2 1/5] clk: bcm: rpi: Add missing logs if firmware fails

2025-07-31 Thread Maíra Canal
From: Stefan Wahren In contrary to raspberrypi_fw_set_rate(), the ops for is_prepared() and recalc_rate() silently ignore firmware errors by just returning 0. Since these operations should never fail, add at least error logs to inform the user. Signed-off-by: Stefan Wahren Signed-off-by: Maíra

Re: [PATCH 1/3] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-29 Thread Maíra Canal
On 29/07/25 13:19, Maíra Canal wrote: Hi Maxime, On 29/07/25 09:14, Maxime Ripard wrote: On Tue, Jul 29, 2025 at 08:53:51AM -0300, Maíra Canal wrote: Hi Maxime, On 29/07/25 04:27, Maxime Ripard wrote: Hi Maíra, On Mon, Jul 28, 2025 at 09:35:38AM -0300, Maíra Canal wrote: Currently, when we

Re: [PATCH 1/3] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-29 Thread Maíra Canal
Hi Maxime, On 29/07/25 09:14, Maxime Ripard wrote: On Tue, Jul 29, 2025 at 08:53:51AM -0300, Maíra Canal wrote: Hi Maxime, On 29/07/25 04:27, Maxime Ripard wrote: Hi Maíra, On Mon, Jul 28, 2025 at 09:35:38AM -0300, Maíra Canal wrote: Currently, when we prepare or unprepare RPi's clock

Re: [PATCH 1/3] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-29 Thread Maíra Canal
Hi Maxime, On 29/07/25 04:27, Maxime Ripard wrote: Hi Maíra, On Mon, Jul 28, 2025 at 09:35:38AM -0300, Maíra Canal wrote: Currently, when we prepare or unprepare RPi's clocks, we don't actually enable/disable the firmware clock. This means that `clk_disable_unprepare()` doesn&

Re: [PATCH 0/3] Power Management for Raspberry Pi V3D GPU

2025-07-28 Thread Maíra Canal
Hi Stefan, On 28/07/25 18:00, Stefan Wahren wrote: Hi, Am 28.07.25 um 14:35 schrieb Maíra Canal: This series introduces Runtime PM for Raspberry Pi's GPU, V3D. Currently, the GPU clock stays up during the whole operation, even if the GPU is idle. By introducing Runtime PM, we can now tur

Re: [PATCH 1/3] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-28 Thread Maíra Canal
Hi Stefan, On 28/07/25 13:33, Stefan Wahren wrote: Hi Maíra, thanks for working on this. Am 28.07.25 um 14:35 schrieb Maíra Canal: Currently, when we prepare or unprepare RPi's clocks, we don't actually enable/disable the firmware clock. This means that `clk_disable_unprepare(

[PATCH 3/3] drm/v3d: Introduce Runtime Power Management

2025-07-28 Thread Maíra Canal
using the kernel's Runtime PM framework. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/Makefile | 3 +- drivers/gpu/drm/v3d/v3d_debugfs.c | 23 ++- drivers/gpu/drm/v3d/v3d_drv.c | 85 ++- drivers/gpu/drm/v3d/v3d_drv.h | 18 +++

[PATCH 2/3] drm/v3d: Allocate all resources before enabling the clock

2025-07-28 Thread Maíra Canal
Move all resource allocation operations before actually enabling the clock, as those operation don't require the GPU to be powered on. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.c | 92 ++- drivers/gpu/drm/v3d/v3d_drv.h | 3 +- dr

[PATCH 1/3] clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing

2025-07-28 Thread Maíra Canal
th CLK_IGNORE_UNUSED or CLK_IS_CRITICAL, as those are required since early boot or are required during reboot. Link: https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface [1] Fixes: 93d2725affd6 ("clk: bcm: rpi: Discover the firmware clocks") Signed-off-by: Maíra Canal ---

[PATCH 0/3] Power Management for Raspberry Pi V3D GPU

2025-07-28 Thread Maíra Canal
1]. [1] https://github.com/mairacanal/linux-rpi/tree/v3d/downstream/power-management-v2 Best Regards, - Maíra --- Maíra Canal (3): clk: bcm: rpi: Turn firmware clock on/off when preparing/unpreparing drm/v3d: Allocate all resources before enabling the clock drm/v3d: Introduc

Re: [PATCH] drm/vc4: plane: Add support for P01[026] and S01[026] formats

2025-07-25 Thread Maíra Canal
Hi Dave, On 24/07/25 13:11, Dave Stevenson wrote: There are now formats defined for 2-plane YUV420 at 10, 12, and 16 bit depth using the most significant bits of the 16bit word (P010, P012, and P016), and 3-plane YUV420 at those depths using the least significant bits of the 16 bit word (S010, S

[PATCH v2] drm/msm: Update global fault counter when faulty process has already ended

2025-07-20 Thread Maíra Canal
l fault counter when the submitting process had already ended. This way, the number of faults returned by MSM_PARAM_FAULTS will stay consistent. While here, s/unusuable/unusable. Fixes: 12578c075f89 ("drm/msm/gpu: Skip retired submits in recover worker") Signed-off-by: Maíra Can

[PATCH 6/6] drm/v3d: Protect per-fd reset counter against fd release

2025-07-19 Thread Maíra Canal
that the per-fd reset counter is only updated when the file descriptor is still valid, preventing use-after-free scenarios during GPU reset handling. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_sched.c | 28 1 file changed, 16 insertions(+), 12 dele

[PATCH 5/6] drm/v3d: Synchronous operations can't timeout

2025-07-19 Thread Maíra Canal
CPU jobs and CACHE CLEAN jobs execute synchronously once the DRM scheduler starts running them. Therefore, there is no fence to wait on, neither are those jobs able to timeout. Hence, remove the `timedout_job` hook from the CPU and CACHE CLEAN scheduler ops. Signed-off-by: Maíra Canal

[PATCH 4/6] drm/v3d: Address race-condition between per-fd GPU stats and fd release

2025-07-19 Thread Maíra Canal
e1bc3a13bd77 ("drm/v3d: Avoid NULL pointer dereference in `v3d_job_update_stats()`") Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.c | 14 +- drivers/gpu/drm/v3d/v3d_drv.h | 2 +- drivers/gpu/drm/v3d/v3d_sched.c | 16 +++- 3 files changed,

[PATCH 3/6] drm/v3d: Replace a global spinlock with a per-queue spinlock

2025-07-19 Thread Maíra Canal
global spinlock with per-queue locks to improve parallelism and reduce contention between different V3D queues (BIN, RENDER, TFU, CSD). This allows independent queues to operate concurrently while maintaining proper synchronization within each queue. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d

[PATCH 2/6] drm/v3d: Store the active job inside the queue's state

2025-07-19 Thread Maíra Canal
Instead of storing the queue's active job in four different variables, store the active job inside the queue's state. This way, it's possible to access all active jobs using an index based in `enum v3d_queue`. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.h | 8

[PATCH 1/6] drm/v3d: Store a pointer to `struct v3d_file_priv` inside each job

2025-07-19 Thread Maíra Canal
Instead of storing a pointer to the DRM file data, store a pointer directly to the private V3D file struct. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.h| 4 ++-- drivers/gpu/drm/v3d/v3d_sched.c | 10 +- drivers/gpu/drm/v3d/v3d_submit.c | 2 +- 3 files changed, 8

[PATCH 0/6] drm/v3d: General job locking improvements + race-condition fixes

2025-07-19 Thread Maíra Canal
age across different queues. PATCH 3/6 allows queues to operate more independently. Finally, PATCH 6/6 addresses a similar race condition to PATCH 4/6, but this time, on the per-file descriptor reset counter. Best Regards, - Maíra --- Maíra Canal (6): drm/v3d: Store a pointer to `str

Re: [PATCH 0/2] drm/v3d: Expose global and per-context GPU reset counters

2025-07-17 Thread Maíra Canal
On Fri, 11 Jul 2025 12:18:30 -0300, Maíra Canal wrote: > The GL extension KHR_robustness requires a mechanism for a GL application > to learn about graphics resets that affect a GL context. With the goal > to provide support for such extension in Mesa, this series implements > gl

Re: [PATCH] drm/sched: Consolidate drm_sched_job_timedout

2025-07-16 Thread Maíra Canal
then some appeared after unlock, however if the code would rely on the TDR handler restarting itself then it would fail to do that if the job arrived on the pending list after the check. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal Best Regards, - Maíra Cc: Christian König Cc

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin wrote: On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again

Re: [PATCH] drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 11:13, Tvrtko Ursulin wrote: On 16/07/2025 15:05, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:41, Tvrtko Ursulin wrote: On 16/07/2025 13:47, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:48, Tvrtko Ursulin wrote: The "skip reset" test waits for the timeo

Re: [PATCH] drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 10:41, Tvrtko Ursulin wrote: On 16/07/2025 13:47, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:48, Tvrtko Ursulin wrote: The "skip reset" test waits for the timeout handler to run for the duration of 2 * MOCK_TIMEOUT, and because the mock scheduler opted to

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
ian König Cc: Danilo Krummrich Cc: Maíra Canal Cc: Matthew Brost Cc: Philipp Stanner --- v2: * Improve commit text and kerneldoc. (Philipp) * Rename run free work helper. (Philipp) v3: * Rebase on top of Maira's changes. --- drivers/gpu/drm/scheduler/sched_mai

Re: [PATCH] drm/sched: Fix a race in DRM_GPU_SCHED_STAT_NO_HANG test

2025-07-16 Thread Maíra Canal
e test will fail. Fix it by making the "don't reset" flag persist for the lifetime of the job and add a new flag to verify that the code path had executed as expected. Signed-off-by: Tvrtko Ursulin Fixes: 1472e7549f84 ("drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_H

Re: [PATCH v6 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG

2025-07-15 Thread Maíra Canal
On Mon, 14 Jul 2025 19:07:01 -0300, Maíra Canal wrote: > TL;DR: No changes from v5, I just rebased it on top of drm-misc-next. I > plan to push the series to the drm-misc tree tomorrow. > > Thanks for all the reviews! > Applied, thanks! [1/8] drm/sched: Rename DRM_GPU_SCHED_

[PATCH] drm/msm: Remove unused global fault counter

2025-07-14 Thread Maíra Canal
ce, which eliminates the need for a global fault counter. Hence, remove the global faults counter. While here, s/unusuable/unusable. Signed-off-by: Maíra Canal --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 + drivers/gpu/drm/msm/msm_gpu.c | 23 +++ drivers/g

[PATCH v6 8/8] drm/panfrost: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-14 Thread Maíra Canal
ly timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfros

[PATCH v6 7/8] drm/xe: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-14 Thread Maíra Canal
code DRM_GPU_SCHED_STAT_NO_HANG. Note that, in the first case, there is no need to restart submission if it hasn't been stopped. Signed-off-by: Maíra Canal Reviewed-by: Matthew Brost --- drivers/gpu/drm/xe/xe_guc_submit.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/d

[PATCH v6 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-14 Thread Maíra Canal
m the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)

[PATCH v6 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-14 Thread Maíra Canal
nform the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/v3d/v3d_sched.c | 16 ++-- 1 file changed, 2 insertions(+), 14 dele

[PATCH v6 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG

2025-07-14 Thread Maíra Canal
Add a test to submit a single job against a scheduler with the timeout configured and verify that if the job is still running, the timeout handler will skip the reset and allow the job to complete. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin Reviewed-by: Philipp Stanner --- drivers

[PATCH v6 3/8] drm/sched: Make timeout KUnit tests faster

2025-07-14 Thread Maíra Canal
42:26] Elapsed time: 15.637s total, 0.002s configuring, 10.387s building, 5.229s running After this commit: [15:45:26] Elapsed time: 9.263s total, 0.002s configuring, 5.168s building, 4.037s running Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin Acked-by: Philipp Stanner --- drivers/gp

[PATCH v6 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-14 Thread Maíra Canal
status will indicate that the job must be reinserted into `sched->pending_list`, and the hardware / driver will still complete that job. Signed-off-by: Maíra Canal Reviewed-by: Philipp Stanner --- drivers/gpu/drm/scheduler/sched_main.c | 46 -- include/drm/gpu_sche

[PATCH v6 1/8] drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET

2025-07-14 Thread Maíra Canal
is now in a nominal state again. Signed-off-by: Maíra Canal Reviewed-by: Philipp Stanner --- To: Min Ma To: Lizhi Hou To: Oded Gabbay To: Frank Binns To: Matt Coster To: Qiang Yu To: Lyude Paul To: Alex Deucher To: Christian König --- drivers/accel/amdxdna/aie2_ctx.c | 2

[PATCH v6 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG

2025-07-14 Thread Maíra Canal
pp's R-b (Philipp Stanner) - [7/8] Add Matthew's R-b (Matthew Brost) - Link to v5: https://lore.kernel.org/r/20250708-sched-skip-reset-v5-0-2612b601f...@igalia.com --- Maíra Canal (8): drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET drm/sched: Allow drive

Re: [PATCH v5 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-13 Thread Maíra Canal
Hi Christian, On 11/07/25 12:20, Christian König wrote: On 11.07.25 15:37, Philipp Stanner wrote: On Fri, 2025-07-11 at 15:22 +0200, Christian König wrote: On 08.07.25 15:25, Maíra Canal wrote: When the DRM scheduler times out, it's possible that the GPU isn't hung; instead,

Re: [PATCH v2] drm/sched: Avoid double re-lock on the job free path

2025-07-12 Thread Maíra Canal
Hi Danilo, On 7/11/25 16:22, Danilo Krummrich wrote: On 7/11/25 9:08 PM, Maíra Canal wrote: Hi Tvrtko, On 11/07/25 12:09, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again

Re: [PATCH v2] drm/sched: Avoid double re-lock on the job free path

2025-07-11 Thread Maíra Canal
Hi Tvrtko, On 11/07/25 12:09, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again to decide whether to re-queue itself if there are more finished jobs. Since drm_sched_get_finished_

[PATCH 2/2] drm/v3d: Add parameter to retrieve the number of GPU resets per-fd

2025-07-11 Thread Maíra Canal
information, user-space must use DRM_V3D_PARAM_CONTEXT_RESET_COUNTER. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.c | 6 ++ drivers/gpu/drm/v3d/v3d_drv.h | 6 ++ drivers/gpu/drm/v3d/v3d_sched.c | 3 +++ include/uapi/drm/v3d_drm.h | 1 + 4 files changed, 16 insertions

[PATCH 1/2] drm/v3d: Add parameter to retrieve the global number of GPU resets

2025-07-11 Thread Maíra Canal
information, user-space must use DRM_V3D_PARAM_GLOBAL_RESET_COUNTER. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.c | 5 + drivers/gpu/drm/v3d/v3d_drv.h | 5 + drivers/gpu/drm/v3d/v3d_sched.c | 2 ++ include/uapi/drm/v3d_drm.h | 1 + 4 files changed, 13 insertions

[PATCH 0/2] drm/v3d: Expose global and per-context GPU reset counters

2025-07-11 Thread Maíra Canal
DRM_IOCTL_V3D_GET_PARAM ioctl. The corresponding user-space implementation for this series is available at [1]. [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35965 Best Regards, - Maíra --- Maíra Canal (2): drm/v3d: Add parameter to retrieve the global number of GPU resets

Re: [PATCH v5 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-11 Thread Maíra Canal
Hi Christian, On 11/07/25 10:22, Christian König wrote: On 08.07.25 15:25, Maíra Canal wrote: When the DRM scheduler times out, it's possible that the GPU isn't hung; instead, a job just took unusually long (longer than the timeout) but is still running, and there is, thus, no

Re: [PATCH v5 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG

2025-07-10 Thread Maíra Canal
+cc Maxime, Thomas Hi Philipp, On 09/07/25 10:14, Philipp Stanner wrote: On Tue, 2025-07-08 at 10:25 -0300, Maíra Canal wrote: TL;DR: The only two patches that are lacking R-b's are: [PATCH 2/8] drm/sched: Allow drivers to skip the reset and keep on running [PATCH 7/8] drm/xe

[PATCH v5 8/8] drm/panfrost: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-08 Thread Maíra Canal
ly timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfros

[PATCH v5 7/8] drm/xe: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-08 Thread Maíra Canal
code DRM_GPU_SCHED_STAT_NO_HANG. Note that, in the first case, there is no need to restart submission if it hasn't been stopped. Signed-off-by: Maíra Canal --- drivers/gpu/drm/xe/xe_guc_submit.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_s

[PATCH v5 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-08 Thread Maíra Canal
m the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 14 -- 1 file changed, 4 insertions(+), 10 dele

[PATCH v5 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-08 Thread Maíra Canal
nform the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/v3d/v3d_sched.c | 16 ++-- 1 file changed, 2 insertions(+), 14 dele

[PATCH v5 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG

2025-07-08 Thread Maíra Canal
Add a test to submit a single job against a scheduler with the timeout configured and verify that if the job is still running, the timeout handler will skip the reset and allow the job to complete. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin Reviewed-by: Philipp Stanner --- drivers

[PATCH v5 3/8] drm/sched: Make timeout KUnit tests faster

2025-07-08 Thread Maíra Canal
42:26] Elapsed time: 15.637s total, 0.002s configuring, 10.387s building, 5.229s running After this commit: [15:45:26] Elapsed time: 9.263s total, 0.002s configuring, 5.168s building, 4.037s running Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin Acked-by: Philipp Stanner --- drivers/gp

[PATCH v5 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG

2025-07-08 Thread Maíra Canal
anner) - [2/8] Reword several comments (Philipp Stanner) - [4/8] Add Philipp's R-b (Philipp Stanner) - Link to v4: https://lore.kernel.org/r/20250707-sched-skip-reset-v4-0-036c0f0f5...@igalia.com --- Maíra Canal (8): drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RE

[PATCH v5 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-08 Thread Maíra Canal
status will indicate that the job must be reinserted into `sched->pending_list`, and the hardware / driver will still complete that job. Signed-off-by: Maíra Canal --- drivers/gpu/drm/scheduler/sched_main.c | 46 -- include/drm/gpu_scheduler.h| 3 +++ 2

[PATCH v5 1/8] drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET

2025-07-08 Thread Maíra Canal
is now in a nominal state again. Signed-off-by: Maíra Canal Reviewed-by: Philipp Stanner --- To: Min Ma To: Lizhi Hou To: Oded Gabbay To: Frank Binns To: Matt Coster To: Qiang Yu To: Lyude Paul To: Alex Deucher To: Christian König --- drivers/accel/amdxdna/aie2_ctx.c | 2

Re: [PATCH v4 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-08 Thread Maíra Canal
Hi Philipp, On 08/07/25 04:02, Philipp Stanner wrote: On Mon, 2025-07-07 at 11:46 -0300, Maíra Canal wrote: When the DRM scheduler times out, it's possible that the GPU isn't hung; instead, a job may still be running, and there may be no valid reason to reset the hardware. This ca

[PATCH v4 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-07 Thread Maíra Canal
nform the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/v3d/v3d_sched.c | 16 ++-- 1 file changed, 2 insertions(+), 14 dele

[PATCH v4 8/8] drm/panfrost: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-07 Thread Maíra Canal
ly timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfros

[PATCH v4 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-07 Thread Maíra Canal
m the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-)

[PATCH v4 7/8] drm/xe: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-07-07 Thread Maíra Canal
code DRM_GPU_SCHED_STAT_NO_HANG. Note that, in the first case, there is no need to restart submission if it hasn't been stopped. Signed-off-by: Maíra Canal --- drivers/gpu/drm/xe/xe_guc_submit.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_s

[PATCH v4 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG

2025-07-07 Thread Maíra Canal
Add a test to submit a single job against a scheduler with the timeout configured and verify that if the job is still running, the timeout handler will skip the reset and allow the job to complete. Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/scheduler/tests

[PATCH v4 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-07-07 Thread Maíra Canal
are / driver will still complete that job. Signed-off-by: Maíra Canal --- drivers/gpu/drm/scheduler/sched_main.c | 43 -- include/drm/gpu_scheduler.h| 3 +++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/scheduler/

[PATCH v4 3/8] drm/sched: Make timeout KUnit tests faster

2025-07-07 Thread Maíra Canal
42:26] Elapsed time: 15.637s total, 0.002s configuring, 10.387s building, 5.229s running After this commit: [15:45:26] Elapsed time: 9.263s total, 0.002s configuring, 5.168s building, 4.037s running Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin Acked-by: Philipp Stanner --- drivers/gp

[PATCH v4 1/8] drm/sched: Rename DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET

2025-07-07 Thread Maíra Canal
is now in a nominal state again. Signed-off-by: Maíra Canal Reviewed-by: Philipp Stanner --- To: Min Ma To: Lizhi Hou To: Oded Gabbay To: Frank Binns To: Matt Coster To: Qiang Yu To: Lyude Paul To: Alex Deucher To: Christian König --- drivers/accel/amdxdna/aie2_ctx.c | 2

[PATCH v4 0/8] drm/sched: Allow drivers to skip the reset with DRM_GPU_SCHED_STAT_NO_HANG

2025-07-07 Thread Maíra Canal
250530-sched-skip-reset-v2-0-c40a8d2d8...@igalia.com v3 -> v4: - [1/8] s/betters/better and Philipp's R-b (Philipp Stanner) - [2/8] Apply some documentation nits (Philipp Stanner) - [3/8] Add Philipp's A-b (Philipp Stanner) - [4/8, 5/8] Add Tvrtko's R-b (Tvrtko Ursulin) - [6/8] A

Re: [PATCH v5 11/16] drm/sched: Account entity GPU time

2025-07-04 Thread Maíra Canal
Hi Tvrtko, In general, LGTM, but I miss documentation for all the new structures and functions that you implemented. Best Regards, - Maíra On 23/06/25 09:27, Tvrtko Ursulin wrote: To implement fair scheduling we need a view into the GPU time consumed by entities. Problem we have is that jobs a

Re: [PATCH v5 08/16] drm/sched: Consolidate entity run queue management

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Move the code dealing with entities entering and exiting run queues to helpers to logically separate it from jobs entering and exiting entities. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: P

Re: [PATCH v5 06/16] drm/sched: Consolidate drm_sched_rq_select_entity_rr

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Extract out two copies of the identical code to function epilogue to make it smaller and more readable. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner --- drivers/gpu/drm/sch

Re: [PATCH v5 07/16] drm/sched: Implement RR via FIFO

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Round-robin being the non-default policy and unclear how much it is used, we can notice that it can be implemented using the FIFO data structures if we only invent a fake submit timestamp which is monotonically increasing inside drm_sched_rq in

Re: [PATCH] drm/sched: De-clutter drm_sched_init

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 04/07/25 10:07, Tvrtko Ursulin wrote: Move work queue allocation into a helper for a more streamlined function body. Signed-off-by: Tvrtko Ursulin I just sent a r-b to this patch in the Fair Scheduler series, so: Reviewed-by: Maíra Canal Best Regards, - Maíra Cc

Re: [PATCH v5 03/16] drm/sched: De-clutter drm_sched_init

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Move work queue allocation into a helper for a more streamlined function body. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal Best Regards, - Maíra Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp

Re: [PATCH v5 04/16] drm/sched: Avoid double re-lock on the job free path

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again to decide whether to re-queue itself if there are more finished jobs. Since drm_sched_get_finished_

Re: [PATCH 1/6] drm/sched: Avoid memory leaks with cancel_job() callback

2025-07-04 Thread Maíra Canal
Ursulin Link: https://lore.kernel.org/dri-devel/20250418113211.69956-1-tvrtko.ursu...@igalia.com/ Signed-off-by: Philipp Stanner Reviewed-by: Maíra Canal Best Regards, - Maíra

Re: [PATCH 20/80] drivers: drm: Remove redundant pm_runtime_mark_last_busy() calls

2025-07-04 Thread Maíra Canal
_unlock(&vc4->power_lock); For vc4, Reviewed-by: Maíra Canal Best Regards, - Maíra

Re: [PATCH] Introduce Tyr

2025-07-03 Thread Maíra Canal
Hi Daniel, On 30/06/25 10:53, Daniel Almeida wrote: Hi Maíra, thanks for chiming in :) To enhance readability, consider using a regmap similar to panthor_regs.h. This would help avoid 'magic numbers' and make the code's intent much clearer. Are you referring to "struct regmap" itself? Beca

Re: [PATCH] drm/v3d: Disable interrupts before resetting the GPU

2025-07-02 Thread Maíra Canal
On 28/06/25 19:42, Maíra Canal wrote: Currently, an interrupt can be triggered during a GPU reset, which can lead to GPU hangs and NULL pointer dereference in an interrupt context as shown in the following trace: [ 314.035040] Unable to handle kernel NULL pointer dereference at virtual

Re: [PATCH v3 3/8] drm/sched: Make timeout KUnit tests faster

2025-06-30 Thread Maíra Canal
Hi Philipp, On 30/06/25 09:20, Philipp Stanner wrote: On Mon, 2025-06-30 at 09:05 -0300, Maíra Canal wrote: Hi Philipp, On 30/06/25 08:53, Philipp Stanner wrote: On Wed, 2025-06-18 at 11:47 -0300, Maíra Canal wrote: As more KUnit tests are introduced to evaluate the basic capabilities of

Re: [PATCH v3 3/8] drm/sched: Make timeout KUnit tests faster

2025-06-30 Thread Maíra Canal
Hi Philipp, On 30/06/25 08:53, Philipp Stanner wrote: On Wed, 2025-06-18 at 11:47 -0300, Maíra Canal wrote: As more KUnit tests are introduced to evaluate the basic capabilities of the `timedout_job()` hook, the test suite will continue to increase in duration. To reduce the overall running

Re: [PATCH v3 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-06-30 Thread Maíra Canal
Hi, @Matthew, @Philipp, @Danilo, do you folks have some feedback about this patch and also 1/8 and 7/8? I'd be glad to hear your thoughts and/or gather some R-b's. Thanks! Best Regards, - Maíra On 18/06/25 11:47, Maíra Canal wrote: When the DRM scheduler times out, it's possib

[PATCH] drm/v3d: Disable interrupts before resetting the GPU

2025-06-28 Thread Maíra Canal
V3D V3.x+") Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_drv.h | 8 drivers/gpu/drm/v3d/v3d_gem.c | 2 ++ drivers/gpu/drm/v3d/v3d_irq.c | 37 +-- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_drv.

Re: [PATCH] Introduce Tyr

2025-06-28 Thread Maíra Canal
Hi Daniel, On 27/06/25 19:34, Daniel Almeida wrote: [...] diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs new file mode 100644 index ..2443620e10620585eae3d57978e64d2169a1b2d1 --- /dev/null +++ b/drivers/gpu/drm/tyr/driver.rs

Re: [PATCH v6 6/8] drm/vkms: Change YUV helpers to support u16 inputs for conversion

2025-06-28 Thread Maíra Canal
Hi Louis, On 6/27/25 19:45, Louis Chauvet wrote: Some YUV format uses 16 bit values, so change the helper function for conversion to support those new formats. Signed-off-by: Louis Chauvet Reviewed-by: Maíra Canal Best Regards, - Maíra --- drivers/gpu/drm/vkms/tests/vkms_format_test.c

Re: [PATCH v5 6/8] drm/vkms: Change YUV helpers to support u16 inputs for conversion

2025-06-27 Thread Maíra Canal
t I understand the input color now is 16 bits as well. Please, update the comment. Sorry, I missed those nits in the first review. Apart from that, Reviewed-by: Maíra Canal Best Regards, - Maíra * and output color is 16 bits. */ -static void vkms_format_test_yuv_u8_to_argb_u16(struct kunit *t

Re: [PATCH v5 8/8] drm/vkms: Add P01* formats

2025-06-27 Thread Maíra Canal
Hi Louis, On 27/06/25 06:12, Louis Chauvet wrote: The formats NV 12/16/24/21/61/42 were already supported. Add support for: - P010 - P012 - P016 Signed-off-by: Louis Chauvet Reviewed-by: Maíra Canal Best Regards, - Maíra --- drivers/gpu/drm/vkms/vkms_formats.c | 7 ++- drivers

Re: [PATCH v5 2/8] drm/vkms: Add support for ARGB8888 formats

2025-06-27 Thread Maíra Canal
you add each format in one separate line. Apart from that, Reviewed-by: Maíra Canal Best Regards, - Maíra Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_formats.c | 13 +++-- drivers/gpu/drm/vkms/vkms_plane.c | 5 - 2 files changed, 15 insertions(+), 3 deletions

Re: [PATCH] drm/vkms: Fix race-condition between the hrtimer and the atomic commit

2025-06-26 Thread Maíra Canal
Hi Pranav, On 26/06/25 11:22, Pranav Tyagi wrote: From: Maíra Canal [ Upstream commit a0e6a017ab56936c0405fe914a793b241ed25ee0 ] Currently, it is possible for the composer to be set as enabled and then as disabled without a proper call for the vkms_vblank_simulate(). This is problematic

Re: [PATCH v4 2/8] drm/vkms: Add support for ARGB8888 formats

2025-06-21 Thread Maíra Canal
Hi Louis, On 13/06/25 14:28, Louis Chauvet wrote: Le 11/06/2025 à 21:55, Maíra Canal a écrit : Hi Louis, On 5/30/25 11:05, Louis Chauvet wrote: The formats XRGB and ARGB were already supported. Add the support for: - XBGR - RGBX - BGRX - ABGR - RGBA - BGRA

Re: [PATCH v2] drm: writeback: Fix drm_writeback_connector_cleanup signature

2025-06-21 Thread Maíra Canal
, change the function signature to match what is expected by drmres_release_t. Fixes: 1914ba2b91ea ("drm: writeback: Create drmm variants for drm_writeback_connector initialization") Suggested-by: Mark Yacoub Signed-off-by: Louis Chauvet Reviewed-by: Maíra Canal Best Regard

[PATCH v3 8/8] drm/panfrost: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-06-18 Thread Maíra Canal
ly timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfros

[PATCH v3 7/8] drm/xe: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-06-18 Thread Maíra Canal
code DRM_GPU_SCHED_STAT_NO_HANG. Note that, in the first case, there is no need to restart submission if it hasn't been stopped. Signed-off-by: Maíra Canal --- drivers/gpu/drm/xe/xe_guc_submit.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_guc_s

[PATCH v3 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-06-18 Thread Maíra Canal
m the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gp

[PATCH v3 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-06-18 Thread Maíra Canal
nform the scheduler that the job did not actually timeout and no reset was performed through the new status code DRM_GPU_SCHED_STAT_NO_HANG. Signed-off-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_sched.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/gp

[PATCH v3 4/8] drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG

2025-06-18 Thread Maíra Canal
Add a test to submit a single job against a scheduler with the timeout configured and verify that if the job is still running, the timeout handler will skip the reset and allow the job to complete. Signed-off-by: Maíra Canal --- drivers/gpu/drm/scheduler/tests/mock_scheduler.c | 5 +++ drivers

[PATCH v3 2/8] drm/sched: Allow drivers to skip the reset and keep on running

2025-06-18 Thread Maíra Canal
e_job()` - leading to a memory leak. To solve those problems, create a new `drm_gpu_sched_stat`, called DRM_GPU_SCHED_STAT_NO_HANG, that allows a driver to skip the reset. The new status will indicate that the job must be reinserted into the pending list, and the hardware / driver will still compl

[PATCH v3 3/8] drm/sched: Make timeout KUnit tests faster

2025-06-18 Thread Maíra Canal
42:26] Elapsed time: 15.637s total, 0.002s configuring, 10.387s building, 5.229s running After this commit: [15:45:26] Elapsed time: 9.263s total, 0.002s configuring, 5.168s building, 4.037s running Signed-off-by: Maíra Canal Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/scheduler/

  1   2   3   4   5   6   7   8   9   10   >