igt/prime_self_import: Ensure driver state is consistent between counts
igt/prime_self_import: Ensure driver state is consistent between counts

Similar to gem_flink_race, we need to make sure that when we count
objects, the driver is in an identical state. We do this by flushing all
work before counting.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90003
Signed-off-by: Chris Wilson <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-wilson.co.uk>

chenxianqin/intel-gpu-tools,chenxianqin/intel-gpu-tools,mv0/intel-gpu-tools,tiagovignatti/intel-gpu-tools,mv0/intel-gpu-tools,dlespiau/checkmate-test-igt,mv0/intel-gpu-tools,tiagovignatti/intel-gpu-tools,dlespiau/checkmate-test-igt,tiagovignatti/intel-gpu-tools,mv0/intel-gpu-tools,dlespiau/checkmate-test-igt,tiagovignatti/intel-gpu-tools,dlespiau/checkmate-test-igt,chenxianqin/intel-gpu-tools,chenxianqin/intel-gpu-tools