drm/radeon: Fix off-by-one errors in radeon_vm_bo_set_addr
authorFelix Kuehling <Felix.Kuehling@amd.com>
Mon, 23 Nov 2015 22:39:11 +0000 (17:39 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 1 Feb 2016 17:38:41 +0000 (12:38 -0500)
commit47062c9c6cf99ef7fa09a2458a26bb95edb02759
tree6703dd196d7fb47cdcd921abb33f966239cb8350
parentdc25a0a0d2bc9296d0d66cbe7a17f698122d3c41
drm/radeon: Fix off-by-one errors in radeon_vm_bo_set_addr

[ Upstream commit 42ef344c0994cc453477afdc7a8eadc578ed0257 ]

eoffset is sometimes treated as the last address inside the address
range, and sometimes as the first address outside the range. This
was resulting in errors when a test filled up the entire address
space. Make it consistent to always be the last address within the
range. Also fixed related errors when checking the VA limit and in
radeon_vm_fence_pts.

Signed-off-by: Felix.Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/radeon/radeon_vm.c