summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-11-24 02:37:12 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2017-11-24 12:10:58 +0300
commite7e5da7127d5c9c076f05d6ed71bdf6826fc536c (patch)
treee0a39f16dadaa55c21ae8557c84b90dc52bc58d8 /drivers/gpu/drm/i915/selftests/i915_gem_evict.c
parentb7d3aabf900728b6b13b860157026fd26099208a (diff)
downloadlinux-e7e5da7127d5c9c076f05d6ed71bdf6826fc536c.tar.xz
drm/i915/selftests: Hold rpm wakeref for request + ggtt usage
Since the removal of the delayed rc6 enabling, we now setup and drop the early rpm wakeref during modules initialisation before we start the live selftests. As such, we are now detecting errors in the tests where we were not holding the required wakeref for various actions. As rpm is not the primary goal of the tests involved, take a coarse and convenient rpm wakeref around the tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Matthew Auld <matthew.william.auld@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171123233712.21836-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_gem_evict.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_gem_evict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
index f463105ff48d..e1ddad635d73 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
@@ -355,6 +355,7 @@ static int igt_evict_contexts(void *arg)
return 0;
mutex_lock(&i915->drm.struct_mutex);
+ intel_runtime_pm_get(i915);
/* Reserve a block so that we know we have enough to fit a few rq */
memset(&hole, 0, sizeof(hole));
@@ -463,6 +464,7 @@ out_locked:
}
if (drm_mm_node_allocated(&hole))
drm_mm_remove_node(&hole);
+ intel_runtime_pm_put(i915);
mutex_unlock(&i915->drm.struct_mutex);
return err;