FreeBSD/sys/dev/drm2/radeon/radeon_fence.c
/**
 * radeon_fence_driver_init - init the fence driver
 * for all possible rings.
 *
 * @rdev: radeon device pointer
 *
 * Init the fence driver for all possible rings (all asics).
 * Not all asics have all rings, so each asic will only
 * start the fence driver on the rings it has using
 * radeon_fence_driver_start_ring().
 * Returns 0 for success.
 */
init the fence driver
for all possible rings.

@rdev: radeon device pointer

Init the fence driver for all possible rings (all asics).
Not all asics have all rings, so each asic will only
start the fence driver on the rings it has using
radeon_fence_driver_start_ring().
Returns 0 for success.
init the fence driver for all possible rings . @rdev : radeon device pointer Init the fence driver for all possible rings ( all asics ) . Not all asics have all rings so each asic will only start the fence driver on the rings it has using radeon_fence_driver_start_ring () . Returns 0 for success .
int radeon_fence_driver_init(struct radeon_device *rdev)
{
	int ring;
	mtx_init(&rdev->fence_queue_mtx,
	    "drm__radeon_device__fence_queue_mtx", NULL, MTX_DEF);
	cv_init(&rdev->fence_queue, "drm__radeon_device__fence_queue");
	for (ring = 0; ring < RADEON_NUM_RINGS; ring++) {
		radeon_fence_driver_init_ring(rdev, ring);
	}
	if (radeon_debugfs_fence_init(rdev)) {
		dev_err(rdev->dev, "fence debugfs file creation failed\n");
	}
	return 0;
}
int radeon_fence_driver_init ( struct radeon_device * rdev ) { int ring ; mtx_init ( & rdev -> fence_queue_mtx , " " , NULL , MTX_DEF ) ; cv_init ( & rdev -> fence_queue , " " ) ; for ( ring = 0 ; ring < RADEON_NUM_RINGS ; ring ++ ) { radeon_fence_driver_init_ring ( rdev , ring ) ; } if ( radeon_debugfs_fence_init ( rdev ) ) { dev_err ( rdev -> dev , " \n " ) ; } return 0 ; }
radeon_fence_driver_init - init the fence driver
 for all possible rings.
radeon_fence_driver_init - init the fence driver for all possible rings .