aboutsummaryrefslogtreecommitdiff
path: root/graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c')
-rw-r--r--graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c b/graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c
new file mode 100644
index 000000000000..ce8508405f5a
--- /dev/null
+++ b/graphics/igt-gpu-tools/files/patch-tests_i915_kms__psr__stress__test.c
@@ -0,0 +1,32 @@
+--- tests/i915/kms_psr_stress_test.c.orig 2022-08-31 20:00:01 UTC
++++ tests/i915/kms_psr_stress_test.c
+@@ -6,7 +6,9 @@
+ #include <stdbool.h>
+ #include <stdio.h>
+ #include <string.h>
++#ifdef __linux__
+ #include <sys/timerfd.h>
++#endif
+
+ #define INVALIDATES_PER_SEC 15
+ #define FLIPS_PER_SEC 30
+@@ -18,6 +20,12 @@
+ #define FRAMEBUFFERS_LEN 60
+
+ #define DRAW_METHOD IGT_DRAW_BLT
++
++/* FreeBSD: POSIX TIMER */
++#ifdef __FreeBSD__
++#define timerfd_create(c, f) -1
++#define timerfd_settime(fd, f, n, o) -1
++#endif
+
+ typedef struct {
+ int drm_fd;
+@@ -374,4 +382,4 @@ igt_main
+ close(data.debugfs_fd);
+ close(data.drm_fd);
+ }
+-}
+\ No newline at end of file
++}