rendercopy/skl: Pass the context to rendercopy function on SKL

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
This commit is contained in:
Zhao Yakui 2014-01-22 09:37:20 +08:00 committed by Damien Lespiau
parent ecd659e000
commit f04bf00c0d
3 changed files with 9 additions and 5 deletions

View File

@ -24,6 +24,7 @@ static inline void emit_vertex_normalized(struct intel_batchbuffer *batch,
} }
void gen9_render_copyfunc(struct intel_batchbuffer *batch, void gen9_render_copyfunc(struct intel_batchbuffer *batch,
drm_intel_context *context,
struct igt_buf *src, unsigned src_x, unsigned src_y, struct igt_buf *src, unsigned src_x, unsigned src_y,
unsigned width, unsigned height, unsigned width, unsigned height,
struct igt_buf *dst, unsigned dst_x, unsigned dst_y); struct igt_buf *dst, unsigned dst_x, unsigned dst_y);

View File

@ -166,14 +166,15 @@ batch_copy(struct intel_batchbuffer *batch, const void *ptr, uint32_t size, uint
} }
static void static void
gen6_render_flush(struct intel_batchbuffer *batch, uint32_t batch_end) gen6_render_flush(struct intel_batchbuffer *batch,
drm_intel_context *context, uint32_t batch_end)
{ {
int ret; int ret;
ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer); ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer);
if (ret == 0) if (ret == 0)
ret = drm_intel_bo_mrb_exec(batch->bo, batch_end, ret = drm_intel_gem_bo_context_exec(batch->bo, context,
NULL, 0, 0, 0); batch_end, 0);
assert(ret == 0); assert(ret == 0);
} }
@ -872,6 +873,7 @@ static void gen8_emit_primitive(struct intel_batchbuffer *batch, uint32_t offset
#define BATCH_STATE_SPLIT 2048 #define BATCH_STATE_SPLIT 2048
void gen9_render_copyfunc(struct intel_batchbuffer *batch, void gen9_render_copyfunc(struct intel_batchbuffer *batch,
drm_intel_context *context,
struct igt_buf *src, unsigned src_x, unsigned src_y, struct igt_buf *src, unsigned src_x, unsigned src_y,
unsigned width, unsigned height, unsigned width, unsigned height,
struct igt_buf *dst, unsigned dst_x, unsigned dst_y) struct igt_buf *dst, unsigned dst_x, unsigned dst_y)
@ -881,7 +883,7 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch,
uint32_t vertex_buffer; uint32_t vertex_buffer;
uint32_t batch_end; uint32_t batch_end;
intel_batchbuffer_flush(batch); intel_batchbuffer_flush_with_context(batch, context);
batch_align(batch, 8); batch_align(batch, 8);
@ -971,6 +973,6 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch,
annotation_flush(&aub_annotations, batch); annotation_flush(&aub_annotations, batch);
gen6_render_flush(batch, batch_end); gen6_render_flush(batch, context, batch_end);
intel_batchbuffer_reset(batch); intel_batchbuffer_reset(batch);
} }

View File

@ -56,6 +56,7 @@
#include "intel_io.h" #include "intel_io.h"
#include "instdone.h" #include "instdone.h"
#include "intel_reg.h" #include "intel_reg.h"
#include "drmtest.h"
static uint32_t static uint32_t
print_head(unsigned int reg) print_head(unsigned int reg)