diff options
author | Chris Wilson <[email protected]> | 2022-09-13 17:21:49 +0200 |
---|---|---|
committer | Andi Shyti <[email protected]> | 2022-09-14 13:20:51 +0200 |
commit | a062b8cf811d49b7ba7203d0ec5bd9fe0b61c66e (patch) | |
tree | c70f6ee7011ba9bc8fd6d490bb3f7fdef037afaf /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | c9424fa1f856eaf09e09a3381fe998dd6f905bfc (diff) |
drm/i915/selftests: Check for incomplete LRI from the context image
In order to keep the context image parser simple, we assume that all
commands follow a similar format. A few, especially not MI commands on
the render engines, have fixed lengths not encoded in a length field.
This caused us to incorrectly skip over 3D state commands, and start
interpreting context data as instructions. Eventually, as Daniele
discovered, this would lead us to find addition LRI as part of the data
and mistakenly add invalid LRI commands to the context probes.
Stop parsing after we see the first !MI command, as we know we will have
seen all the context registers by that point. (Mostly true for all gen
so far, though the render context does have LRI after the first page
that we have been ignoring so far. It would be useful to extract those
as well so that we have the full list of user accessible registers.)
Similarly, emit a warning if we do try to emit an invalid zero-length
LRI.
Testcase: igt@i915_selftest@live@gt_lrc
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6580
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6670
Reported-by: Daniele Ceraolo Spurio <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Signed-off-by: Ramalingam C <[email protected]>
Acked-by: Thomas Hellstrom <[email protected]>
Signed-off-by: Karolina Drobnik <[email protected]>
Reviewed-by: Gwan-gyeong Mun <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/7377cb3b371a983dce02be69f6611fcf85c822bb.1663081418.git.karolina.drobnik@intel.com
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions