]> 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)
commit79d6f77423bf04f24347e15b90796a169517eba8
treea0fccbb4bbbdb067c68070e53d64844659b9f70e
parent9029817026ff551c1688e261d3a0b1a3cfa9ebc5
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