summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-05-08 17:04:44 +0300
committerMarek Szyprowski <m.szyprowski@samsung.com>2020-09-10 09:17:48 +0300
commitd46e7ae24b81533d21edfa90914d27efa0c5f85d (patch)
treea97b32329877f5d95b9c41c7507d5672dba2754e /include/drm
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff)
downloadlinux-d46e7ae24b81533d21edfa90914d27efa0c5f85d.tar.xz
drm: prime: add common helper to check scatterlist contiguity
It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_prime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 9af7422b44cf..47ef11614627 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -92,6 +92,8 @@ struct sg_table *drm_prime_pages_to_sg(struct page **pages, unsigned int nr_page
struct dma_buf *drm_gem_prime_export(struct drm_gem_object *obj,
int flags);
+unsigned long drm_prime_get_contiguous_size(struct sg_table *sgt);
+
/* helper functions for importing */
struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
struct dma_buf *dma_buf,