linux-stable/drivers/gpu/drm/ttm
Thomas Zimmermann 43676605f8 drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers
The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in kernel
address space. The mapping's address is returned as struct dma_buf_map.
Each function is a simplified version of TTM's existing kmap code. Both
functions respect the memory's location ani/or writecombine flags.

On top TTM's functions, GEM TTM helpers got drm_gem_ttm_{vmap,vunmap}(),
two helpers that convert a GEM object into the TTM BO and forward the call
to TTM's vmap/vunmap. These helpers can be dropped into the rsp GEM object
callbacks.

v5:
	* use size_t for storing mapping size (Christian)
	* ignore premapped memory areas correctly in ttm_bo_vunmap()
	* rebase onto latest TTM interfaces (Christian)
	* remove BUG() from ttm_bo_vmap() (Christian)
v4:
	* drop ttm_kmap_obj_to_dma_buf() in favor of vmap helpers (Daniel,
	  Christian)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201103093015.1063-6-tzimmermann@suse.de
2020-11-09 09:17:36 +01:00
..
Makefile drm/ttm: nuke old page allocator 2020-10-29 15:57:57 +01:00
ttm_agp_backend.c drm/ttm: nuke old page allocator 2020-10-29 15:57:57 +01:00
ttm_bo.c drm/ttm: replace context flags with bools v2 2020-11-04 11:23:25 +01:00
ttm_bo_util.c drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers 2020-11-09 09:17:36 +01:00
ttm_bo_vm.c drm/ttm: replace context flags with bools v2 2020-11-04 11:23:25 +01:00
ttm_execbuf_util.c drm/ttm/amdgpu: consolidate ttm reserve paths 2020-08-06 12:16:31 +10:00
ttm_memory.c drm/ttm: replace context flags with bools v2 2020-11-04 11:23:25 +01:00
ttm_module.c
ttm_pool.c drm/ttm: rework no_retry handling v2 2020-11-04 11:22:46 +01:00
ttm_range_manager.c drm/ttm: nuke ttm_bo_evict_mm and rename mgr function v3 2020-10-07 13:53:08 +02:00
ttm_resource.c drm/ttm: replace context flags with bools v2 2020-11-04 11:23:25 +01:00
ttm_tt.c drm/ttm: rework no_retry handling v2 2020-11-04 11:22:46 +01:00