[PATCH v2 5/8] drm/v3d: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset
Maíra Canal
mcanal at igalia.com
Mon Jun 2 11:27:38 UTC 2025
Hi Philipp,
On 02/06/25 04:13, Philipp Stanner wrote:
> On Fri, 2025-05-30 at 11:01 -0300, Maíra Canal wrote:
>> When a CL/CSD job times out, we check if the GPU has made any
>> progress
>> since the last timeout. If so, instead of resetting the hardware, we
>> skip
>> the reset and allow the timer to be rearmed. This gives long-running
>> jobs
>> a chance to complete.
>>
>> Use the DRM_GPU_SCHED_STAT_NO_HANG status to skip the reset and re-
>> arm
>> the timer.
>>
>> Signed-off-by: Maíra Canal <mcanal at igalia.com>
>> ---
>> drivers/gpu/drm/v3d/v3d_sched.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/v3d/v3d_sched.c
>> b/drivers/gpu/drm/v3d/v3d_sched.c
>> index
>> e1997387831541fb053e472672004cf511c25558..fbb09a8aff3740b5cd59573b5f2
>> e26b2ee352dfb 100644
>> --- a/drivers/gpu/drm/v3d/v3d_sched.c
>> +++ b/drivers/gpu/drm/v3d/v3d_sched.c
>> @@ -761,7 +761,7 @@ v3d_cl_job_timedout(struct drm_sched_job
>> *sched_job, enum v3d_queue q,
>> if (*timedout_ctca != ctca || *timedout_ctra != ctra) {
>> *timedout_ctca = ctca;
>> *timedout_ctra = ctra;
>> - return DRM_GPU_SCHED_STAT_RESET;
>> + return DRM_GPU_SCHED_STAT_NO_HANG;
>> }
>>
>> return v3d_gpu_reset_for_timeout(v3d, sched_job);
>> @@ -805,7 +805,7 @@ v3d_csd_job_timedout(struct drm_sched_job
>> *sched_job)
>> */
>> if (job->timedout_batches != batches) {
>> job->timedout_batches = batches;
>> - return DRM_GPU_SCHED_STAT_RESET;
>> + return DRM_GPU_SCHED_STAT_NO_HANG;
>> }
>
> Wait a second, help me out here quickly. You already added workaround
> stuff where you manipulate the scheduler's pending_list, as you state
> in the cover letter. That code here [1].
>
> Don't you have to remove the very same code in this series again to
> still have correct behavior in your driver?
>
> As I see it, all drm branches end up in Linus's tree ultimately. So I'd
> think about potential branch-races in case you didn't already.
>
I always base my patches in drm-misc-next, which didn't backported
Linus' tree yet and still doesn't have the v3d fix. Hopefully, it will
be backported before I send v3.
Best Regards,
- Maíra
>
> P.
>
>
>
> [1] https://lore.kernel.org/dri-devel/20250430210643.57924-1-mcanal@igalia.com/T/
>
More information about the Intel-xe
mailing list