Changeset View
Changeset View
Standalone View
Standalone View
graphics/igt-gpu-tools/files/patch-lib_drmtest.c
- This file was added.
--- lib/drmtest.c.orig 2022-08-17 23:41:16 UTC | |||||
+++ lib/drmtest.c | |||||
@@ -54,7 +54,9 @@ | |||||
#include "igt_debugfs.h" | |||||
#include "igt_device.h" | |||||
#include "igt_gt.h" | |||||
+#ifdef __linux__ | |||||
#include "igt_kmod.h" | |||||
+#endif | |||||
#include "igt_params.h" | |||||
#include "igt_sysfs.h" | |||||
#include "igt_device_scan.h" | |||||
@@ -168,13 +170,19 @@ static int modprobe(const char *driver) | |||||
static int modprobe(const char *driver) | |||||
{ | |||||
+#ifdef __linux__ | |||||
return igt_kmod_load(driver, ""); | |||||
+#elif defined(__FreeBSD__) | |||||
+ return -ENOSYS; | |||||
+#endif | |||||
} | |||||
static void modprobe_i915(const char *name) | |||||
{ | |||||
+#ifdef __linux__ | |||||
/* When loading i915, we also want to load snd-hda et al */ | |||||
igt_i915_driver_load(NULL); | |||||
+#endif | |||||
} | |||||
static const struct module { |