drm/radeon: fix VA range check

The end offset is exclusive not inclusive.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
This commit is contained in:
Christian König 2012-09-11 16:09:57 +02:00 committed by Alex Deucher
parent 1678dbc22e
commit a36e70b2e5
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ int radeon_vm_bo_add(struct radeon_device *rdev,
head = &vm->va; head = &vm->va;
last_offset = 0; last_offset = 0;
list_for_each_entry(tmp, &vm->va, vm_list) { list_for_each_entry(tmp, &vm->va, vm_list) {
if (bo_va->soffset >= last_offset && bo_va->eoffset < tmp->soffset) { if (bo_va->soffset >= last_offset && bo_va->eoffset <= tmp->soffset) {
/* bo can be added before this one */ /* bo can be added before this one */
break; break;
} }