drm/gem_shmem: Use a writecombine mapping for ->vaddr
commitbe7d9f05c53e6fc88525f8e55cf2dae937761799
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 29 May 2019 06:51:21 +0000 (29 08:51 +0200)
committerRob Herring <robh@kernel.org>
Mon, 10 Jun 2019 15:14:01 +0000 (10 09:14 -0600)
treec0fb452c203168f200831d604b62712d9f03610e
parent652b8b086538c8a10de5aa5cbdaef79333b46358
drm/gem_shmem: Use a writecombine mapping for ->vaddr

Right now, the BO is mapped as a cached region when ->vmap() is called
and the underlying object is not a dmabuf.
Doing that makes cache management a bit more complicated (you'd need
to call dma_map/unmap_sg() on the ->sgt field everytime the BO is about
to be passed to the GPU/CPU), so let's map the BO with writecombine
attributes instead (as done in most drivers).

Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190529065121.13485-1-boris.brezillon@collabora.com
drivers/gpu/drm/drm_gem_shmem_helper.c