diff options
author | Chris Wilson <[email protected]> | 2017-10-05 11:59:27 +0100 |
---|---|---|
committer | Chris Wilson <[email protected]> | 2017-10-05 13:21:16 +0100 |
commit | e91ef99b95439fc634e9c9753887d363a848f452 (patch) | |
tree | 20b08e2ee744c78e148cca4f590640a1a2f372b9 | |
parent | c02b8fb4073d1b9aa5af909a91b51056b819d946 (diff) |
drm/i915/selftests: Remember to create the fake preempt context
For the fake device we have our own set of mock contexts that need to
match the real contexts we normally create. Currently this requires us
to manually instantiate them for the selftests, which I forgot.
Reported-by: Matthew Auld <[email protected]>
Fixes: e7af3116836f ("drm/i915: Introduce a preempt context")
Signed-off-by: Chris Wilson <[email protected]>
Cc: MichaĆ Winiarski <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Matthew Auld <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gem_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 2388424a14da..d01b7ec2d68d 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -239,8 +239,14 @@ struct drm_i915_private *mock_gem_device(void) if (!i915->kernel_context) goto err_engine; + i915->preempt_context = mock_context(i915, NULL); + if (!i915->preempt_context) + goto err_kernel_context; + return i915; +err_kernel_context: + i915_gem_context_put(i915->kernel_context); err_engine: for_each_engine(engine, i915, id) mock_engine_free(engine); |