From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: [PATCH i-g-t 08/26] rendercopy/skl: Pass the context to rendercopy function on SKL Date: Fri, 26 Sep 2014 15:03:06 +0100 Message-ID: <1411740204-25709-8-git-send-email-damien.lespiau@intel.com> References: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id B971C6E055 for ; Fri, 26 Sep 2014 07:04:29 -0700 (PDT) In-Reply-To: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhao Yakui Reviewed-by: Damien Lespiau Signed-off-by: Zhao Yakui Signed-off-by: Ben Widawsky --- lib/rendercopy.h | 1 + lib/rendercopy_gen9.c | 12 +++++++----- tools/intel_error_decode.c | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/rendercopy.h b/lib/rendercopy.h index f15df0e..fdc3cab 100644 --- a/lib/rendercopy.h +++ b/lib/rendercopy.h @@ -24,6 +24,7 @@ static inline void emit_vertex_normalized(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, unsigned width, unsigned height, struct igt_buf *dst, unsigned dst_x, unsigned dst_y); diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c index 01d5ef3..40f1c6f 100644 --- a/lib/rendercopy_gen9.c +++ b/lib/rendercopy_gen9.c @@ -166,14 +166,15 @@ batch_copy(struct intel_batchbuffer *batch, const void *ptr, uint32_t size, uint } 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; ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer); if (ret == 0) - ret = drm_intel_bo_mrb_exec(batch->bo, batch_end, - NULL, 0, 0, 0); + ret = drm_intel_gem_bo_context_exec(batch->bo, context, + batch_end, 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 void gen9_render_copyfunc(struct intel_batchbuffer *batch, + drm_intel_context *context, struct igt_buf *src, unsigned src_x, unsigned src_y, unsigned width, unsigned height, 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 batch_end; - intel_batchbuffer_flush(batch); + intel_batchbuffer_flush_with_context(batch, context); batch_align(batch, 8); @@ -971,6 +973,6 @@ void gen9_render_copyfunc(struct intel_batchbuffer *batch, annotation_flush(&aub_annotations, batch); - gen6_render_flush(batch, batch_end); + gen6_render_flush(batch, context, batch_end); intel_batchbuffer_reset(batch); } diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 1eeff07..14589a3 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -56,6 +56,7 @@ #include "intel_io.h" #include "instdone.h" #include "intel_reg.h" +#include "drmtest.h" static uint32_t print_head(unsigned int reg) -- 1.8.3.1