Lines Matching refs:cmd
130 } cmd; member
201 .cmd = { (op & ~0u << (opm)), ~0u << (opm) }, \
820 u32 curr = desc->cmd.value & desc->cmd.mask; in validate_cmds_sorted()
928 cmd_header_key(desc->cmd.value)); in init_hash_table()
1085 if (((cmd_header ^ desc->cmd.value) & desc->cmd.mask) == 0) in find_cmd_in_table()
1108 if (((cmd_header ^ desc->cmd.value) & desc->cmd.mask) == 0) in find_cmd()
1119 default_desc->cmd.value = cmd_header; in find_cmd()
1120 default_desc->cmd.mask = ~0u << MIN_OPCODE_SHIFT; in find_cmd()
1237 const u32 cmd) in cmd_desc_is() argument
1239 return desc->cmd.value == (cmd & desc->cmd.mask); in cmd_desc_is()
1244 const u32 *cmd, u32 length) in check_cmd() argument
1250 DRM_DEBUG("CMD: Rejected command: 0x%08X\n", *cmd); in check_cmd()
1265 const u32 reg_addr = cmd[offset] & desc->reg.mask; in check_cmd()
1271 reg_addr, *cmd, engine->name); in check_cmd()
1294 (cmd[offset + 1] & reg->mask) != reg->value)) { in check_cmd()
1315 u32 condition = cmd[offset] & in check_cmd()
1324 *cmd, engine->name); in check_cmd()
1328 dword = cmd[desc->bits[i].offset] & in check_cmd()
1333 *cmd, in check_cmd()
1345 static int check_bbstart(u32 *cmd, u32 offset, u32 length, in check_bbstart() argument
1366 jump_target = *(u64 *)(cmd + 1); in check_bbstart()
1386 *(u64 *)(cmd + 1) = shadow_addr + target_cmd_offset; in check_bbstart()
1447 u32 *cmd, *batch_end, offset = 0; in intel_engine_cmd_parser() local
1455 GEM_BUG_ON(!IS_ALIGNED(batch_offset, sizeof(*cmd))); in intel_engine_cmd_parser()
1456 GEM_BUG_ON(!IS_ALIGNED(batch_length, sizeof(*cmd))); in intel_engine_cmd_parser()
1461 cmd = copy_batch(shadow->obj, batch->obj, in intel_engine_cmd_parser()
1464 if (IS_ERR(cmd)) { in intel_engine_cmd_parser()
1466 return PTR_ERR(cmd); in intel_engine_cmd_parser()
1482 batch_end = cmd + batch_length / sizeof(*batch_end); in intel_engine_cmd_parser()
1486 if (*cmd == MI_BATCH_BUFFER_END) in intel_engine_cmd_parser()
1489 desc = find_cmd(engine, *cmd, desc, &default_desc); in intel_engine_cmd_parser()
1491 DRM_DEBUG("CMD: Unrecognized command: 0x%08X\n", *cmd); in intel_engine_cmd_parser()
1499 length = (*cmd & desc->length.mask) + LENGTH_BIAS; in intel_engine_cmd_parser()
1501 if ((batch_end - cmd) < length) { in intel_engine_cmd_parser()
1503 *cmd, in intel_engine_cmd_parser()
1505 batch_end - cmd); in intel_engine_cmd_parser()
1510 if (!check_cmd(engine, desc, cmd, length)) { in intel_engine_cmd_parser()
1516 ret = check_bbstart(cmd, offset, length, batch_length, in intel_engine_cmd_parser()
1525 cmd += length; in intel_engine_cmd_parser()
1527 if (cmd >= batch_end) { in intel_engine_cmd_parser()
1551 cmd = page_mask_bits(shadow->obj->mm.mapping); in intel_engine_cmd_parser()
1552 *cmd = MI_BATCH_BUFFER_END; in intel_engine_cmd_parser()