Re: [PATCH i-g-t 4/4] tests/syncobj: Add some wait and reset tests (v5)

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

 



Quoting Jason Ekstrand (2017-08-10 06:35:43)
> +igt_main
> +{
> +       int fd;
> +
> +       igt_fixture {
> +               fd = drm_open_driver(DRIVER_ANY);

DRIVER_ANY | DRIVER_VGEM

(ANY really means KMS)

> +               igt_require(has_syncobj_wait(fd));
> +               igt_require_sw_sync();

We should add something like

igt_require(has_timer_resolution(CLOCK_MONOTONIC, SHORT_TIME_NSEC / 2));

static bool has_timer_resolution(clockid_t clk, uint64_t target_ns)
{
	struct timespec res;

	if (clock_getres(clk, &res))
		return false; /* clock unavailable */

	return res.tv_sec * NSEC_PER_SEC + res.tv_nsec <= target_ns;
}

That'll rule out testing on pnv most likely.
-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