mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
drm/i915/selftests: Only switch to kernel context when locked
In igt_flush_test() we try to switch back to the kernel context, but we
are only able to do so when we are called with struct_mutex held.
More of my CI fallout from lockdep being temporarily suppressed :(
Fixes: 4cdf65ce8c
("drm/i915/selftests: Return to kernel context after each test")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180509065926.19207-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
1d7a99f514
commit
b9777c6f86
@ -57,7 +57,8 @@ int igt_flush_test(struct drm_i915_private *i915, unsigned int flags)
|
||||
|
||||
cond_resched();
|
||||
|
||||
if (i915_gem_switch_to_kernel_context(i915)) {
|
||||
if (flags & I915_WAIT_LOCKED &&
|
||||
i915_gem_switch_to_kernel_context(i915)) {
|
||||
pr_err("Failed to switch back to kernel context; declaring wedged\n");
|
||||
i915_gem_set_wedged(i915);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user