]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix VRAM BO swap issue
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Tue, 4 Oct 2022 14:33:39 +0000 (07:33 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Oct 2022 16:07:37 +0000 (12:07 -0400)
commit02ae455f3fb35fb87410e0c34518f73b00868cbd
tree9eb4fe8bd531019100a25ab8298057972c2caea3
parent9189e4bf4b04d8ad1866b9697d0489b59f258531
drm/amdgpu: Fix VRAM BO swap issue

DRM buddy manager allocates the contiguous memory requests in
a single block or multiple blocks. So for the ttm move operation
(incase of low vram memory) we should consider all the blocks to
compute the total memory size which compared with the struct
ttm_resource num_pages in order to verify that the blocks are
contiguous for the eviction process.

v2: Added a Fixes tag
v3: Rewrite the code to save a bit of calculations and
    variables (Christian)

Fixes: 73e808d15907 ("drm/amdgpu: add drm buddy support to amdgpu")
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c