OSDN Git Service

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)
commit3ec0af7f223bab9503c4ed57d00ed34b137df476
treea620ca7fbfc6247b9baefae9ef87c7138398c5f6
parent912d64123d354dd2e4ced479e1d93e74ea4c99a8
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