FreeBSD/sys/dev/drm2/radeon/si.c
/**
 * si_get_gpu_clock - return GPU clock counter snapshot
 *
 * @rdev: radeon_device pointer
 *
 * Fetches a GPU clock counter snapshot (SI).
 * Returns the 64 bit clock counter snapshot.
 */
return GPU clock counter snapshot
@rdev: radeon_device pointer

Fetches a GPU clock counter snapshot (SI).
Returns the 64 bit clock counter snapshot.
return GPU clock counter snapshot @rdev : radeon_device pointer Fetches a GPU clock counter snapshot ( SI ) . Returns the 64 bit clock counter snapshot .
uint64_t si_get_gpu_clock(struct radeon_device *rdev)
{
	uint64_t clock;
	sx_xlock(&rdev->gpu_clock_mutex);
	WREG32(RLC_CAPTURE_GPU_CLOCK_COUNT, 1);
	clock = (uint64_t)RREG32(RLC_GPU_CLOCK_COUNT_LSB) |
	        ((uint64_t)RREG32(RLC_GPU_CLOCK_COUNT_MSB) << 32ULL);
	sx_xunlock(&rdev->gpu_clock_mutex);
	return clock;
}
uint64_t si_get_gpu_clock ( struct radeon_device * rdev ) { uint64_t clock ; sx_xlock ( & rdev -> gpu_clock_mutex ) ; WREG32 ( RLC_CAPTURE_GPU_CLOCK_COUNT , 1 ) ; clock = ( uint64_t ) RREG32 ( RLC_GPU_CLOCK_COUNT_LSB ) | ( ( uint64_t ) RREG32 ( RLC_GPU_CLOCK_COUNT_MSB ) << 32ULL ) ; sx_xunlock ( & rdev -> gpu_clock_mutex ) ; return clock ; }
si_get_gpu_clock - return GPU clock counter snapshot
 @rdev: radeon_device pointer
si_get_gpu_clock - return GPU clock counter snapshot @rdev : radeon_device pointer