Message ID | 20221109190937.64155-3-janusz.krzysztofik@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix timeout handling when retiring requests | expand |
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_requests.c b/drivers/gpu/drm/i915/gt/intel_gt_requests.c index 6c3b8ac3055c3..309d5937d6910 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_requests.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_requests.c @@ -204,7 +204,7 @@ out_active: spin_lock(&timelines->lock); list_for_each_entry_safe(tl, tn, &free, link) __intel_timeline_free(&tl->kref); - if (flush_submission(gt, timeout)) /* Wait, there's more! */ + if (flush_submission(gt, timeout > 0)) /* Wait, there's more! */ active_count++; if (remaining_timeout)
If wait on request DMA fence times out while we are retiring requests, -ETIME is stored as remaining time. Then, flush_submission() called thereafter proceeds with its work instead of returning immediately due to the value of timeout passed to it not equal 0. That's probably not what was intended. Fix it by replacing -ETIME value of the argument with 0. Fixes: 09137e945437 ("drm/i915/gem: Unpin idle contexts from kswapd reclaim") Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> --- drivers/gpu/drm/i915/gt/intel_gt_requests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)