From aadfcdfd4edbaa7f9912a6ec42215ddb6726c74a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 5 Jun 2011 18:13:18 +0100 Subject: [PATCH] decode: Fix segmentation fault The decode for A8 is incomplete and died with a segfault. First hide the segfault, latter fix the pretty printing. Signed-off-by: Chris Wilson --- tools/intel_decode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/intel_decode.c b/tools/intel_decode.c index 76e023b8..e132fdc4 100644 --- a/tools/intel_decode.c +++ b/tools/intel_decode.c @@ -1203,6 +1203,7 @@ decode_3d_1d(uint32_t *data, int count, else if (dword & (1 << 1)) tiling = dword & (1 << 0) ? "Y" : "X"; type = " BAD"; + format = "BAD"; switch ((dword>>7) & 0x7) { case 1: type = "8b"; @@ -1266,8 +1267,6 @@ decode_3d_1d(uint32_t *data, int count, switch ((dword>>3) & 0xf) { case 7: format = " argb8888"; break; } break; - default: - format = "BAD"; } dword = data[i]; instr_out(data, hw_offset, i++, "map %d MS3 [width=%d, height=%d, format=%s%s, tiling=%s%s]\n",