]> git.baikalelectronics.ru Git - kernel.git/commit
drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS
authorNoralf Trønnes <noralf@tronnes.org>
Sat, 10 Nov 2018 14:56:46 +0000 (15:56 +0100)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 20 Nov 2018 13:57:25 +0000 (14:57 +0100)
commita64217f70c9f9e3f79653d113577b9efef32ad59
treea0fccbb4bbbdb067c68070e53d64844659b9f70e
parent38cfd2e139c9c0d755f4655cf4aea8270e021db0
drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS

This adds functionality to the CMA helper which ensures that the kernel
virtual address is set on the CMA GEM object also for imported buffers.

The drivers have been audited to ensure that none set ->vaddr on imported
buffers, making the conditional dma_buf_vunmap() call in
drm_gem_cma_free_object() safe.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20181110145647.17580-5-noralf@tronnes.org
drivers/gpu/drm/drm_gem_cma_helper.c
include/drm/drm_gem_cma_helper.h