Mesa (master): anv: Include linux/sync_file.h instead of cut and pasting contents
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 1 19:13:07 UTC 2020
Module: Mesa
Branch: master
Commit: 812cf5f522abd006fd9f3cb7bbcad797bd8730fb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=812cf5f522abd006fd9f3cb7bbcad797bd8730fb
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Wed Apr 29 15:16:04 2020 -0700
anv: Include linux/sync_file.h instead of cut and pasting contents
Linux 4.7 has been out for a long time, this is probably safe to
depend on at this point, rather than cut and pasting the contents.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3802>
---
src/intel/vulkan/anv_gem.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c
index 3ad8400caf3..050b2fa9944 100644
--- a/src/intel/vulkan/anv_gem.c
+++ b/src/intel/vulkan/anv_gem.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#include <linux/sync_file.h>
#include "anv_private.h"
#include "common/gen_defines.h"
@@ -461,24 +462,6 @@ anv_gem_reg_read(struct anv_device *device, uint32_t offset, uint64_t *result)
return ret;
}
-#ifndef SYNC_IOC_MAGIC
-/* duplicated from linux/sync_file.h to avoid build-time dependency
- * on new (v4.7) kernel headers. Once distro's are mostly using
- * something newer than v4.7 drop this and #include <linux/sync_file.h>
- * instead.
- */
-struct sync_merge_data {
- char name[32];
- __s32 fd2;
- __s32 fence;
- __u32 flags;
- __u32 pad;
-};
-
-#define SYNC_IOC_MAGIC '>'
-#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data)
-#endif
-
int
anv_gem_sync_file_merge(struct anv_device *device, int fd1, int fd2)
{
More information about the mesa-commit
mailing list