From patchwork Wed Nov 9 16:15:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9419753 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 107C3601C0 for ; Wed, 9 Nov 2016 16:17:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04F28289E5 for ; Wed, 9 Nov 2016 16:17:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECA3E28AD0; Wed, 9 Nov 2016 16:17:21 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,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 DB514289E5 for ; Wed, 9 Nov 2016 16:17:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A8B06E6F4; Wed, 9 Nov 2016 16:17:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 35CFA6E6EF for ; Wed, 9 Nov 2016 16:17:18 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id u144so30214900wmu.0 for ; Wed, 09 Nov 2016 08:17:18 -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=h7uVvYpwT6PScW9h1qLZEneI68bePKXE/2T8hl/6KdM=; b=Ra0OANJ4/VYkV7EfL221fE5x7iqla698LSRTdczwq9YFDyzy3dDlWYdllOI7J5AQsB HWEbmJZ0iuQAfnJb8AsQ2/dIlasDW/G92IQBSy8w5jYbiTwrpegncfAnB9379M/UOAUr Y/AdBgy0CsYmGwcdqfjCyP5iYPoFtWQ6UQTczG6K6gwsU8lNUJf1e033JJMZW3OJen0m 3IJTHZGDswfug//tth3qVIix0Azk8h/9iI84Dqz+yCcot0qSCjbxuBSDtvxV46ErRCOj p4ews1dQI+JVRSWmWnIeTVjDk+GHW915cHFeFfNlkQ7zU4pc5qQHaYvgzYFjQnDyxSPk xoGA== 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=h7uVvYpwT6PScW9h1qLZEneI68bePKXE/2T8hl/6KdM=; b=g6Q9BbOnXTYNZ1Ta9X+EMJeF/Gj672mGCO/wTEDJvuJcGsh1hS4J+o4tXEcZMwA4TA j8E41SZzRREhOgyJ+kB+eLEzvjewSHOsYDEC4JK1RsF/xe4K45/SmWL9qpwnmox9l+BQ nJEz6BxbxLTKKl0TCHE9Z/FJSs/Xw2QqTtr69e9c+5Ac3cE2JC7YMR5UhaDfwwO1ftNz JFJu/X8SdaiyS7XJAN3OoZia6dzUmV+pDYVFEJOaX/fq1/VctlNvs04ow3bWgVnK8iys prrtQqZ3mrk+DdDCJ7gs6Sk0uBubvE4AGt44eMrRFO1qmyq3vqc2/TsI6d23PBpzDBR8 XP7Q== X-Gm-Message-State: ABUngvdFH4eqvlLaqK5hUWxt8QFiS9bBEHi7A62xCITpRXZoTza3ld4M3ctnMaOWP78eHQ== X-Received: by 10.28.94.76 with SMTP id s73mr184263wmb.107.1478708236611; Wed, 09 Nov 2016 08:17:16 -0800 (PST) Received: from sixbynine.org (82-132-216-223.dab.02.net. [82.132.216.223]) by smtp.gmail.com with ESMTPSA id c133sm1044383wme.12.2016.11.09.08.17.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Nov 2016 08:17:16 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Wed, 9 Nov 2016 16:15:59 +0000 Message-Id: <20161109161602.2402-9-robert@sixbynine.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161109161602.2402-1-robert@sixbynine.org> References: <20161109161602.2402-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH igt v3 08/11] 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 1aa5114..d6a2885 100644 --- a/tests/gem_exec_parse.c +++ b/tests/gem_exec_parse.c @@ -499,14 +499,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") {