summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a1c10f)
raw | patch | inline | side by side (parent: 5a1c10f)
author | Eric Anholt <eric@anholt.net> | |
Wed, 4 Jan 2012 20:06:44 +0000 (12:06 -0800) | ||
committer | Eric Anholt <eric@anholt.net> | |
Fri, 27 Jan 2012 21:21:19 +0000 (13:21 -0800) |
I want to add packets, without contributing to the switch statement of
doom.
doom.
intel/intel_decode.c | patch | blob | history |
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 864d8027306a4d5da90e85cdd7b79bca987d5f0c..1f01b1149ff913fd48e8921bd17769ee1f0e09ba 100644 (file)
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
int unsigned max_len;
const char *name;
int gen;
+ int (*func)(struct drm_intel_decode *ctx);
} opcodes_3d[] = {
{ 0x6000, 3, 3, "URB_FENCE" },
{ 0x6001, 2, 2, "CS_URB_STATE" },
if (opcode_3d->gen && opcode_3d->gen != ctx->gen)
continue;
- if ((data[0] & 0xffff0000) >> 16 == opcode_3d->opcode) {
+ if ((data[0] & 0xffff0000) >> 16 != opcode_3d->opcode)
+ continue;
+
+ if (opcode_3d->func) {
+ return opcode_3d->func(ctx);
+ } else {
unsigned int i;
len = 1;