From 40ebf95163dcb233b556bb97e9864497623d7328 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 28 Jul 2015 18:59:47 +0100 Subject: igt/gem_streaming_writes: Bind into the GTT early If we are using a streaming GGTT write into the source, we need to trigger an early fault in order to obtain a mappable offset. This is required when later we start reserving execbuf object top-down to try and avoid mappable space! Signed-off-by: Chris Wilson --- lib/igt_core.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'lib/igt_core.h') diff --git a/lib/igt_core.h b/lib/igt_core.h index babb0bb0..83eac02b 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -364,6 +364,24 @@ void igt_exit(void) __attribute__((noreturn)); "error: %#x " #ncmp " %#x\n", __n1, __n2); \ } while (0) +/** + * igt_assert_cmpu64: + * @n1: first value + * @cmp: compare operator + * @ncmp: negated version of @cmp + * @n2: second value + * + * Like igt_assert_cmpuint(), but for larger ints. + */ +#define igt_assert_cmpu64(n1, cmp, ncmp, n2) \ + do { \ + uint64_t __n1 = (n1), __n2 = (n2); \ + if (__n1 cmp __n2) ; else \ + __igt_fail_assert(IGT_LOG_DOMAIN, __FILE__, __LINE__, __func__, \ + #n1 " " #cmp " " #n2, \ + "error: %#llx " #ncmp " %#llx\n", (long long)__n1, (long long)__n2); \ + } while (0) + /** * igt_assert_cmpdouble: * @n1: first value @@ -404,6 +422,15 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_assert_eq_u32(n1, n2) igt_assert_cmpuint(n1, ==, !=, n2) +/** + * igt_assert_eq_u64: + * @n1: first integer + * @n2: second integer + * + * Like igt_assert_eq_u32(), but for uint64_t. + */ +#define igt_assert_eq_u64(n1, n2) igt_assert_cmpu64(n1, ==, !=, n2) + /** * igt_assert_eq_double: * @n1: first double -- cgit v1.2.3