Re: [igt-dev] [PATCH i-g-t v13 2/2] tests/gem_ctx_sseu: Dynamic (sub)slice programming tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2018-09-14 17:04:38)
> +static igt_spin_t *
> +__post_set(int fd, unsigned int flags, uint32_t ctx, igt_spin_t *spin,
> +          unsigned int expected)
> +{
> +       bool busy_reset = (flags & TEST_BUSY) &&
> +                         (flags & (TEST_RESET | TEST_HANG));
> +
> +       if (flags & TEST_RESET)
> +               igt_force_gpu_reset(fd);
> +       else if (flags & TEST_HANG)
> +               gem_sync(fd, spin->handle);

Hmm, in both cases this is before we submit the read/post-sseu batch.

I was thinking more for the hang you would simply opt to not terminate
the spinner.

Being utterly pedantic, we may want to check per-engine resets and
device level.

> +       if (spin && !busy_reset) {
> +               igt_assert_eq(read_slice_count_busy(fd, ctx, 0, spin),
> +                             expected);
> +       } else {
> +               igt_assert_eq(read_slice_count(fd, ctx, 0), expected);
> +       }
> +
> +       igt_assert_eq(read_slice_count(fd, 0, 0), __slice_count__);
> +
> +       if (spin)
> +               igt_spin_batch_free(fd, spin);
> +
> +       if (flags & TEST_IDLE)
> +               igt_drop_caches_set(fd, DROP_RETIRE | DROP_IDLE | DROP_ACTIVE);
> +
> +       if (flags & TEST_SUSPEND) {
> +               igt_set_autoresume_delay(5);

Brave. Opting for a faster wakeup than default...

> +               igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> +                                             SUSPEND_TEST_NONE);
> +       }
> +
> +       igt_assert_eq(read_slice_count(fd, ctx, 0), expected);
> +       igt_assert_eq(read_slice_count(fd, 0, 0), __slice_count__);
> +
> +       return NULL;
> +}

Overall, nothing else strikes me as being absent.

Oh, one more thing; do we are what state we leave the system in on
module unload? So long as the GPU reset clears it we should be ok.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux