[Intel-gfx] [PATCH] debug: i830_valid_command: Return invalid for subopcodes with no name

Carl Worth cworth at cworth.org
Fri Jul 31 20:23:11 CEST 2009


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;
-- 
1.6.3.3




More information about the Intel-gfx mailing list