drm/radeon: fix vm buffer size estimation
authorChristian König <christian.koenig@amd.com>
Sat, 31 May 2014 18:38:34 +0000 (20:38 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 2 Jun 2014 08:54:02 +0000 (10:54 +0200)
Only relevant if we got VM_BLOCK_SIZE>9, but better save than sorry.

Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/radeon/radeon_vm.c

index 1f426696de36e200453af920ea8fb7256d5151b1..1491be90755e3f64e85700dc3998916a90d30895 100644 (file)
@@ -132,7 +132,7 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
        struct radeon_cs_reloc *list;
        unsigned i, idx;
 
-       list = kmalloc_array(vm->max_pde_used + 1,
+       list = kmalloc_array(vm->max_pde_used + 2,
                             sizeof(struct radeon_cs_reloc), GFP_KERNEL);
        if (!list)
                return NULL;