Skip to content

Commit 8273b40

Browse files
arunpravin24alexdeucher
authored andcommitted
drm/amdgpu: Fix for BO move issue
A user reported a bug on CAPE VERDE system where uvd_v3_1 IP component failed to initialize as there is an issue with BO move code from one memory to other. In function amdgpu_mem_visible() called by amdgpu_bo_move(), when there are no blocks to compare or if we have a single block then break the loop. Fixes: 312b4dc ("drm/amdgpu: Fix VRAM BO swap issue") Signed-off-by: Arunpravin Paneer Selvam <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2abe92c commit 8273b40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ static bool amdgpu_mem_visible(struct amdgpu_device *adev,
439439
while (cursor.remaining) {
440440
amdgpu_res_next(&cursor, cursor.size);
441441

442+
if (!cursor.remaining)
443+
break;
444+
442445
/* ttm_resource_ioremap only supports contiguous memory */
443446
if (end != cursor.start)
444447
return false;

0 commit comments

Comments
 (0)