aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_file.h
diff options
context:
space:
mode:
authorThomas Hellstrom (VMware) <thomas_os@shipmail.org>2020-03-24 18:49:26 +0100
committerThomas Hellstrom (VMware) <thomas_os@shipmail.org>2020-03-24 18:49:26 +0100
commitb182341667091c8edfb24a7caae600a2f08d7857 (patch)
treeb3feeb4a5e14baab835a8e593db2afd77b9a8921 /include/drm/drm_file.h
parentdrm/vmwgfx: Support huge page faults (diff)
downloadwireguard-linux-b182341667091c8edfb24a7caae600a2f08d7857.tar.xz
wireguard-linux-b182341667091c8edfb24a7caae600a2f08d7857.zip
drm: Add a drm_get_unmapped_area() helper
Unaligned virtual addresses makes it unlikely that huge page-table entries can be used. So align virtual buffer object address huge page boundaries to the underlying physical address huge page boundaries taking buffer object sizes into account to determine when it might be possible to use huge page-table entries. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Michal Hocko <mhocko@suse.com> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Ralph Campbell <rcampbell@nvidia.com> Cc: "Jérôme Glisse" <jglisse@redhat.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Thomas Hellstrom (VMware) <thomas_os@shipmail.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Acked-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'include/drm/drm_file.h')
-rw-r--r--include/drm/drm_file.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
index 19df8028a6c4..5aaf1c4593a9 100644
--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -391,4 +391,13 @@ void drm_send_event(struct drm_device *dev, struct drm_pending_event *e);
struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags);
+#ifdef CONFIG_MMU
+struct drm_vma_offset_manager;
+unsigned long drm_get_unmapped_area(struct file *file,
+ unsigned long uaddr, unsigned long len,
+ unsigned long pgoff, unsigned long flags,
+ struct drm_vma_offset_manager *mgr);
+#endif /* CONFIG_MMU */
+
+
#endif /* _DRM_FILE_H_ */