summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilip Yang <Philip.Yang@amd.com>2024-04-19 23:27:00 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-04-30 16:58:08 +0300
commitb2dba064c9bdd18c7dd39066d25453af28451dbf (patch)
tree967ad85e697f5a8404d41a53f41fda38c4552259 /include
parentfbbbf6fb3f7c29c0d18cdb8e6217570cdc97961f (diff)
downloadlinux-b2dba064c9bdd18c7dd39066d25453af28451dbf.tar.xz
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 'include')
0 files changed, 0 insertions, 0 deletions