[Bug 101627] [HSW]drv_selftest/mock_requests - ida_remove called for id=1 which is not allocated.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 28 15:13:39 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101627
--- Comment #1 from Chris Wilson <chris at chris-wilson.co.uk> ---
The usual case for this was the worker running after i915_gem_context_fini().
The requirement there was that flush_workqueue() was run before
i915_gem_context_fini().
i.e. we do
static void mock_device_release(struct drm_device *dev)
{
struct drm_i915_private *i915 = to_i915(dev);
struct intel_engine_cs *engine;
enum intel_engine_id id;
mutex_lock(&i915->drm.struct_mutex);
mock_device_flush(i915);
i915_gem_contexts_lost(i915);
mutex_unlock(&i915->drm.struct_mutex);
cancel_delayed_work_sync(&i915->gt.retire_work);
cancel_delayed_work_sync(&i915->gt.idle_work);
flush_workqueue(i915->wq);
mutex_lock(&i915->drm.struct_mutex);
for_each_engine(engine, i915, id)
mock_engine_free(engine);
i915_gem_contexts_fini(i915);
mutex_unlock(&i915->drm.struct_mutex);
...
(I'm assuming that the llist is correct and we can't free the same context
twice, kasan?)
Above though we have an issue in that we need to use drain_workqueue() instead.
Otherwise, I can't see where we might have more requests to retire. Probably
deserves a few bug ons to assert that all requests are retired and we are now
idle, ala i915_gem_suspend(). Hmm, probably better to rework it to use
i915_gem_suspend as well.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20170628/c5def6bb/attachment.html>
More information about the intel-gfx-bugs
mailing list