3 # Testcase: Simulate missed breadcrumb interrupts
6 SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
7 . $SOURCE_DIR/drm_lib.sh
13 function check_for_missed_irq {
14 if test `cat i915_ring_missed_irq` = 0x00000000; then
15 echo "missed interrupts undetected"
20 function check_for_hang {
21 if cat i915_error_state | grep -v "no error state collected" > /dev/null ; then
22 echo "gpu hang reported"
27 if [ ! -f i915_ring_missed_irq ] ; then
28 echo "kernel doesn't support interrupt masking"
32 # clear error state first
33 echo > i915_error_state
36 echo 0xf > i915_ring_test_irq
37 echo "Interrupts masked"
38 if test `cat i915_ring_test_irq` != 0x0000000f; then
39 echo "Failed to set interrupt mask"
43 (cd $oldpath; $SOURCE_DIR/gem_exec_blt) > /dev/null
48 (cd $oldpath; $SOURCE_DIR/gem_exec_blt) > /dev/null
52 echo 0 > i915_ring_test_irq
53 echo "Interrupts unmasked"
54 if test `cat i915_ring_test_irq` != 0x00000000; then
55 echo "Failed to clear interrupt mask"
59 (cd $oldpath; $SOURCE_DIR/gem_exec_blt) > /dev/null
63 echo 0 > i915_ring_missed_irq
64 echo "Cleared missed interrupts"
65 if test `cat i915_ring_missed_irq` != 0x00000000; then
66 echo "Failed to clear missed interrupts"