aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests/i915_request.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-07-18 15:46:24 -0400
committerDave Airlie <airlied@redhat.com>2018-07-18 15:46:30 -0400
commit539c475dadc430bd0f1601902fcacc1e55ffe85a (patch)
tree6dc3e9ca56165cb46baa84febcb885ed52452cf2 /drivers/gpu/drm/i915/selftests/i915_request.c
parent0c2fd59ae315e28f8868edf80df21a502f933fec (diff)
parent82edc7e8b8c06151bdc653935bc13b83e2f0fcfa (diff)
Merge tag 'drm-intel-next-2018-07-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Higlights here goes to many PSR fixes and improvements; to the Ice lake work with power well support and begin of DSI support addition. Also there were many improvements on execlists and interrupts for minimal latency on command submission; and many fixes on selftests, mostly caught by our CI. General driver: - Clean-up on aux irq (Lucas) - Mark expected switch fall-through for dealing with static analysis tools (Gustavo) Gem: - Different fixes for GuC (Chris, Anusha, Michal) - Avoid self-relocation BIAS if no relocation (Chris) - Improve debugging cases in on EINVAL return and vma allocation (Chris) - Fixes and improvements on context destroying and freeing (Chris) - Wait for engines to idle before retiring (Chris) - Many improvements on execlists and interrupts for minimal latency on command submission (Chris) - Many fixes in selftests, specially on cases highlighted on CI (Chris) - Other fixes and improvements around GGTT (Chris) - Prevent background reaping of active objects (Chris) Display: - Parallel modeset cleanup to fix driver reset (Chris) - Get AUX power domain for DP main link (Imre) - Clean-up on PSR unused func pointers (Rodrigo) - Many PSR/PSR2 fixes and improvements (DK, Jose, Tarun) - Add a PSR1 live status (Vathsala) - Replace old drm_*_{un/reference} with put,get functions (Thomas) - FBC fixes (Maarten) - Abstract and document the usage of picking macros (Jani) - Remove unnecessary check for unsupported modifiers for NV12. (DK) - Interrupt fixes for display (Ville) - Clean up on sdvo code (Ville) - Clean up on current DSI code (Jani) - Remove support for legacy debugfs crc interface (Maarten) - Simplify get_encoder_power_domains (Imre) Icelake: - MG PLL fixes (Imre) - Add hw workaround for alpha blending (Vandita) - Add power well support (Imre) - Add Interrupt Support (Anusha) - Start to add support for DSI on Ice Lake (Madhav) Signed-off-by: Dave Airlie <airlied@redhat.com> # gpg: Signature made Tue 10 Jul 2018 08:41:37 AM AEST # gpg: using RSA key FA625F640EEB13CA # gpg: Good signature from "Rodrigo Vivi <rodrigo.vivi@intel.com>" # gpg: aka "Rodrigo Vivi <rodrigo.vivi@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6D20 7068 EEDD 6509 1C2C E2A3 FA62 5F64 0EEB 13CA Link: https://patchwork.freedesktop.org/patch/msgid/20180710234349.GA16562@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_request.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_request.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
index 63cd9486cc13..c4aac6141e04 100644
--- a/drivers/gpu/drm/i915/selftests/i915_request.c
+++ b/drivers/gpu/drm/i915/selftests/i915_request.c
@@ -262,7 +262,7 @@ int i915_request_mock_selftests(void)
262 return -ENOMEM; 262 return -ENOMEM;
263 263
264 err = i915_subtests(tests, i915); 264 err = i915_subtests(tests, i915);
265 drm_dev_unref(&i915->drm); 265 drm_dev_put(&i915->drm);
266 266
267 return err; 267 return err;
268} 268}
@@ -286,7 +286,9 @@ static int begin_live_test(struct live_test *t,
286 t->func = func; 286 t->func = func;
287 t->name = name; 287 t->name = name;
288 288
289 err = i915_gem_wait_for_idle(i915, I915_WAIT_LOCKED); 289 err = i915_gem_wait_for_idle(i915,
290 I915_WAIT_LOCKED,
291 MAX_SCHEDULE_TIMEOUT);
290 if (err) { 292 if (err) {
291 pr_err("%s(%s): failed to idle before, with err=%d!", 293 pr_err("%s(%s): failed to idle before, with err=%d!",
292 func, name, err); 294 func, name, err);
@@ -594,11 +596,8 @@ static struct i915_vma *recursive_batch(struct drm_i915_private *i915)
594 } else if (gen >= 6) { 596 } else if (gen >= 6) {
595 *cmd++ = MI_BATCH_BUFFER_START | 1 << 8; 597 *cmd++ = MI_BATCH_BUFFER_START | 1 << 8;
596 *cmd++ = lower_32_bits(vma->node.start); 598 *cmd++ = lower_32_bits(vma->node.start);
597 } else if (gen >= 4) {
598 *cmd++ = MI_BATCH_BUFFER_START | MI_BATCH_GTT;
599 *cmd++ = lower_32_bits(vma->node.start);
600 } else { 599 } else {
601 *cmd++ = MI_BATCH_BUFFER_START | MI_BATCH_GTT | 1; 600 *cmd++ = MI_BATCH_BUFFER_START | MI_BATCH_GTT;
602 *cmd++ = lower_32_bits(vma->node.start); 601 *cmd++ = lower_32_bits(vma->node.start);
603 } 602 }
604 *cmd++ = MI_BATCH_BUFFER_END; /* terminate early in case of error */ 603 *cmd++ = MI_BATCH_BUFFER_END; /* terminate early in case of error */
@@ -678,7 +677,9 @@ static int live_all_engines(void *arg)
678 i915_gem_object_set_active_reference(batch->obj); 677 i915_gem_object_set_active_reference(batch->obj);
679 } 678 }
680 679
681 i915_vma_move_to_active(batch, request[id], 0); 680 err = i915_vma_move_to_active(batch, request[id], 0);
681 GEM_BUG_ON(err);
682
682 i915_request_get(request[id]); 683 i915_request_get(request[id]);
683 i915_request_add(request[id]); 684 i915_request_add(request[id]);
684 } 685 }
@@ -788,7 +789,9 @@ static int live_sequential_engines(void *arg)
788 GEM_BUG_ON(err); 789 GEM_BUG_ON(err);
789 request[id]->batch = batch; 790 request[id]->batch = batch;
790 791
791 i915_vma_move_to_active(batch, request[id], 0); 792 err = i915_vma_move_to_active(batch, request[id], 0);
793 GEM_BUG_ON(err);
794
792 i915_gem_object_set_active_reference(batch->obj); 795 i915_gem_object_set_active_reference(batch->obj);
793 i915_vma_get(batch); 796 i915_vma_get(batch);
794 797
@@ -862,5 +865,9 @@ int i915_request_live_selftests(struct drm_i915_private *i915)
862 SUBTEST(live_sequential_engines), 865 SUBTEST(live_sequential_engines),
863 SUBTEST(live_empty_request), 866 SUBTEST(live_empty_request),
864 }; 867 };
868
869 if (i915_terminally_wedged(&i915->gpu_error))
870 return 0;
871
865 return i915_subtests(tests, i915); 872 return i915_subtests(tests, i915);
866} 873}