Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286780
b: refs/heads/master
c: d54fbd4
h: refs/heads/master
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Jan 25, 2012
1 parent 844bbf0 commit 1309938
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 598781d71119827b454fd75d46f84755bca6f0c6
refs/heads/master: d54fbd49efe5c75bc7cf963bf065aef3fd22417a
19 changes: 11 additions & 8 deletions trunk/drivers/gpu/drm/radeon/radeon_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,22 +204,25 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib)

int radeon_ib_pool_init(struct radeon_device *rdev)
{
struct radeon_sa_manager tmp;
int i, r;

mutex_lock(&rdev->ib_pool.mutex);
if (rdev->ib_pool.ready) {
mutex_unlock(&rdev->ib_pool.mutex);
return 0;
}

r = radeon_sa_bo_manager_init(rdev, &rdev->ib_pool.sa_manager,
r = radeon_sa_bo_manager_init(rdev, &tmp,
RADEON_IB_POOL_SIZE*64*1024,
RADEON_GEM_DOMAIN_GTT);
if (r) {
mutex_unlock(&rdev->ib_pool.mutex);
return r;
}

mutex_lock(&rdev->ib_pool.mutex);
if (rdev->ib_pool.ready) {
mutex_unlock(&rdev->ib_pool.mutex);
radeon_sa_bo_manager_fini(rdev, &tmp);
return 0;
}

rdev->ib_pool.sa_manager = tmp;
INIT_LIST_HEAD(&rdev->ib_pool.sa_manager.sa_bo);
for (i = 0; i < RADEON_IB_POOL_SIZE; i++) {
rdev->ib_pool.ibs[i].fence = NULL;
rdev->ib_pool.ibs[i].idx = i;
Expand Down

0 comments on commit 1309938

Please sign in to comment.