forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-09 244b2c5ca8b14627e4a17755e5922221e121c771
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 {