diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 05:10:46 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-20 05:10:46 +0000 |
commit | 17f27256b1069054aacf996e69206c0419af7bd1 (patch) | |
tree | a846ce4ee62a0de167d9545425dc8e01799de7fe /sys/dev/pci | |
parent | ec716295b671f70323c6e597468916bfadefeaa8 (diff) |
drm/amdgpu: Fix comparison in amdgpu_res_cpu_visible
From Michel Daenzer
52c1af381cb8bf72f2600ea02ba03d05fee2d733 in linux-6.6.y/6.6.3
8d2c930735f850e5be6860aeb39b27ac73ca192f in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c index 7f90c3e977e..369f01f3298 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c @@ -432,7 +432,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev, amdgpu_res_first(res, 0, res->size, &cursor); while (cursor.remaining) { - if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size) + if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size) return false; amdgpu_res_next(&cursor, cursor.size); } |