lib/media_spin: Move helper functions to gpu_fill library

Let's remove duplications introduced by moving media_spin helper
functions to gpu_fill. These were mainly the same functions
as for Gen8 media/gpgpu fill. gen8_render_flush from media_spin
was replaced by gen7_render_flush. The only functions that were
left intact are gen8_spin_curbe_buffer_data, gen8_emit_vfe_state_spin,
gen8_emit_media_objects_spin and gen8lp_emit_media_objects_spin.

v2: squashed patches 1 and 2 from v1
v3: updated commit msg

Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
diff --git a/lib/gpu_fill.h b/lib/gpu_fill.h
index 067d498..5335fe3 100644
--- a/lib/gpu_fill.h
+++ b/lib/gpu_fill.h
@@ -89,6 +89,10 @@
 		     unsigned width, unsigned height);
 
 uint32_t
+gen8_spin_curbe_buffer_data(struct intel_batchbuffer *batch,
+			    uint32_t iters);
+
+uint32_t
 gen8_fill_surface_state(struct intel_batchbuffer *batch,
 			struct igt_buf *buf,
 			uint32_t format,
@@ -110,11 +114,20 @@
 gen8_emit_vfe_state_gpgpu(struct intel_batchbuffer *batch);
 
 void
+gen8_emit_vfe_state_spin(struct intel_batchbuffer *batch);
+
+void
 gen8_emit_gpgpu_walk(struct intel_batchbuffer *batch,
 		     unsigned x, unsigned y,
 		     unsigned width, unsigned height);
 
 void
+gen8_emit_media_objects_spin(struct intel_batchbuffer *batch);
+
+void
+gen8lp_emit_media_objects_spin(struct intel_batchbuffer *batch);
+
+void
 gen9_emit_state_base_address(struct intel_batchbuffer *batch);
 
 #endif /* GPU_FILL_H */