Skip to content

Commit 8d2c930

Browse files
Michel Dänzeralexdeucher
authored andcommitted
drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible
It incorrectly claimed a resource isn't CPU visible if it's located at the very end of CPU visible VRAM. Fixes: a6ff969 ("drm/amdgpu: fix visible VRAM handling during faults") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3343 Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reported-and-Tested-by: Jeremy Day <jsday@noreason.ca> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> CC: stable@vger.kernel.org
1 parent be4a2a8 commit 8d2c930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev,
427427

428428
amdgpu_res_first(res, 0, res->size, &cursor);
429429
while (cursor.remaining) {
430-
if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size)
430+
if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size)
431431
return false;
432432
amdgpu_res_next(&cursor, cursor.size);
433433
}

0 commit comments

Comments
 (0)