From patchwork Fri Jul 31 18:23:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Worth X-Patchwork-Id: 38547 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6VINUhx019587 for ; Fri, 31 Jul 2009 18:23:30 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EAFE9EB86; Fri, 31 Jul 2009 11:23:30 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from olra.theworths.org (olra.theworths.org [82.165.184.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 8792F9EB86 for ; Fri, 31 Jul 2009 11:23:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 718774040E9 for ; Fri, 31 Jul 2009 11:23:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c6UhoXUsu2Bt; Fri, 31 Jul 2009 11:23:25 -0700 (PDT) Received: from localhost.localdomain (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4F3E64052A9; Fri, 31 Jul 2009 11:23:25 -0700 (PDT) From: Carl Worth To: intel-gfx@lists.freedesktop.org Date: Fri, 31 Jul 2009 11:23:11 -0700 Message-Id: <1249064591-16236-1-git-send-email-cworth@cworth.org> X-Mailer: git-send-email 1.6.3.3 Subject: [Intel-gfx] [PATCH] debug: i830_valid_command: Return invalid for subopcodes with no name X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Previously the code would always return the count, before ever looking into the _3d_cmds table to see if there was actually a valid command. Thanks to Alan Coopersmith who reported that the code was confusing parfait: https://bugs.freedesktop.org/show_bug.cgi?id=21666 --- src/i830_debug.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/i830_debug.c b/src/i830_debug.c index 1126c26..4b704a1 100644 --- a/src/i830_debug.c +++ b/src/i830_debug.c @@ -2094,8 +2094,6 @@ i830_valid_command (uint32_t cmd) count = 1; else count = (cmd & 0xff) + 2; - if (pipeline_type <= 3) - return count; if (!_3d_cmds[pipeline_type][opcode][subopcode].name) return -1; break;