/** * radeon_ib_pool_init - Init the IB (Indirect Buffer) pool * * @rdev: radeon_device pointer * * Initialize the suballocator to manage a pool of memory * for use as IBs (all asics). * Returns 0 on success, error on failure. */ int radeon_ib_pool_init(struct radeon_device *rdev) { int r; if (rdev->ib_pool_ready) { return 0; } r = radeon_sa_bo_manager_init(rdev, &rdev->ring_tmp_bo, RADEON_IB_POOL_SIZE*64*1024, RADEON_GEM_DOMAIN_GTT); if (r) { return r; } r = radeon_sa_bo_manager_start(rdev, &rdev->ring_tmp_bo); if (r) { return r; } rdev->ib_pool_ready = true; if (radeon_debugfs_sa_init(rdev)) { dev_err(rdev->dev, "failed to register debugfs file for SA\n"); } return 0; }
int radeon_ib_pool_start(struct radeon_device *rdev) { return radeon_sa_bo_manager_start(rdev, &rdev->ring_tmp_bo); }