From patchwork Mon Nov 14 20:51:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9428365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA4FD6047D for ; Mon, 14 Nov 2016 20:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9F8B28AE3 for ; Mon, 14 Nov 2016 20:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AD9628ADC; Mon, 14 Nov 2016 20:52:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D32628ADC for ; Mon, 14 Nov 2016 20:52:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2E036E51C; Mon, 14 Nov 2016 20:52:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7EC56E51C for ; Mon, 14 Nov 2016 20:52:05 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id 3so9803290pgd.0 for ; Mon, 14 Nov 2016 12:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=IcABYHFPVPTc1R16G9NDqAP7tE1+ryPqxFZpMyy+naM=; b=y3/iM9E8EeCpPUL1D0gfwUKqjxXiy3yJBg5Nc41dvr52hqDouegEbhVEgC7rJmQP8W cdVPO0vge9C2LR350tMK0BNQZJTUwtKeLb0GrnxsiyElVMt78TE1EH3gw/dOnv6RU4x1 kVGBJ1pqFRRFCqvcHcc8UG2zWS4cUtMU2tLhB3CbwbpH2fJakjYYjRFMJK/A0dBcj3mE t9/bK2c7amglZezXIQw39eOmFxTRs33jWmgWvNHNuSJVQsocDO4EoEenMohsqXxyMGna YGzeNuOQGu01U+nAdabkaFEB76gj4X9eVWVitnAly9Vin1gysNNInWeE3fYuuPscXKPH St9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=IcABYHFPVPTc1R16G9NDqAP7tE1+ryPqxFZpMyy+naM=; b=SJPgEbXHW7PgjwrzjiXyS9AmllgyFOUJdG5El4lY97XMLbSpDn12T0mTuicGohQB1r Je/wv/HrK9O1onD95B5jI4xqa43A7c4Bd9fAiLb9qSHybAUYcalmnP4kjQC4QwdDCvle oOtL7BfH51zVwiu3Ocw4n8Q0dEWej7Ox0mPiEW4e9Jz0aEBOsrtQTd/ltI9jY4fXBiUn 3rIJpVoCDu2TQKSAhWrwJ1luo524w5m5K56bB+zguAkpHv+it4eLuICdi07ho7fb2lQj hzlSOffWcbJB/wt7I4xfUZBd5SKysIjiX47pxUEQIZaflegmzEPkq6uktNzs0hjbG4qG E1Sw== X-Gm-Message-State: ABUngvfitRI37GlO6TWeCVrBpRu0+c+TnpJxiPTu2tghRof1+XIugM75FAqhGXOSWTtvUw== X-Received: by 10.98.157.148 with SMTP id a20mr39892438pfk.1.1479156725088; Mon, 14 Nov 2016 12:52:05 -0800 (PST) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by smtp.gmail.com with ESMTPSA id dc3sm37321681pad.32.2016.11.14.12.52.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Nov 2016 12:52:04 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Mon, 14 Nov 2016 20:51:19 +0000 Message-Id: <20161114205122.10742-11-robert@sixbynine.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161114205122.10742-1-robert@sixbynine.org> References: <20161114205122.10742-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH igt v4 10/13] igt/gem_exec_parse: update cmd-crossing-page for >= v8 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP Since an access violation won't return an error to userspace for v >= 8 of the command parser this updates the cmd-crossing-page test to explicitly read back from SO_WRITE_OFFSET[0] to see that the command wasn't squashed to a NOOP. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- tests/gem_exec_parse.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/gem_exec_parse.c b/tests/gem_exec_parse.c index d5769e4..5c67e12 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -531,14 +531,25 @@ igt_main igt_subtest("cmd-crossing-page") { uint32_t lri_ok[] = { MI_LOAD_REGISTER_IMM, - 0x5280, /* allowed register address (SO_WRITE_OFFSET[0]) */ - 0x1, + SO_WRITE_OFFSET_0, /* allowed register address */ + 0xdcbaabc0, /* [1:0] MBZ */ + MI_BATCH_BUFFER_END, + }; + uint32_t store_reg[] = { + MI_STORE_REGISTER_MEM | (3 - 2), + SO_WRITE_OFFSET_0, + 0, /* reloc */ MI_BATCH_BUFFER_END, }; exec_split_batch(fd, lri_ok, sizeof(lri_ok), I915_EXEC_RENDER, 0); + exec_batch_patched(fd, handle, + store_reg, + sizeof(store_reg), + 2 * sizeof(uint32_t), /* reloc */ + 0xdcbaabc0); } igt_subtest("oacontrol-tracking") {