And move the public interfaces into intel_batchbuffer.[hc].
A bit messy since we are fairly inconsistent with our header #include
handling.
Also exclude rendercopy.h from the documentation.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
<xi:include href="xml/intel_chipset.xml"/>
<xi:include href="xml/intel_gpu_tools.xml"/>
<xi:include href="xml/media_fill.xml"/>
- <xi:include href="xml/rendercopy.xml"/>
</chapter>
<index id="api-index-full">
#include "intel_bufmgr.h"
#include "intel_chipset.h"
#include "intel_reg.h"
+#include "rendercopy.h"
#include <i915_drm.h>
/**
dst_bo, 0, 0, 4096,
4096/4, size/4096, 32);
}
+
+render_copyfunc_t get_render_copyfunc(int devid)
+{
+ render_copyfunc_t copy = NULL;
+
+ if (IS_GEN2(devid))
+ copy = gen2_render_copyfunc;
+ else if (IS_GEN3(devid))
+ copy = gen3_render_copyfunc;
+ else if (IS_GEN6(devid))
+ copy = gen6_render_copyfunc;
+ else if (IS_GEN7(devid))
+ copy = gen7_render_copyfunc;
+ else if (IS_GEN8(devid))
+ copy = gen8_render_copyfunc;
+
+ return copy;
+}
#define INTEL_BATCHBUFFER_H
#include <assert.h>
+#include <stdint.h>
#include "intel_bufmgr.h"
#define BATCH_SZ 4096
drm_intel_bo *dst_bo, drm_intel_bo *src_bo,
long int size);
+struct scratch_buf {
+ drm_intel_bo *bo;
+ uint32_t stride;
+ uint32_t tiling;
+ uint32_t *data;
+ uint32_t *cpu_mapping;
+ uint32_t size;
+ unsigned num_tiles;
+};
+
+static inline unsigned buf_width(struct scratch_buf *buf)
+{
+ return buf->stride/sizeof(uint32_t);
+}
+
+static inline unsigned buf_height(struct scratch_buf *buf)
+{
+ return buf->size/buf->stride;
+}
+
+typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch,
+ drm_intel_context *context,
+ struct scratch_buf *src, unsigned src_x, unsigned src_y,
+ unsigned width, unsigned height,
+ struct scratch_buf *dst, unsigned dst_x, unsigned dst_y);
+
+render_copyfunc_t get_render_copyfunc(int devid);
+
#endif
#include "intel_batchbuffer.h"
#include "intel_gpu_tools.h"
-struct scratch_buf {
- drm_intel_bo *bo;
- uint32_t stride;
- uint32_t tiling;
- uint32_t *data;
- uint32_t *cpu_mapping;
- uint32_t size;
- unsigned num_tiles;
-};
-
-static inline unsigned buf_width(struct scratch_buf *buf)
-{
- return buf->stride/sizeof(uint8_t);
-}
-
-static inline unsigned buf_height(struct scratch_buf *buf)
-{
- return buf->size/buf->stride;
-}
-
typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch,
struct scratch_buf *dst,
unsigned x, unsigned y,
-#ifndef RENDERCOPY_H
-#define RENDERCOPY_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"
-
-struct scratch_buf {
- drm_intel_bo *bo;
- uint32_t stride;
- uint32_t tiling;
- uint32_t *data;
- uint32_t *cpu_mapping;
- uint32_t size;
- unsigned num_tiles;
-};
-
static inline void emit_vertex_2s(struct intel_batchbuffer *batch,
int16_t x, int16_t y)
{
OUT_BATCH(u.ui);
}
-static inline unsigned buf_width(struct scratch_buf *buf)
-{
- return buf->stride/sizeof(uint32_t);
-}
-
-static inline unsigned buf_height(struct scratch_buf *buf)
-{
- return buf->size/buf->stride;
-}
-
-typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch,
- drm_intel_context *context,
- struct scratch_buf *src, unsigned src_x, unsigned src_y,
- unsigned width, unsigned height,
- struct scratch_buf *dst, unsigned dst_x, unsigned dst_y);
-
-render_copyfunc_t get_render_copyfunc(int devid);
-
void gen8_render_copyfunc(struct intel_batchbuffer *batch,
drm_intel_context *context,
struct scratch_buf *src, unsigned src_x, unsigned src_y,
struct scratch_buf *src, unsigned src_x, unsigned src_y,
unsigned width, unsigned height,
struct scratch_buf *dst, unsigned dst_x, unsigned dst_y);
-
-#endif /* RENDERCOPY_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"
#include "rendercopy.h"
#include "gen6_render.h"
-#include <assert.h>
-
#define ALIGN(x, y) (((x) + (y)-1) & ~((y)-1))
#define VERTEX_SIZE (3*4)
+#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"
#include "rendercopy.h"
#include "gen7_render.h"
-#include <assert.h>
-
#define ALIGN(x, y) (((x) + (y)-1) & ~((y)-1))
static const uint32_t ps_kernel[][4] = {
+#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"
#include "rendercopy.h"
#include "gen8_render.h"
-#include <assert.h>
-
#include <intel_aub.h>
#define ALIGN(x, y) (((x) + (y)-1) & ~((y)-1))
+#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"
+
#include "i830_reg.h"
#include "rendercopy.h"
intel_batchbuffer_flush(batch);
}
-
-render_copyfunc_t get_render_copyfunc(int devid)
-{
- render_copyfunc_t copy = NULL;
-
- if (IS_GEN2(devid))
- copy = gen2_render_copyfunc;
- else if (IS_GEN3(devid))
- copy = gen3_render_copyfunc;
- else if (IS_GEN6(devid))
- copy = gen6_render_copyfunc;
- else if (IS_GEN7(devid))
- copy = gen7_render_copyfunc;
- else if (IS_GEN8(devid))
- copy = gen8_render_copyfunc;
-
- return copy;
-}
+#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"
+
#include "i915_reg.h"
#include "i915_3d.h"
#include "rendercopy.h"
*/
#include <pthread.h>
-#include "rendercopy.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"
/* options */
int num_contexts = 10;
#include <stdbool.h>
#include <unistd.h>
#include <cairo.h>
-
-#include "rendercopy.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 512
#define STRIDE (WIDTH*4)
#include "config.h"
#endif
-#include "rendercopy.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 512
#define STRIDE (WIDTH*4)
#define HEIGHT 512
* The goal is to simply ensure the basics work.
*/
-#include "rendercopy.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 512
#define STRIDE (WIDTH*4)
*/
#define _GNU_SOURCE
+#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include "i915_drm.h"
+#include "drmtest.h"
+#include "igt_debugfs.h"
#include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_gpu_tools.h"
-#include "rendercopy.h"
-#include "igt_debugfs.h"
#define RS_NO_ERROR 0
#define RS_BATCH_ACTIVE (1 << 0)
#include "i915_drm.h"
#include "drmtest.h"
-#include "rendercopy.h"
+#include "intel_batchbuffer.h"
#define WIDTH 512
#define HEIGHT 512
#include "drm.h"
#include "i915_drm.h"
+#include "drmtest.h"
#include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_gpu_tools.h"
-#include "rendercopy.h"
struct bo {
const char *ring;
#include <sys/wait.h>
#include <limits.h>
#include <wordexp.h>
+#include <getopt.h>
#include <signal.h>
#include "i915_drm.h"
+#include "drmtest.h"
+#include "igt_core.h"
#include "intel_bufmgr.h"
#include "intel_batchbuffer.h"
#include "intel_gpu_tools.h"
-#include "rendercopy.h"
static int devid;
static int card_index = 0;
* In short: designed for maximum evilness.
*/
-#include "rendercopy.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 CMD_POLY_STIPPLE_OFFSET 0x7906
#include <stdio.h>
#include <time.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 "rendercopy.h"
+#include "i915_drm.h"
+#include "drmtest.h"
+#include "intel_bufmgr.h"
+#include "intel_batchbuffer.h"
+#include "intel_gpu_tools.h"
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
#include "drmtest.h"
#include "igt_debugfs.h"
#include "igt_kms.h"
-#include "rendercopy.h"
+#include "intel_batchbuffer.h"
enum test_mode {
TEST_PAGE_FLIP,
#include "i915_drm.h"
#include "drmtest.h"
#include "testdisplay.h"
-#include "rendercopy.h"
+#include "intel_batchbuffer.h"
#include "igt_kms.h"
#define TEST_DPMS (1 << 0)