aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-02-26 16:47:50 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-02-27 13:54:38 +0100
commit1cad629257e76025bcbf490c58de550fb67d4d0e (patch)
treead269344138ee6a0d8b11fb925a8e6dbab3921ff /include
parentdma-buf: free dmabuf->name in dma_buf_release() (diff)
downloadlinux-dev-1cad629257e76025bcbf490c58de550fb67d4d0e.tar.xz
linux-dev-1cad629257e76025bcbf490c58de550fb67d4d0e.zip
drm/shmem: add support for per object caching flags.
Add map_cached bool to drm_gem_shmem_object, to request cached mappings on a per-object base. Check the flag before adding writecombine to pgprot bits. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Guillaume Gardet <Guillaume.Gardet@arm.com> Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-2-kraxel@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_gem_shmem_helper.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
index e34a7b7f848a..294b2931c4cc 100644
--- a/include/drm/drm_gem_shmem_helper.h
+++ b/include/drm/drm_gem_shmem_helper.h
@@ -96,6 +96,11 @@ struct drm_gem_shmem_object {
* The address are un-mapped when the count reaches zero.
*/
unsigned int vmap_use_count;
+
+ /**
+ * @map_cached: map object cached (instead of using writecombine).
+ */
+ bool map_cached;
};
#define to_drm_gem_shmem_obj(obj) \