aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-02-20 12:47:14 -0500
committerAlex Deucher <alexander.deucher@amd.com>2014-02-27 14:05:28 -0500
commit5e386b574cf7e1593e1296e5b0feea4108ed6ad8 (patch)
treeff9cb94c238b86530896eabae827f022e9ba8e8b
parent9f050c7f9738ffa746c63415136645ad231b1348 (diff)
drm/radeon: fix missing bo reservation
Otherwise we might get a crash here. Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 114d1672d616..2aecd6dc2610 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -537,6 +537,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
537 537
538 radeon_vm_init(rdev, &fpriv->vm); 538 radeon_vm_init(rdev, &fpriv->vm);
539 539
540 r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
541 if (r)
542 return r;
543
540 /* map the ib pool buffer read only into 544 /* map the ib pool buffer read only into
541 * virtual address space */ 545 * virtual address space */
542 bo_va = radeon_vm_bo_add(rdev, &fpriv->vm, 546 bo_va = radeon_vm_bo_add(rdev, &fpriv->vm,
@@ -544,6 +548,8 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
544 r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET, 548 r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET,
545 RADEON_VM_PAGE_READABLE | 549 RADEON_VM_PAGE_READABLE |
546 RADEON_VM_PAGE_SNOOPED); 550 RADEON_VM_PAGE_SNOOPED);
551
552 radeon_bo_unreserve(rdev->ring_tmp_bo.bo);
547 if (r) { 553 if (r) {
548 radeon_vm_fini(rdev, &fpriv->vm); 554 radeon_vm_fini(rdev, &fpriv->vm);
549 kfree(fpriv); 555 kfree(fpriv);