diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-11-07 21:39:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-11-08 10:17:41 +0000 |
commit | a8c9a7f52ec5a4b36ce183efd5fda4e4fd90ec45 (patch) | |
tree | debf727251f993185db786505cec57db652f4e96 /drivers/gpu/drm/i915/gem/selftests/mock_context.c | |
parent | drm/i915: make more headers self-contained (diff) | |
download | linux-dev-a8c9a7f52ec5a4b36ce183efd5fda4e4fd90ec45.tar.xz linux-dev-a8c9a7f52ec5a4b36ce183efd5fda4e4fd90ec45.zip |
drm/i915/selftests: Complete transition to a real struct file mock
Since drm provided us with a real struct file we can use for our
anonymous internal clients (mock_file), complete our transition to using
that as the primary interface (and not the mocked up struct drm_file we
previous were using).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107213929.23286-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gem/selftests/mock_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/selftests/mock_context.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_context.c b/drivers/gpu/drm/i915/gem/selftests/mock_context.c index 29b8984f0e47..cdcb006321a7 100644 --- a/drivers/gpu/drm/i915/gem/selftests/mock_context.c +++ b/drivers/gpu/drm/i915/gem/selftests/mock_context.c @@ -5,6 +5,7 @@ */ #include "mock_context.h" +#include "selftests/mock_drm.h" #include "selftests/mock_gtt.h" struct i915_gem_context * @@ -74,7 +75,7 @@ void mock_init_contexts(struct drm_i915_private *i915) } struct i915_gem_context * -live_context(struct drm_i915_private *i915, struct drm_file *file) +live_context(struct drm_i915_private *i915, struct file *file) { struct i915_gem_context *ctx; int err; @@ -83,7 +84,7 @@ live_context(struct drm_i915_private *i915, struct drm_file *file) if (IS_ERR(ctx)) return ctx; - err = gem_context_register(ctx, file->driver_priv); + err = gem_context_register(ctx, to_drm_file(file)->driver_priv); if (err < 0) goto err_ctx; |