]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Supply the engine-id for our mock_engine()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Aug 2017 16:39:30 +0000 (17:39 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 10 Aug 2017 11:18:35 +0000 (12:18 +0100)
commit1a990ac09ff09684a6b34eef20f901545f4b299a
treea620ca7fbfc6247b9baefae9ef87c7138398c5f6
parent0cae143e563d5b3a7589f13c85124c519a1ad345
drm/i915: Supply the engine-id for our mock_engine()

In the original selftest, we didn't care what the engine->id was, just
that it could uniquely identify it. Later though, we started tracking
the mock engines in the fixed size arrays around the drm_i915_private and
so we now require their indices to be correct. This becomes an issue when
using the standalone harness which runs all available tests at module load,
and so we quickly assign an out-of-bounds index to an engine as we
reallocate the mock GEM device between tests. It doesn't show up in
igt/drv_selftest as that runs each subtest individually.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102045
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170809163930.26470-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/selftests/mock_engine.c
drivers/gpu/drm/i915/selftests/mock_engine.h
drivers/gpu/drm/i915/selftests/mock_gem_device.c