summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-05-18 15:40:33 +0100
committerDave Airlie <airlied@redhat.com>2012-05-23 10:45:57 +0100
commit51ab7ba2673758561074184795bba5bac780a038 (patch)
tree698c399d22524b5ec018af82c89d6c5c8ff422a3 /include/drm
parent4d93914ae3db4a897ead4b1e33eca7cdfff4c6f7 (diff)
downloadlinux-51ab7ba2673758561074184795bba5bac780a038.tar.gz
linux-51ab7ba2673758561074184795bba5bac780a038.tar.bz2
linux-51ab7ba2673758561074184795bba5bac780a038.zip
drm/prime: introduce sg->pages/addr arrays helper
the ttm drivers need this currently, in order to get fault handling working and efficient. It also allows addrs to be NULL for devices like udl. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 15d91798dd31..31ad880ca2ef 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1558,6 +1558,8 @@ extern int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
extern int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
+extern int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages,
+ dma_addr_t *addrs, int max_pages);
extern struct sg_table *drm_prime_pages_to_sg(struct page **pages, int nr_pages);
extern void drm_prime_gem_destroy(struct drm_gem_object *obj, struct sg_table *sg);