diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2022-09-13 17:21:49 +0200 |
---|---|---|
committer | Andi Shyti <andi.shyti@linux.intel.com> | 2022-09-14 13:20:51 +0200 |
commit | a062b8cf811d49b7ba7203d0ec5bd9fe0b61c66e (patch) | |
tree | c70f6ee7011ba9bc8fd6d490bb3f7fdef037afaf /drivers/gpu/drm/omapdrm/omap_drv.c | |
parent | c9424fa1f856eaf09e09a3381fe998dd6f905bfc (diff) | |
download | linux-a062b8cf811d49b7ba7203d0ec5bd9fe0b61c66e.tar.bz2 |
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 <daniele.ceraolospurio@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Acked-by: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Signed-off-by: Karolina Drobnik <karolina.drobnik@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7377cb3b371a983dce02be69f6611fcf85c822bb.1663081418.git.karolina.drobnik@intel.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_drv.c')
0 files changed, 0 insertions, 0 deletions