aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorPhilip Yang <Philip.Yang@amd.com>2024-04-19 16:27:00 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-04-30 09:58:08 -0400
commitb2dba064c9bdd18c7dd39066d25453af28451dbf (patch)
tree967ad85e697f5a8404d41a53f41fda38c4552259 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parentfbbbf6fb3f7c29c0d18cdb8e6217570cdc97961f (diff)
drm/amdgpu: Handle sg size limit for contiguous allocation
Define macro AMDGPU_MAX_SG_SEGMENT_SIZE 2GB, because struct scatterlist length is unsigned int, and some users of it cast to a signed int, so every segment of sg table is limited to size 2GB maximum. For contiguous VRAM allocation, don't limit the max buddy block size in order to get contiguous VRAM memory. To workaround the sg table segment size limit, allocate multiple segments if contiguous size is bigger than AMDGPU_MAX_SG_SEGMENT_SIZE. Signed-off-by: Philip Yang <Philip.Yang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
0 files changed, 0 insertions, 0 deletions