diff options
author | Christian König | 2014-02-20 18:47:14 +0100 |
---|---|---|
committer | Alex Deucher | 2014-02-27 20:05:28 +0100 |
commit | 5e386b574cf7e1593e1296e5b0feea4108ed6ad8 (patch) | |
tree | ff9cb94c238b86530896eabae827f022e9ba8e8b /drivers/gpu/drm/radeon/radeon_kms.c | |
parent | drm/radeon: print the supported atpx function mask (diff) | |
download | kernel-qcow2-linux-5e386b574cf7e1593e1296e5b0feea4108ed6ad8.tar.gz kernel-qcow2-linux-5e386b574cf7e1593e1296e5b0feea4108ed6ad8.tar.xz kernel-qcow2-linux-5e386b574cf7e1593e1296e5b0feea4108ed6ad8.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 6 |
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) radeon_vm_init(rdev, &fpriv->vm); + r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false); + if (r) + return r; + /* map the ib pool buffer read only into * virtual address space */ 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) r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET, RADEON_VM_PAGE_READABLE | RADEON_VM_PAGE_SNOOPED); + + radeon_bo_unreserve(rdev->ring_tmp_bo.bo); if (r) { radeon_vm_fini(rdev, &fpriv->vm); kfree(fpriv); |