hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/drm/drm_vma_manager.h
....@@ -29,6 +29,18 @@
2929 #include <linux/spinlock.h>
3030 #include <linux/types.h>
3131
32
+/* We make up offsets for buffer objects so we can recognize them at
33
+ * mmap time. pgoff in mmap is an unsigned long, so we need to make sure
34
+ * that the faked up offset will fit
35
+ */
36
+#if BITS_PER_LONG == 64
37
+#define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFFUL >> PAGE_SHIFT) + 1)
38
+#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFFUL >> PAGE_SHIFT) * 256)
39
+#else
40
+#define DRM_FILE_PAGE_OFFSET_START ((0xFFFFFFFUL >> PAGE_SHIFT) + 1)
41
+#define DRM_FILE_PAGE_OFFSET_SIZE ((0xFFFFFFFUL >> PAGE_SHIFT) * 16)
42
+#endif
43
+
3244 struct drm_file;
3345
3446 struct drm_vma_offset_file {