.. | .. |
---|
29 | 29 | #include <linux/spinlock.h> |
---|
30 | 30 | #include <linux/types.h> |
---|
31 | 31 | |
---|
| 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 | + |
---|
32 | 44 | struct drm_file; |
---|
33 | 45 | |
---|
34 | 46 | struct drm_vma_offset_file { |
---|