Changeset View
Changeset View
Standalone View
Standalone View
graphics/igt-gpu-tools/files/patch-lib_sw__sync.c
- This file was added.
--- lib/sw_sync.c.orig 2022-08-17 23:41:16 UTC | |||||
+++ lib/sw_sync.c | |||||
@@ -41,6 +41,10 @@ | |||||
#include "drmtest.h" | |||||
#include "ioctl_wrappers.h" | |||||
+#ifdef __FreeBSD__ | |||||
+#define ETIME ETIMEDOUT | |||||
+#endif | |||||
+ | |||||
/** | |||||
* SECTION:sw_sync | |||||
* @short_description: Software sync (fencing) support library | |||||
@@ -248,14 +252,18 @@ static void modprobe(const char *driver) | |||||
static void modprobe(const char *driver) | |||||
{ | |||||
+#ifdef __linux__ | |||||
igt_kmod_load(driver, NULL); | |||||
+#endif | |||||
} | |||||
static bool kernel_has_sw_sync(void) | |||||
{ | |||||
char buf[128]; | |||||
+#ifdef __linux__ | |||||
modprobe("sw_sync"); | |||||
+#endif | |||||
return kernel_sw_sync_path(buf, sizeof(buf)); | |||||
} |