[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221109190937.64155-3-janusz.krzysztofik@linux.intel.com>
Date: Wed, 9 Nov 2022 20:09:36 +0100
From: Janusz Krzysztofik <janusz.krzysztofik@...ux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>
Cc: Jani Nikula <jani.nikula@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Chris Wilson <chris.p.wilson@...el.com>,
intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] drm/i915: Fix unintended submission flush after retire times out
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@...ux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_requests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.25.1
Powered by blists - more mailing lists