[Intel-gfx] [PATCH] drm/i915/selftests: Check the context size
Chris Wilson
chris at chris-wilson.co.uk
Fri Aug 16 18:50:21 UTC 2019
Quoting Daniele Ceraolo Spurio (2019-08-16 19:43:47)
>
>
> On 8/16/19 10:58 AM, Chris Wilson wrote:
> > Add a redzone to our context image and check the HW does not write into
> > after a context save, to verify that we have the correct context size.
> > (This does vary with feature bits, so test with a live setup that should
> > match how we run userspace.)
> >
>
> On newer gens the data saved during the ctx switch is variable, based on
> the type of switch and the current state of the HW, e.g. some state is
> only saved during a preemption, and the ctx layout is compressed
> accordingly. We'd need the test to generate the maximum possible size
> (and I have no idea which usage case produces that), but I don't think
> that'd scale well from gen to gen.
I'd take this as a starting point, and we can definitely generate
preemption events easily etc -- it's only when it start depending on state
set by userspace do we run into logistical problems (I can only dread
encountering such a bug in the wild).
So v2, add a redzone everywhere and check on context unpinning.
-Chris
More information about the Intel-gfx
mailing list