[Intel-gfx] [PATCH 06/28] lib: make media_fill.h an internal header

Daniel Vetter daniel.vetter at ffwll.ch
Sun Mar 23 15:18:40 CET 2014


Same deal as with rendercopy.h.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 .../intel-gpu-tools/intel-gpu-tools-docs.xml         |  1 -
 lib/Makefile.sources                                 |  1 -
 lib/intel_batchbuffer.c                              | 13 +++++++++++++
 lib/intel_batchbuffer.h                              |  8 ++++++++
 lib/media_fill.c                                     | 14 --------------
 lib/media_fill.h                                     |  8 --------
 tests/gem_media_fill.c                               | 20 ++++++++++++++++++--
 7 files changed, 39 insertions(+), 26 deletions(-)
 delete mode 100644 lib/media_fill.c

diff --git a/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml b/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml
index 468844ec6bd1..0f117f71c9f9 100644
--- a/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml
+++ b/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml
@@ -24,7 +24,6 @@
     <xi:include href="xml/intel_batchbuffer.xml"/>
     <xi:include href="xml/intel_chipset.xml"/>
     <xi:include href="xml/intel_gpu_tools.xml"/>
-    <xi:include href="xml/media_fill.xml"/>
 
   </chapter>
   <index id="api-index-full">
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 2b700c6c2726..e6ada3c900b4 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -22,7 +22,6 @@ libintel_tools_la_SOURCES = 	\
 	intel_reg.h		\
 	ioctl_wrappers.c	\
 	ioctl_wrappers.h	\
-	media_fill.c            \
 	media_fill.h            \
 	media_fill_gen7.c       \
 	media_fill_gen8.c       \
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index df036013792d..29740bd93bd3 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -38,6 +38,7 @@
 #include "intel_chipset.h"
 #include "intel_reg.h"
 #include "rendercopy.h"
+#include "media_fill.h"
 #include <i915_drm.h>
 
 /**
@@ -403,3 +404,15 @@ render_copyfunc_t get_render_copyfunc(int devid)
 
 	return copy;
 }
+
+media_fillfunc_t get_media_fillfunc(int devid)
+{
+	media_fillfunc_t fill = NULL;
+
+	if (IS_GEN8(devid))
+		fill = gen8_media_fillfunc;
+	else if (IS_GEN7(devid))
+		fill = gen7_media_fillfunc;
+
+	return fill;
+}
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
index 5e02269c24ca..4b183122f6c0 100644
--- a/lib/intel_batchbuffer.h
+++ b/lib/intel_batchbuffer.h
@@ -224,4 +224,12 @@ typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch,
 
 render_copyfunc_t get_render_copyfunc(int devid);
 
+typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch,
+				struct scratch_buf *dst,
+				unsigned x, unsigned y,
+				unsigned width, unsigned height,
+				uint8_t color);
+
+media_fillfunc_t get_media_fillfunc(int devid);
+
 #endif
diff --git a/lib/media_fill.c b/lib/media_fill.c
deleted file mode 100644
index 084237f7a982..000000000000
--- a/lib/media_fill.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "i830_reg.h"
-#include "media_fill.h"
-
-media_fillfunc_t get_media_fillfunc(int devid)
-{
-	media_fillfunc_t fill = NULL;
-
-	if (IS_GEN8(devid))
-		fill = gen8_media_fillfunc;
-	else if (IS_GEN7(devid))
-		fill = gen7_media_fillfunc;
-
-	return fill;
-}
diff --git a/lib/media_fill.h b/lib/media_fill.h
index 9115776a93d4..4b2fd3a4fb30 100644
--- a/lib/media_fill.h
+++ b/lib/media_fill.h
@@ -19,14 +19,6 @@
 #include "intel_batchbuffer.h"
 #include "intel_gpu_tools.h"
 
-typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch,
-				struct scratch_buf *dst,
-				unsigned x, unsigned y,
-				unsigned width, unsigned height,
-				uint8_t color);
-
-media_fillfunc_t get_media_fillfunc(int devid);
-
 void
 gen8_media_fillfunc(struct intel_batchbuffer *batch,
 		struct scratch_buf *dst,
diff --git a/tests/gem_media_fill.c b/tests/gem_media_fill.c
index 1c3fe609f5e2..df891290c11c 100644
--- a/tests/gem_media_fill.c
+++ b/tests/gem_media_fill.c
@@ -32,8 +32,24 @@
 
 #include <stdbool.h>
 #include <unistd.h>
-
-#include "media_fill.h"
+#include <assert.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <getopt.h>
+#include "drm.h"
+#include "i915_drm.h"
+#include "drmtest.h"
+#include "intel_bufmgr.h"
+#include "intel_batchbuffer.h"
+#include "intel_gpu_tools.h"
 
 #define WIDTH 64
 #define STRIDE (WIDTH)
-- 
1.8.5.2




More information about the Intel-gfx mailing list