diff options
author | Lionel Landwerlin <[email protected]> | 2017-05-30 20:06:48 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-06-06 14:04:37 +0100 |
commit | 2ef73473c8eedab679637334a0af597d26222e0a (patch) | |
tree | 43c31ddabf9bfcf589fdc13e203b98460f728661 /src/intel/tools/aubinator.c | |
parent | 6c655cfeb49a8142c44782c5164619a5860c7706 (diff) |
intel: gen-decoder: rework how we handle groups
The current way of handling groups doesn't seem to be able to handle
MI_LOAD_REGISTER_* with more than one register. This change reworks
the way we handle groups by building a traversal list on loading the
GENXML files.
Let's say you have
Instruction {
Field0
Field1
Field2
Group0 (count=2) {
Field0-0
Field0-1
}
Group1 (count=4) {
Field1-0
Field1-1
}
}
We build of linked on load that goes :
Instruction -> Group0 -> Group1
All of those are gen_group structures, making the traversal trivial.
We just need to iterate groups for the right number of timers (count
field in genxml).
The more fancy case is when you have only a single group of unknown
size (count=0). In that case we keep on reading that group for as long
as we're within the DWordLength of that instruction.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel/tools/aubinator.c')
-rw-r--r-- | src/intel/tools/aubinator.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c index 53b2a27fa90..f481fbe0075 100644 --- a/src/intel/tools/aubinator.c +++ b/src/intel/tools/aubinator.c @@ -95,23 +95,6 @@ valid_offset(uint32_t offset) return offset < gtt_end; } -/** - * Set group variable size for groups with count="0". - * - * By default the group size is fixed and not needed because the struct - * describing a group knows the number of elements. However, for groups with - * count="0" we have a variable number of elements, and the struct describing - * the group only includes one of them. So we calculate the remaining size of - * the group based on the size we get here, and the offset after the last - * element added to the group. - */ -static void -group_set_size(struct gen_group *strct, uint32_t size) -{ - if (strct->variable && strct->elem_size) - strct->group_size = size - (strct->variable_offset / 32); -} - static void decode_group(struct gen_group *strct, const uint32_t *p, int starting_dword) { @@ -740,7 +723,6 @@ parse_commands(struct gen_spec *spec, uint32_t *cmds, int size, int engine) gen_group_get_name(inst), reset_color); if (option_full_decode) { - group_set_size(inst, length); decode_group(inst, p, 0); for (i = 0; i < ARRAY_LENGTH(custom_handlers); i++) { |