OSDN Git Service

drm/amdgpu: Use iterator methods exposed by amdgpu_res_cursor.h in building SG_TABLE...
authorRamesh Errabolu <Ramesh.Errabolu@amd.com>
Mon, 12 Apr 2021 23:23:05 +0000 (18:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Apr 2021 20:32:44 +0000 (16:32 -0400)
commitba5b662c36de37060296bc8b2518c51ac2c2d279
treeef426b9c6f65d7944564b2ebc9a5a7cc4043ecf8
parent546aa546b05aef582956f44ad917c0eee2cb8027
drm/amdgpu: Use iterator methods exposed by amdgpu_res_cursor.h in building SG_TABLE's for a VRAM BO

Extend current implementation of SG_TABLE construction method to
allow exportation of sub-buffers of a VRAM BO. This capability will
enable logical partitioning of a VRAM BO into multiple non-overlapping
sub-buffers. One example of this use case is to partition a VRAM BO
into two sub-buffers, one for SRC and another for DST.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c