ports/graphics/igt-gpu-tools/files/patch-tests_i915_gem__close__race.c
Jake Freeland 5d303ab480
graphics/igt-gpu-tools: Test suite for drm drivers
The igt testing suite is separated into tests and tools that target kms,
memory management, and command submission.  These tests are especially
helpful for low-level reporting, transparent tracking of kernel changes,
and efficient debugging of modern drm drivers.

Reviewed by:	diizzy, lwhsu, jrm
Differential Revision:	https://reviews.freebsd.org/D36213
2022-09-09 12:06:45 -03:00

23 lines
599 B
C

--- tests/i915/gem_close_race.c.orig 2022-08-31 20:00:01 UTC
+++ tests/i915/gem_close_race.c
@@ -53,6 +53,10 @@
#define BLT_WRITE_ALPHA (1<<21)
#define BLT_WRITE_RGB (1<<20)
+#ifdef __FreeBSD__
+#define gettid() getpid()
+#endif
+
IGT_TEST_DESCRIPTION("Test try to race gem_close against workload submission.");
static uint32_t devid;
@@ -61,7 +65,9 @@ static uint64_t data_addr;
static uint64_t exec_addr;
static uint64_t data_addr;
+#ifdef __linux__
#define sigev_notify_thread_id _sigev_un._tid
+#endif
static void selfcopy(int fd, uint32_t ctx, uint32_t handle, int loops)
{