sys/dev/drm/radeon/radeon_fence.c
/**
 * radeon_fence_read - read a fence value
 *
 * @rdev: radeon_device pointer
 * @ring: ring index the fence is associated with
 *
 * Reads a fence value from memory or a scratch register (all asics).
 * Returns the value of the fence read from memory or register.
 */
read a fence value
@rdev: radeon_device pointer
@ring: ring index the fence is associated with

Reads a fence value from memory or a scratch register (all asics).
Returns the value of the fence read from memory or register.
read a fence value @rdev : radeon_device pointer @ring : ring index the fence is associated with Reads a fence value from memory or a scratch register ( all asics ) . Returns the value of the fence read from memory or register .
static u32 radeon_fence_read(struct radeon_device *rdev, int ring)
{
	struct radeon_fence_driver *drv = &rdev->fence_drv[ring];
	u32 seq = 0;
	if (likely(rdev->wb.enabled || !drv->scratch_reg)) {
		seq = le32_to_cpu(*drv->cpu_addr);
	} else {
		seq = RREG32(drv->scratch_reg);
	}
	return seq;
}
static u32 radeon_fence_read ( struct radeon_device * rdev , int ring ) { struct radeon_fence_driver * drv = & rdev -> fence_drv [ ring ] ; u32 seq = 0 ; if ( likely ( rdev -> wb . enabled || ! drv -> scratch_reg ) ) { seq = le32_to_cpu ( * drv -> cpu_addr ) ; } else { seq = RREG32 ( drv -> scratch_reg ) ; } return seq ; }
radeon_fence_read - read a fence value
 @rdev: radeon_device pointer
 @ring: ring index the fence is associated with
radeon_fence_read - read a fence value @rdev : radeon_device pointer @ring : ring index the fence is associated with