From: Rodrigo Vivi Subject: [PATCH 2/4] tests/gem_wait_render_timeout: Fix for BDW Date: Thu, 6 Feb 2014 14:54:25 -0200 Message-ID: <1391705667-13122-2-git-send-email-rodrigo.vivi@gmail.com> References: <1391705667-13122-1-git-send-email-rodrigo.vivi@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qc0-f170.google.com (mail-qc0-f170.google.com [209.85.216.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 52760FB974 for ; Thu, 6 Feb 2014 08:54:47 -0800 (PST) Received: by mail-qc0-f170.google.com with SMTP id e9so3676366qcy.29 for ; Thu, 06 Feb 2014 08:54:46 -0800 (PST) In-Reply-To: <1391705667-13122-1-git-send-email-rodrigo.vivi@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Update XY_COLOR_BLT command for Broadwell. Signed-off-by: Rodrigo Vivi --- tests/gem_wait_render_timeout.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c index 4ecb93f..9fe6910 100644 --- a/tests/gem_wait_render_timeout.c +++ b/tests/gem_wait_render_timeout.c @@ -86,9 +86,17 @@ static void blt_color_fill(struct intel_batchbuffer *batch, { const unsigned short height = pages/4; const unsigned short width = 4096; - BEGIN_BATCH(6); - OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | 4 | - COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB); + + if (intel_gen(batch->devid) >= 8) { + BEGIN_BATCH(8); + OUT_BATCH(MI_NOOP); + OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | 5 | + COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB); + } else { + BEGIN_BATCH(6); + OUT_BATCH(XY_COLOR_BLT_CMD_NOLEN | 4 | + COLOR_BLT_WRITE_ALPHA | XY_COLOR_BLT_WRITE_RGB); + } OUT_BATCH((3 << 24) | /* 32 Bit Color */ (0xF0 << 16) | /* Raster OP copy background register */ 0); /* Dest pitch is 0 */ @@ -96,6 +104,8 @@ static void blt_color_fill(struct intel_batchbuffer *batch, OUT_BATCH(width << 16 | height); OUT_RELOC(buf, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); + if (intel_gen(batch->devid) >= 8) + OUT_BATCH(0); OUT_BATCH(rand()); /* random pattern */ ADVANCE_BATCH(); } -- 1.8.3.1