drm/amdgpu: add independent DMA-buf import v9
authorChristian König <christian.koenig@amd.com>
Thu, 7 Jun 2018 08:28:47 +0000 (10:28 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 28 Oct 2019 15:59:43 +0000 (16:59 +0100)
commita39414716ca08c08ce09d9e8409ef525e7a77eaf
treed752a8f2a4a90e5eb1d024c54a0676bcaba9dc63
parent6e6db2722c287122bfc4d51e685872fb5031cf18
drm/amdgpu: add independent DMA-buf import v9

Instead of relying on the DRM functions just implement our own import
functions. This prepares support for taking care of unpinned DMA-buf.

v2: enable for all exporters, not just amdgpu, fix invalidation
    handling, lock reservation object while setting callback
v3: change to new dma_buf attach interface
v4: split out from unpinned DMA-buf work
v5: rebased and cleanup on new DMA-buf interface
v6: squash with invalidation callback change,
    stop using _(map|unmap)_locked
v7: drop invalidations when the BO is already in system domain
v8: rebase on new DMA-buf patch and drop move notification
v9: cleanup comments

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/337948/
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c