sys/dev/drm/radeon/radeon_fence.c
/**
 * radeon_fence_count_emitted - get the count of emitted fences
 *
 * @rdev: radeon device pointer
 * @ring: ring index the fence is associated with
 *
 * Get the number of fences emitted on the requested ring (all asics).
 * Returns the number of emitted fences on the ring.  Used by the
 * dynpm code to ring track activity.
 */
get the count of emitted fences
@rdev: radeon device pointer
@ring: ring index the fence is associated with

Get the number of fences emitted on the requested ring (all asics).
Returns the number of emitted fences on the ring.  Used by the
dynpm code to ring track activity.
get the count of emitted fences @rdev : radeon device pointer @ring : ring index the fence is associated with Get the number of fences emitted on the requested ring ( all asics ) . Returns the number of emitted fences on the ring . Used by the dynpm code to ring track activity .
unsigned radeon_fence_count_emitted(struct radeon_device *rdev, int ring)
{
	uint64_t emitted;
	radeon_fence_process(rdev, ring);
	emitted = rdev->fence_drv[ring].sync_seq[ring]
		- atomic64_read(&rdev->fence_drv[ring].last_seq);
	if (emitted > 0x10000000) {
		emitted = 0x10000000;
	}
	return (unsigned)emitted;
}
unsigned radeon_fence_count_emitted ( struct radeon_device * rdev , int ring ) { uint64_t emitted ; radeon_fence_process ( rdev , ring ) ; emitted = rdev -> fence_drv [ ring ] . sync_seq [ ring ] - atomic64_read ( & rdev -> fence_drv [ ring ] . last_seq ) ; if ( emitted > 0x10000000 ) { emitted = 0x10000000 ; } return ( unsigned ) emitted ; }
radeon_fence_count_emitted - get the count of emitted fences
 @rdev: radeon device pointer
 @ring: ring index the fence is associated with
radeon_fence_count_emitted - get the count of emitted fences @rdev : radeon device pointer @ring : ring index the fence is associated with
/* We are not protected by ring lock when reading the last sequence
	 * but it's ok to report slightly wrong fence count here.
	 */ /* to avoid 32bits warp around */