r600g: userspace fence to avoid kernel call for testing bo busy status

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index ea2cf34..a693a5b 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -64,9 +64,9 @@
 	unsigned			map_count;
 	void				*data;
 	struct list_head		fencedlist;
+	unsigned			fence;
+	struct r600_context		*ctx;
 	boolean				shared;
-	int64_t				last_busy;
-	boolean				set_busy;
 	struct r600_reloc		*reloc;
 	unsigned			reloc_id;
 	unsigned			last_flush;
@@ -103,6 +103,7 @@
 							 uint32_t handle);
 
 /* r600_hw_context.c */
+int r600_context_init_fence(struct r600_context *ctx);
 void r600_context_bo_reloc(struct r600_context *ctx, u32 *pm4, struct r600_bo *rbo);
 void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
 				unsigned flush_mask, struct r600_bo *rbo);