aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/common/gen_decoder.c
diff options
context:
space:
mode:
authorToni Lönnberg <[email protected]>2018-11-07 16:50:32 +0200
committerLionel Landwerlin <[email protected]>2018-11-13 15:10:12 +0000
commit102dadec811be75f61e22cea36268379bb545772 (patch)
tree28785d89e3441a8bf66031afc90396147b8b35bc /src/intel/common/gen_decoder.c
parenta6aab7e4364709778652f11586607dfac7284c4e (diff)
intel/decoder: tools: Use engine for decoding batch instructions
The engine to which the batch was sent to is now set to the decoder context when decoding the batch. This is needed so that we can distinguish between instructions as the render and video pipe share some of the instruction opcodes. v2: The engine is now in the decoder context and the batch decoder uses a local function for finding the instruction for an engine. v3: Spec uses engine_mask now instead of engine, replaced engine class enums with the definitions from UAPI. v4: Fix up aubinator_viewer (Lionel) Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/common/gen_decoder.c')
-rw-r--r--src/intel/common/gen_decoder.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c
index 326768fd721..50ef2c4204f 100644
--- a/src/intel/common/gen_decoder.c
+++ b/src/intel/common/gen_decoder.c
@@ -733,12 +733,15 @@ void gen_spec_destroy(struct gen_spec *spec)
}
struct gen_group *
-gen_spec_find_instruction(struct gen_spec *spec, const uint32_t *p)
+gen_spec_find_instruction(struct gen_spec *spec,
+ enum drm_i915_gem_engine_class engine,
+ const uint32_t *p)
{
hash_table_foreach(spec->commands, entry) {
struct gen_group *command = entry->data;
uint32_t opcode = *p & command->opcode_mask;
- if (opcode == command->opcode)
+ if ((command->engine_mask & I915_ENGINE_CLASS_TO_MASK(engine)) &&
+ opcode == command->opcode)
return command;
}