aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-11-07 18:05:59 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-11-07 21:22:16 +0000
commit85ca528ed79ca8e8c6d0505dceaa081768dce300 (patch)
treed919e825b5749c1b8eec1706432c39d04d5c26dd /drivers/gpu/drm/i915/gt/selftest_hangcheck.c
parentdrm: Expose a method for creating anonymous struct file around drm_minor (diff)
downloadlinux-dev-85ca528ed79ca8e8c6d0505dceaa081768dce300.tar.xz
linux-dev-85ca528ed79ca8e8c6d0505dceaa081768dce300.zip
drm/i915/selftests: Replace mock_file hackery with drm's true fake
As drm now exports a method to create an anonymous struct file around a drm_device for internal use, make use of it to avoid our horrible hacks. Danial suggested that the mock_file_put() wrapper was suitable for drm-core, along with the mock_drm_getfile() [and that the vestigal mock_drm_file() in this patch should perhaps be the drm interface itself]. However, the eventual goal is to remove the mock_drm_file() and use the struct file and fput() directly, in this patch we take a simple transition in that direction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20191107180601.30815-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/selftest_hangcheck.c')
-rw-r--r--drivers/gpu/drm/i915/gt/selftest_hangcheck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
index 85e9ccf5c304..cdaaee4432b2 100644
--- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
+++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
@@ -439,7 +439,7 @@ static int igt_reset_nop(void *arg)
err = igt_flush_test(gt->i915);
out:
- mock_file_free(gt->i915, file);
+ mock_file_put(file);
if (intel_gt_is_wedged(gt))
err = -EIO;
return err;
@@ -535,7 +535,7 @@ static int igt_reset_nop_engine(void *arg)
err = igt_flush_test(gt->i915);
out:
- mock_file_free(gt->i915, file);
+ mock_file_put(file);
if (intel_gt_is_wedged(gt))
err = -EIO;
return err;
@@ -752,7 +752,7 @@ static int active_engine(void *data)
}
err_file:
- mock_file_free(engine->i915, file);
+ mock_file_put(file);
return err;
}
@@ -1325,7 +1325,7 @@ static int igt_reset_evict_ppgtt(void *arg)
i915_vm_put(vm);
out:
- mock_file_free(gt->i915, file);
+ mock_file_put(file);
return err;
}