diff options
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_request.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_request.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c index c4aac6141e04..07e557815308 100644 --- a/drivers/gpu/drm/i915/selftests/i915_request.c +++ b/drivers/gpu/drm/i915/selftests/i915_request.c | |||
@@ -342,6 +342,7 @@ static int live_nop_request(void *arg) | |||
342 | */ | 342 | */ |
343 | 343 | ||
344 | mutex_lock(&i915->drm.struct_mutex); | 344 | mutex_lock(&i915->drm.struct_mutex); |
345 | intel_runtime_pm_get(i915); | ||
345 | 346 | ||
346 | for_each_engine(engine, i915, id) { | 347 | for_each_engine(engine, i915, id) { |
347 | struct i915_request *request = NULL; | 348 | struct i915_request *request = NULL; |
@@ -402,6 +403,7 @@ static int live_nop_request(void *arg) | |||
402 | } | 403 | } |
403 | 404 | ||
404 | out_unlock: | 405 | out_unlock: |
406 | intel_runtime_pm_put(i915); | ||
405 | mutex_unlock(&i915->drm.struct_mutex); | 407 | mutex_unlock(&i915->drm.struct_mutex); |
406 | return err; | 408 | return err; |
407 | } | 409 | } |
@@ -487,6 +489,7 @@ static int live_empty_request(void *arg) | |||
487 | */ | 489 | */ |
488 | 490 | ||
489 | mutex_lock(&i915->drm.struct_mutex); | 491 | mutex_lock(&i915->drm.struct_mutex); |
492 | intel_runtime_pm_get(i915); | ||
490 | 493 | ||
491 | batch = empty_batch(i915); | 494 | batch = empty_batch(i915); |
492 | if (IS_ERR(batch)) { | 495 | if (IS_ERR(batch)) { |
@@ -550,6 +553,7 @@ out_batch: | |||
550 | i915_vma_unpin(batch); | 553 | i915_vma_unpin(batch); |
551 | i915_vma_put(batch); | 554 | i915_vma_put(batch); |
552 | out_unlock: | 555 | out_unlock: |
556 | intel_runtime_pm_put(i915); | ||
553 | mutex_unlock(&i915->drm.struct_mutex); | 557 | mutex_unlock(&i915->drm.struct_mutex); |
554 | return err; | 558 | return err; |
555 | } | 559 | } |
@@ -644,6 +648,7 @@ static int live_all_engines(void *arg) | |||
644 | */ | 648 | */ |
645 | 649 | ||
646 | mutex_lock(&i915->drm.struct_mutex); | 650 | mutex_lock(&i915->drm.struct_mutex); |
651 | intel_runtime_pm_get(i915); | ||
647 | 652 | ||
648 | err = begin_live_test(&t, i915, __func__, ""); | 653 | err = begin_live_test(&t, i915, __func__, ""); |
649 | if (err) | 654 | if (err) |
@@ -726,6 +731,7 @@ out_request: | |||
726 | i915_vma_unpin(batch); | 731 | i915_vma_unpin(batch); |
727 | i915_vma_put(batch); | 732 | i915_vma_put(batch); |
728 | out_unlock: | 733 | out_unlock: |
734 | intel_runtime_pm_put(i915); | ||
729 | mutex_unlock(&i915->drm.struct_mutex); | 735 | mutex_unlock(&i915->drm.struct_mutex); |
730 | return err; | 736 | return err; |
731 | } | 737 | } |
@@ -747,6 +753,7 @@ static int live_sequential_engines(void *arg) | |||
747 | */ | 753 | */ |
748 | 754 | ||
749 | mutex_lock(&i915->drm.struct_mutex); | 755 | mutex_lock(&i915->drm.struct_mutex); |
756 | intel_runtime_pm_get(i915); | ||
750 | 757 | ||
751 | err = begin_live_test(&t, i915, __func__, ""); | 758 | err = begin_live_test(&t, i915, __func__, ""); |
752 | if (err) | 759 | if (err) |
@@ -853,6 +860,7 @@ out_request: | |||
853 | i915_request_put(request[id]); | 860 | i915_request_put(request[id]); |
854 | } | 861 | } |
855 | out_unlock: | 862 | out_unlock: |
863 | intel_runtime_pm_put(i915); | ||
856 | mutex_unlock(&i915->drm.struct_mutex); | 864 | mutex_unlock(&i915->drm.struct_mutex); |
857 | return err; | 865 | return err; |
858 | } | 866 | } |