From patchwork Fri Sep 26 14:03:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 4984001 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54C9EBEEA6 for ; Fri, 26 Sep 2014 14:04:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65970202AE for ; Fri, 26 Sep 2014 14:04:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 68C912024D for ; Fri, 26 Sep 2014 14:04:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC9776E775; Fri, 26 Sep 2014 07:04:31 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org 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) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 26 Sep 2014 07:03:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,604,1406617200"; d="scan'208";a="597272135" Received: from mtbyrne-mobl1.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.26.64]) by fmsmga001.fm.intel.com with ESMTP; 26 Sep 2014 07:03:35 -0700 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Fri, 26 Sep 2014 15:03:06 +0100 Message-Id: <1411740204-25709-8-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> References: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 08/26] rendercopy/skl: Pass the context to rendercopy function on SKL X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)