]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915/selftests: Create mock_engine() under struct_mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 8 May 2018 21:10:56 +0000 (22:10 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 May 2018 06:52:00 +0000 (07:52 +0100)
commit1d7a99f5148fdcdb9d40367d6d0668a34df161d4
tree9cfca3634fe62069e414b06b59e737534b445530
parent0adb90d330bb5f0d7fba511af5af3fc1ba93fb7a
drm/i915/selftests: Create mock_engine() under struct_mutex

Calling mock_engine() calls i915_timeline_init() and that requires
struct_mutex to be held as it adds itself to the global list of
timelines. This error was introduced by commit a89d1f921c15 ("drm/i915:
Split i915_gem_timeline into individual timelines") but the issue was
masked in CI by the earlier lockdep spam.

Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180508211056.17151-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/mock_gem_device.c