142
decode_MI_SET_CONTEXT(struct drm_intel_decode *ctx)
144
uint32_t data = ctx->data[1];
148
instr_out(ctx, 0, "MI_SET_CONTEXT\n");
149
instr_out(ctx, 1, "gtt offset = 0x%x%s%s\n",
151
data & (1<<1)? ", Force Restore": "",
152
data & (1<<0)? ", Restore Inhibit": "");
158
decode_MI_WAIT_FOR_EVENT(struct drm_intel_decode *ctx)
162
uint32_t data = ctx->data[0];
169
switch ((data >> cc_shift) & 0x1f) {
171
cc_wait = ", cc wait 1";
174
cc_wait = ", cc wait 2";
177
cc_wait = ", cc wait 3";
180
cc_wait = ", cc wait 4";
183
cc_wait = ", cc wait 4";
191
instr_out(ctx, 0, "MI_WAIT_FOR_EVENT%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
192
data & (1<<18)? ", pipe B start vblank wait": "",
193
data & (1<<17)? ", pipe A start vblank wait": "",
194
data & (1<<16)? ", overlay flip pending wait": "",
195
data & (1<<14)? ", pipe B hblank wait": "",
196
data & (1<<13)? ", pipe A hblank wait": "",
198
data & (1<<8)? ", plane C pending flip wait": "",
199
data & (1<<7)? ", pipe B vblank wait": "",
200
data & (1<<6)? ", plane B pending flip wait": "",
201
data & (1<<5)? ", pipe B scan line wait": "",
202
data & (1<<4)? ", fbc idle wait": "",
203
data & (1<<3)? ", pipe A vblank wait": "",
204
data & (1<<2)? ", plane A pending flip wait": "",
205
data & (1<<1)? ", plane A scan line wait": "");
207
instr_out(ctx, 0, "MI_WAIT_FOR_EVENT%s%s%s%s%s%s%s%s%s%s%s%s\n",
208
data & (1<<20)? ", sprite C pending flip wait": "", /* ivb */
210
data & (1<<13)? ", pipe B hblank wait": "",
211
data & (1<<11)? ", pipe B vblank wait": "",
212
data & (1<<10)? ", sprite B pending flip wait": "",
213
data & (1<<9)? ", plane B pending flip wait": "",
214
data & (1<<8)? ", plane B scan line wait": "",
215
data & (1<<5)? ", pipe A hblank wait": "",
216
data & (1<<3)? ", pipe A vblank wait": "",
217
data & (1<<2)? ", sprite A pending flip wait": "",
218
data & (1<<1)? ", plane A pending flip wait": "",
219
data & (1<<0)? ", plane A scan line wait": "");
142
226
decode_mi(struct drm_intel_decode *ctx)
144
228
unsigned int opcode, len = -1;
164
249
{ 0x00, 0, 1, 1, "MI_NOOP" },
165
250
{ 0x11, 0x3f, 2, 2, "MI_OVERLAY_FLIP" },
166
251
{ 0x07, 0, 1, 1, "MI_REPORT_HEAD" },
167
{ 0x18, 0x3f, 2, 2, "MI_SET_CONTEXT" },
252
{ 0x18, 0x3f, 2, 2, "MI_SET_CONTEXT", decode_MI_SET_CONTEXT },
168
253
{ 0x20, 0x3f, 3, 4, "MI_STORE_DATA_IMM" },
169
254
{ 0x21, 0x3f, 3, 4, "MI_STORE_DATA_INDEX" },
170
255
{ 0x24, 0x3f, 3, 3, "MI_STORE_REGISTER_MEM" },
171
256
{ 0x02, 0, 1, 1, "MI_USER_INTERRUPT" },
172
{ 0x03, 0, 1, 1, "MI_WAIT_FOR_EVENT" },
257
{ 0x03, 0, 1, 1, "MI_WAIT_FOR_EVENT", decode_MI_WAIT_FOR_EVENT },
173
258
{ 0x16, 0x7f, 3, 3, "MI_SEMAPHORE_MBOX" },
174
259
{ 0x26, 0x1f, 3, 4, "MI_FLUSH_DW" },
175
260
{ 0x0b, 0, 1, 1, "MI_SUSPEND_FLUSH"},
261
}, *opcode_mi = NULL;
178
263
/* check instruction length */
179
264
for (opcode = 0; opcode < sizeof(opcodes_mi) / sizeof(opcodes_mi[0]);
3115
3204
{ 0x7829, 0x00ff, 2, 2, "3DSTATE_BINDING_TABLE_POINTERS_GS" },
3116
3205
{ 0x782a, 0x00ff, 2, 2, "3DSTATE_BINDING_TABLE_POINTERS_PS" },
3117
3206
{ 0x782b, 0x00ff, 2, 2, "3DSTATE_SAMPLER_STATE_POINTERS_VS" },
3207
{ 0x782c, 0x00ff, 2, 2, "3DSTATE_SAMPLER_STATE_POINTERS_HS" },
3208
{ 0x782d, 0x00ff, 2, 2, "3DSTATE_SAMPLER_STATE_POINTERS_DS" },
3118
3209
{ 0x782e, 0x00ff, 2, 2, "3DSTATE_SAMPLER_STATE_POINTERS_GS" },
3119
3210
{ 0x782f, 0x00ff, 2, 2, "3DSTATE_SAMPLER_STATE_POINTERS_PS" },
3120
3211
{ 0x7830, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_VS },
3133
3224
{ 0x790b, 0xffff, 4, 4, "3DSTATE_GS_SVB_INDEX" },
3134
3225
{ 0x790d, 0xffff, 3, 3, "3DSTATE_MULTISAMPLE", 6 },
3135
3226
{ 0x790d, 0xffff, 4, 4, "3DSTATE_MULTISAMPLE", 7 },
3136
{ 0x7910, 0xffff, 2, 2, "3DSTATE_CLEAR_PARAMS" },
3227
{ 0x7910, 0x00ff, 2, 2, "3DSTATE_CLEAR_PARAMS" },
3137
3228
{ 0x7912, 0x00ff, 2, 2, "3DSTATE_PUSH_CONSTANT_ALLOC_VS" },
3229
{ 0x7913, 0x00ff, 2, 2, "3DSTATE_PUSH_CONSTANT_ALLOC_HS" },
3230
{ 0x7914, 0x00ff, 2, 2, "3DSTATE_PUSH_CONSTANT_ALLOC_DS" },
3231
{ 0x7915, 0x00ff, 2, 2, "3DSTATE_PUSH_CONSTANT_ALLOC_GS" },
3138
3232
{ 0x7916, 0x00ff, 2, 2, "3DSTATE_PUSH_CONSTANT_ALLOC_PS" },
3139
3233
{ 0x7917, 0x00ff, 2, 2+128*2, "3DSTATE_SO_DECL_LIST" },
3140
3234
{ 0x7918, 0x00ff, 4, 4, "3DSTATE_SO_BUFFER" },
3312
3406
instr_out(ctx, i,
3313
3407
"buffer %d: %svalid, type 0x%04x, "
3314
3408
"src offset 0x%04x bytes\n",
3315
data[i] >> (IS_GEN6(devid) ? 26 : 27),
3316
data[i] & (1 << (IS_GEN6(devid) ? 25 : 26)) ?
3409
data[i] >> ((IS_GEN6(devid) || IS_GEN7(devid)) ? 26 : 27),
3410
data[i] & (1 << ((IS_GEN6(devid) || IS_GEN7(devid)) ? 25 : 26)) ?
3317
3411
"" : "in", (data[i] >> 16) & 0x1ff,
3318
3412
data[i] & 0x07ff);