lib/igt_gt: add intel_measure_ring_size

The logic to measure the ring size is replicated almost identically in
several tests. Adding it as a common function will make the code
cleaner.

The tests are updated in follow up patches.

v2:
	- Move into a new file: 'gem_ring'. (Chris)

v3:
	- Rename ring measure function. (Chris)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
4 files changed