[igt-dev] [Intel-gfx] [PATCH i-g-t] amdgpu/amd_prime: Reduce setup time

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 4 14:16:56 UTC 2018


Quoting Daniel Vetter (2018-07-04 14:57:33)
> On Wed, Jul 04, 2018 at 01:38:23PM +0100, Chris Wilson wrote:
> > If we allow 5s (+20% systematic error) to construct the fences, we may
> > reasonably assume that it will take equally as long to consume them. As
> > we only have 10s before the vgem fence times out, there is no margin of
> > safety.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> >  tests/amdgpu/amd_prime.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
> > index bb68ccf31..6c64c3af9 100644
> > --- a/tests/amdgpu/amd_prime.c
> > +++ b/tests/amdgpu/amd_prime.c
> > @@ -348,7 +348,7 @@ static void amd_to_i915(int i915, int amd, amdgpu_device_handle device)
> >       count = 0;
> >       size = 64 << 10;
> >       contexts = malloc(size * sizeof(*contexts));
> > -     igt_until_timeout(5) {
> > +     igt_until_timeout(2) {
> 
> Might be good to put a "need to beat the vgem timeout of 10s" or similar
> comment here. Even fancier would be a bit of igt library to create vgem
> plugs and later on in the could put an igt_assert_still_plugged() to make
> sure we've hit the race fully. Would also be some piece of really nice
> self-documenting code.
> 
> Either way: Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

	igt_until_timeout(2) { /* must all complete within vgem timeout (10s) */
Just fits.

We have a library for creating vgem plugs, amdgpu doesn't yet fit as the
current code uses libdrm_amdgpu and doesn't yet use simple GEM handles.
If we can solve a few more of the common patterns used for i915
(igt_dummyload would get us 90% of the foundations for our testing), the
possibilities are endless.
-Chris


More information about the igt-dev mailing list