Lines Matching refs:data
65 instr_out(uint32_t *data, uint32_t hw_offset, unsigned int index, in instr_out() argument
69 DRM_ERROR("0x%08x: 0x%08x:%s ", hw_offset + index * 4, data[index], in instr_out()
80 decode_mi(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_mi() argument
112 if ((data[0] & 0x1f800000) >> 23 == opcodes_mi[opcode].opcode) { in decode_mi()
115 instr_out(data, hw_offset, 0, "%s\n", opcodes_mi[opcode].name); in decode_mi()
117 len = (data[0] & 0x000000ff) + 2; in decode_mi()
129 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_mi()
136 instr_out(data, hw_offset, 0, "MI UNKNOWN\n"); in decode_mi()
142 decode_2d(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_2d() argument
180 switch ((data[0] & 0x1fc00000) >> 22) { in decode_2d()
182 instr_out(data, hw_offset, 0, in decode_2d()
184 (data[0] & (1 << 20)) ? "en" : "dis", in decode_2d()
185 (data[0] & (1 << 21)) ? "en" : "dis", in decode_2d()
186 (data[0] >> 11) & 1); in decode_2d()
188 len = (data[0] & 0x000000ff) + 2; in decode_2d()
194 switch ((data[1] >> 24) & 0x3) { in decode_2d()
209 instr_out(data, hw_offset, 1, "format %s, pitch %d, " in decode_2d()
211 (short)(data[1] & 0xffff), in decode_2d()
212 data[1] & (1 << 30) ? "en" : "dis"); in decode_2d()
213 instr_out(data, hw_offset, 2, "(%d,%d)\n", in decode_2d()
214 data[2] & 0xffff, data[2] >> 16); in decode_2d()
215 instr_out(data, hw_offset, 3, "(%d,%d)\n", in decode_2d()
216 data[3] & 0xffff, data[3] >> 16); in decode_2d()
217 instr_out(data, hw_offset, 4, "offset 0x%08x\n", data[4]); in decode_2d()
218 instr_out(data, hw_offset, 5, "color\n"); in decode_2d()
221 instr_out(data, hw_offset, 0, in decode_2d()
224 (data[0] & (1 << 20)) ? "en" : "dis", in decode_2d()
225 (data[0] & (1 << 21)) ? "en" : "dis", in decode_2d()
226 (data[0] >> 15) & 1, in decode_2d()
227 (data[0] >> 11) & 1); in decode_2d()
229 len = (data[0] & 0x000000ff) + 2; in decode_2d()
235 switch ((data[1] >> 24) & 0x3) { in decode_2d()
250 instr_out(data, hw_offset, 1, "format %s, dst pitch %d, " in decode_2d()
252 (short)(data[1] & 0xffff), in decode_2d()
253 data[1] & (1 << 30) ? "en" : "dis"); in decode_2d()
254 instr_out(data, hw_offset, 2, "dst (%d,%d)\n", in decode_2d()
255 data[2] & 0xffff, data[2] >> 16); in decode_2d()
256 instr_out(data, hw_offset, 3, "dst (%d,%d)\n", in decode_2d()
257 data[3] & 0xffff, data[3] >> 16); in decode_2d()
258 instr_out(data, hw_offset, 4, "dst offset 0x%08x\n", data[4]); in decode_2d()
259 instr_out(data, hw_offset, 5, "src (%d,%d)\n", in decode_2d()
260 data[5] & 0xffff, data[5] >> 16); in decode_2d()
261 instr_out(data, hw_offset, 6, "src pitch %d\n", in decode_2d()
262 (short)(data[6] & 0xffff)); in decode_2d()
263 instr_out(data, hw_offset, 7, "src offset 0x%08x\n", data[7]); in decode_2d()
269 if ((data[0] & 0x1fc00000) >> 22 == opcodes_2d[opcode].opcode) { in decode_2d()
273 instr_out(data, hw_offset, 0, "%s\n", opcodes_2d[opcode].name); in decode_2d()
275 len = (data[0] & 0x000000ff) + 2; in decode_2d()
286 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_2d()
293 instr_out(data, hw_offset, 0, "2D UNKNOWN\n"); in decode_2d()
300 decode_3d_1c(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_3d_1c() argument
302 switch ((data[0] & 0x00f80000) >> 19) { in decode_3d_1c()
304 instr_out(data, hw_offset, 0, "3DSTATE_DEPTH_SUBRECTANGLE_DISALBE\n"); in decode_3d_1c()
307 instr_out(data, hw_offset, 0, "3DSTATE_SCISSOR_ENABLE\n"); in decode_3d_1c()
310 instr_out(data, hw_offset, 0, "3DSTATE_MAP_COORD_SET_I830\n"); in decode_3d_1c()
313 instr_out(data, hw_offset, 0, "3DSTATE_MAP_CUBE_I830\n"); in decode_3d_1c()
316 instr_out(data, hw_offset, 0, "3DSTATE_MAP_TEX_STREAM_I830\n"); in decode_3d_1c()
320 instr_out(data, hw_offset, 0, "3D UNKNOWN\n"); in decode_3d_1c()
326 decode_3d_1d(uint32_t *data, int count, uint32_t hw_offset, int *failures, int i830) in decode_3d_1d() argument
361 switch ((data[0] & 0x00ff0000) >> 16) { in decode_3d_1d()
368 instr_out(data, hw_offset, 0, "3DSTATE_LOAD_INDIRECT\n"); in decode_3d_1d()
369 len = (data[0] & 0x000000ff) + 1; in decode_3d_1d()
371 if (data[0] & (0x01 << 8)) { in decode_3d_1d()
374 instr_out(data, hw_offset, i++, "SIS.0\n"); in decode_3d_1d()
375 instr_out(data, hw_offset, i++, "SIS.1\n"); in decode_3d_1d()
377 if (data[0] & (0x02 << 8)) { in decode_3d_1d()
380 instr_out(data, hw_offset, i++, "DIS.0\n"); in decode_3d_1d()
382 if (data[0] & (0x04 << 8)) { in decode_3d_1d()
385 instr_out(data, hw_offset, i++, "SSB.0\n"); in decode_3d_1d()
386 instr_out(data, hw_offset, i++, "SSB.1\n"); in decode_3d_1d()
388 if (data[0] & (0x08 << 8)) { in decode_3d_1d()
391 instr_out(data, hw_offset, i++, "MSB.0\n"); in decode_3d_1d()
392 instr_out(data, hw_offset, i++, "MSB.1\n"); in decode_3d_1d()
394 if (data[0] & (0x10 << 8)) { in decode_3d_1d()
397 instr_out(data, hw_offset, i++, "PSP.0\n"); in decode_3d_1d()
398 instr_out(data, hw_offset, i++, "PSP.1\n"); in decode_3d_1d()
400 if (data[0] & (0x20 << 8)) { in decode_3d_1d()
403 instr_out(data, hw_offset, i++, "PSC.0\n"); in decode_3d_1d()
404 instr_out(data, hw_offset, i++, "PSC.1\n"); in decode_3d_1d()
413 instr_out(data, hw_offset, 0, "3DSTATE_LOAD_STATE_IMMEDIATE_1\n"); in decode_3d_1d()
414 len = (data[0] & 0x0000000f) + 2; in decode_3d_1d()
417 if (data[0] & (1 << (4 + word))) { in decode_3d_1d()
424 saved_s2 = data[i]; in decode_3d_1d()
428 saved_s4 = data[i]; in decode_3d_1d()
431 instr_out(data, hw_offset, i++, "S%d\n", word); in decode_3d_1d()
440 instr_out(data, hw_offset, 0, "3DSTATE_MAP_STATE\n"); in decode_3d_1d()
441 len = (data[0] & 0x0000003f) + 2; in decode_3d_1d()
445 if (data[1] & (1 << map)) { in decode_3d_1d()
448 instr_out(data, hw_offset, i++, "map %d MS2\n", map); in decode_3d_1d()
449 instr_out(data, hw_offset, i++, "map %d MS3\n", map); in decode_3d_1d()
450 instr_out(data, hw_offset, i++, "map %d MS4\n", map); in decode_3d_1d()
460 instr_out(data, hw_offset, 0, "3DSTATE_PIXEL_SHADER_CONSTANTS\n"); in decode_3d_1d()
461 len = (data[0] & 0x000000ff) + 2; in decode_3d_1d()
465 if (data[1] & (1 << c)) { in decode_3d_1d()
468 instr_out(data, hw_offset, i, "C%d.X = %f\n", in decode_3d_1d()
469 c, int_as_float(data[i])); in decode_3d_1d()
471 instr_out(data, hw_offset, i, "C%d.Y = %f\n", in decode_3d_1d()
472 c, int_as_float(data[i])); in decode_3d_1d()
474 instr_out(data, hw_offset, i, "C%d.Z = %f\n", in decode_3d_1d()
475 c, int_as_float(data[i])); in decode_3d_1d()
477 instr_out(data, hw_offset, i, "C%d.W = %f\n", in decode_3d_1d()
478 c, int_as_float(data[i])); in decode_3d_1d()
488 instr_out(data, hw_offset, 0, "3DSTATE_PIXEL_SHADER_PROGRAM\n"); in decode_3d_1d()
489 len = (data[0] & 0x000000ff) + 2; in decode_3d_1d()
498 instr_out(data, hw_offset, i++, "PS%03x\n", instr); in decode_3d_1d()
499 instr_out(data, hw_offset, i++, "PS%03x\n", instr); in decode_3d_1d()
500 instr_out(data, hw_offset, i++, "PS%03x\n", instr); in decode_3d_1d()
506 instr_out(data, hw_offset, 0, "3DSTATE_SAMPLER_STATE\n"); in decode_3d_1d()
507 len = (data[0] & 0x0000003f) + 2; in decode_3d_1d()
510 if (data[1] & (1 << sampler)) { in decode_3d_1d()
513 instr_out(data, hw_offset, i++, "sampler %d SS2\n", in decode_3d_1d()
515 instr_out(data, hw_offset, i++, "sampler %d SS3\n", in decode_3d_1d()
517 instr_out(data, hw_offset, i++, "sampler %d SS4\n", in decode_3d_1d()
534 if (((data[0] & 0x00ff0000) >> 16) == opcodes_3d_1d[opcode].opcode) { in decode_3d_1d()
537 instr_out(data, hw_offset, 0, "%s\n", opcodes_3d_1d[opcode].name); in decode_3d_1d()
539 len = (data[0] & 0x0000ffff) + 2; in decode_3d_1d()
552 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_3d_1d()
559 instr_out(data, hw_offset, 0, "3D UNKNOWN\n"); in decode_3d_1d()
565 decode_3d_primitive(uint32_t *data, int count, uint32_t hw_offset, in decode_3d_primitive() argument
568 char immediate = (data[0] & (1 << 23)) == 0; in decode_3d_primitive()
572 switch ((data[0] >> 18) & 0xf) { in decode_3d_primitive()
589 len = (data[0] & 0x0003ffff) + 2; in decode_3d_primitive()
590 instr_out(data, hw_offset, 0, "3DPRIMITIVE inline %s\n", primtype); in decode_3d_primitive()
596 instr_out(data, hw_offset, i, in decode_3d_primitive()
598 int_as_float(data[i])); in decode_3d_primitive()
607 instr_out(data, hw_offset, i, " V%d."fmt"\n", vertex, __VA_ARGS__); \ in decode_3d_primitive()
613 VERTEX_OUT("X = %f", int_as_float(data[i])); in decode_3d_primitive()
614 VERTEX_OUT("Y = %f", int_as_float(data[i])); in decode_3d_primitive()
617 VERTEX_OUT("Z = %f", int_as_float(data[i])); in decode_3d_primitive()
620 VERTEX_OUT("Z = %f", int_as_float(data[i])); in decode_3d_primitive()
621 VERTEX_OUT("W = %f", int_as_float(data[i])); in decode_3d_primitive()
626 VERTEX_OUT("W = %f", int_as_float(data[i])); in decode_3d_primitive()
635 data[i] >> 24, in decode_3d_primitive()
636 (data[i] >> 16) & 0xff, in decode_3d_primitive()
637 (data[i] >> 8) & 0xff, in decode_3d_primitive()
638 data[i] & 0xff); in decode_3d_primitive()
643 data[i] >> 24, in decode_3d_primitive()
644 (data[i] >> 16) & 0xff, in decode_3d_primitive()
645 (data[i] >> 8) & 0xff, in decode_3d_primitive()
646 data[i] & 0xff); in decode_3d_primitive()
649 VERTEX_OUT("width = 0x%08x)", data[i]); in decode_3d_primitive()
654 VERTEX_OUT("T%d.X = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
655 VERTEX_OUT("T%d.Y = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
658 VERTEX_OUT("T%d.X = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
659 VERTEX_OUT("T%d.Y = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
660 VERTEX_OUT("T%d.Z = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
663 VERTEX_OUT("T%d.X = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
664 VERTEX_OUT("T%d.Y = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
665 VERTEX_OUT("T%d.Z = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
666 VERTEX_OUT("T%d.W = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
669 VERTEX_OUT("T%d.X = %f", tc, int_as_float(data[i])); in decode_3d_primitive()
672 VERTEX_OUT("T%d.XY = 0x%08x half-float", tc, data[i]); in decode_3d_primitive()
675 VERTEX_OUT("T%d.XY = 0x%08x half-float", tc, data[i]); in decode_3d_primitive()
676 VERTEX_OUT("T%d.ZW = 0x%08x half-float", tc, data[i]); in decode_3d_primitive()
689 len = data[0] & 0x0000ffff; /* index count */ in decode_3d_primitive()
690 if (data[0] & (1 << 17)) { in decode_3d_primitive()
694 instr_out(data, hw_offset, 0, in decode_3d_primitive()
699 if ((data[i] & 0xffff) == 0xffff) { in decode_3d_primitive()
700 instr_out(data, hw_offset, i, in decode_3d_primitive()
703 } else if ((data[i] >> 16) == 0xffff) { in decode_3d_primitive()
704 instr_out(data, hw_offset, i, in decode_3d_primitive()
707 data[i] & 0xffff); in decode_3d_primitive()
710 instr_out(data, hw_offset, i, in decode_3d_primitive()
712 data[i] & 0xffff, data[i] >> 16); in decode_3d_primitive()
722 instr_out(data, hw_offset, i, in decode_3d_primitive()
724 data[i] & 0xffff); in decode_3d_primitive()
726 instr_out(data, hw_offset, i, in decode_3d_primitive()
728 data[i] & 0xffff, data[i] >> 16); in decode_3d_primitive()
737 instr_out(data, hw_offset, 0, in decode_3d_primitive()
739 "%d\n", primtype, len, data[1] & 0xffff); in decode_3d_primitive()
740 instr_out(data, hw_offset, 1, " start\n"); in decode_3d_primitive()
749 decode_3d(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_3d() argument
770 switch ((data[0] & 0x1f000000) >> 24) { in decode_3d()
772 return decode_3d_primitive(data, count, hw_offset, failures); in decode_3d()
774 return decode_3d_1d(data, count, hw_offset, failures, 0); in decode_3d()
776 return decode_3d_1c(data, count, hw_offset, failures); in decode_3d()
781 if ((data[0] & 0x1f000000) >> 24 == opcodes_3d[opcode].opcode) { in decode_3d()
784 instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name); in decode_3d()
786 len = (data[0] & 0xff) + 2; in decode_3d()
797 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_3d()
803 instr_out(data, hw_offset, 0, "3D UNKNOWN\n"); in decode_3d()
835 decode_3d_965(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_3d_965() argument
871 len = (data[0] & 0x0000ffff) + 2; in decode_3d_965()
873 switch ((data[0] & 0xffff0000) >> 16) { in decode_3d_965()
880 instr_out(data, hw_offset, 0, in decode_3d_965()
883 if (data[1] & 1) { in decode_3d_965()
884 instr_out(data, hw_offset, 1, "General state at 0x%08x\n", in decode_3d_965()
885 data[1] & ~1); in decode_3d_965()
887 instr_out(data, hw_offset, 1, "General state not updated\n"); in decode_3d_965()
889 if (data[2] & 1) { in decode_3d_965()
890 instr_out(data, hw_offset, 2, "Surface state at 0x%08x\n", in decode_3d_965()
891 data[2] & ~1); in decode_3d_965()
893 instr_out(data, hw_offset, 2, "Surface state not updated\n"); in decode_3d_965()
895 if (data[3] & 1) { in decode_3d_965()
896 instr_out(data, hw_offset, 3, "Indirect state at 0x%08x\n", in decode_3d_965()
897 data[3] & ~1); in decode_3d_965()
899 instr_out(data, hw_offset, 3, "Indirect state not updated\n"); in decode_3d_965()
901 if (data[4] & 1) { in decode_3d_965()
902 instr_out(data, hw_offset, 4, "General state upper bound 0x%08x\n", in decode_3d_965()
903 data[4] & ~1); in decode_3d_965()
905 instr_out(data, hw_offset, 4, "General state not updated\n"); in decode_3d_965()
907 if (data[5] & 1) { in decode_3d_965()
908 instr_out(data, hw_offset, 5, "Indirect state upper bound 0x%08x\n", in decode_3d_965()
909 data[5] & ~1); in decode_3d_965()
911 instr_out(data, hw_offset, 5, "Indirect state not updated\n"); in decode_3d_965()
920 instr_out(data, hw_offset, 0, in decode_3d_965()
922 instr_out(data, hw_offset, 1, "VS state\n"); in decode_3d_965()
923 instr_out(data, hw_offset, 2, "GS state\n"); in decode_3d_965()
924 instr_out(data, hw_offset, 3, "Clip state\n"); in decode_3d_965()
925 instr_out(data, hw_offset, 4, "SF state\n"); in decode_3d_965()
926 instr_out(data, hw_offset, 5, "WM state\n"); in decode_3d_965()
927 instr_out(data, hw_offset, 6, "CC state\n"); in decode_3d_965()
935 instr_out(data, hw_offset, 0, in decode_3d_965()
937 instr_out(data, hw_offset, 1, "VS binding table\n"); in decode_3d_965()
938 instr_out(data, hw_offset, 2, "GS binding table\n"); in decode_3d_965()
939 instr_out(data, hw_offset, 3, "Clip binding table\n"); in decode_3d_965()
940 instr_out(data, hw_offset, 4, "SF binding table\n"); in decode_3d_965()
941 instr_out(data, hw_offset, 5, "WM binding table\n"); in decode_3d_965()
951 instr_out(data, hw_offset, 0, in decode_3d_965()
953 instr_out(data, hw_offset, 1, "top left: %d,%d\n", in decode_3d_965()
954 data[1] & 0xffff, in decode_3d_965()
955 (data[1] >> 16) & 0xffff); in decode_3d_965()
956 instr_out(data, hw_offset, 2, "bottom right: %d,%d\n", in decode_3d_965()
957 data[2] & 0xffff, in decode_3d_965()
958 (data[2] >> 16) & 0xffff); in decode_3d_965()
959 instr_out(data, hw_offset, 3, "origin: %d,%d\n", in decode_3d_965()
960 (int)data[3] & 0xffff, in decode_3d_965()
961 ((int)data[3] >> 16) & 0xffff); in decode_3d_965()
971 instr_out(data, hw_offset, 0, in decode_3d_965()
973 instr_out(data, hw_offset, 1, "%s, %s, pitch = %d bytes, %stiled\n", in decode_3d_965()
974 get_965_surfacetype(data[1] >> 29), in decode_3d_965()
975 get_965_depthformat((data[1] >> 18) & 0x7), in decode_3d_965()
976 (data[1] & 0x0001ffff) + 1, in decode_3d_965()
977 data[1] & (1 << 27) ? "" : "not "); in decode_3d_965()
978 instr_out(data, hw_offset, 2, "depth offset\n"); in decode_3d_965()
979 instr_out(data, hw_offset, 3, "%dx%d\n", in decode_3d_965()
980 ((data[3] & 0x0007ffc0) >> 6) + 1, in decode_3d_965()
981 ((data[3] & 0xfff80000) >> 19) + 1); in decode_3d_965()
982 instr_out(data, hw_offset, 4, "volume depth\n"); in decode_3d_965()
989 if ((data[0] & 0xffff0000) >> 16 == opcodes_3d[opcode].opcode) { in decode_3d_965()
993 instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name); in decode_3d_965()
995 len = (data[0] & 0xff) + 2; in decode_3d_965()
1006 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_3d_965()
1012 instr_out(data, hw_offset, 0, "3D UNKNOWN\n"); in decode_3d_965()
1019 decode_3d_i830(uint32_t *data, int count, uint32_t hw_offset, int *failures) in decode_3d_i830() argument
1047 switch ((data[0] & 0x1f000000) >> 24) { in decode_3d_i830()
1049 return decode_3d_primitive(data, count, hw_offset, failures); in decode_3d_i830()
1051 return decode_3d_1d(data, count, hw_offset, failures, 1); in decode_3d_i830()
1053 return decode_3d_1c(data, count, hw_offset, failures); in decode_3d_i830()
1058 if ((data[0] & 0x1f000000) >> 24 == opcodes_3d[opcode].opcode) { in decode_3d_i830()
1061 instr_out(data, hw_offset, 0, "%s\n", opcodes_3d[opcode].name); in decode_3d_i830()
1063 len = (data[0] & 0xff) + 2; in decode_3d_i830()
1074 instr_out(data, hw_offset, i, "dword %d\n", i); in decode_3d_i830()
1080 instr_out(data, hw_offset, 0, "3D UNKNOWN\n"); in decode_3d_i830()
1085 void i915_gem_command_decode(uint32_t *data, int count, uint32_t hw_offset, struct drm_device *dev) in i915_gem_command_decode() argument
1091 switch ((data[index] & 0xe0000000) >> 29) { in i915_gem_command_decode()
1093 index += decode_mi(data + index, count - index, in i915_gem_command_decode()
1097 index += decode_2d(data + index, count - index, in i915_gem_command_decode()
1102 index += decode_3d_965(data + index, count - index, in i915_gem_command_decode()
1105 index += decode_3d(data + index, count - index, in i915_gem_command_decode()
1108 index += decode_3d_i830(data + index, count - index, in i915_gem_command_decode()
1113 instr_out(data, hw_offset, index, "UNKNOWN\n"); in i915_gem_command_decode()