[igt-dev] [PATCH i-g-t 7/7] benchmarks/gem_exec_fault: Add softpin mode to support gens with ppgtt

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Fri Oct 15 02:49:05 UTC 2021


On Thu, Oct 14, 2021 at 01:07:37PM -0700, Dixit, Ashutosh wrote:
> On Thu, 14 Oct 2021 01:19:17 -0700, Zbigniew Kempczyński wrote:
> >
> > @@ -127,9 +151,14 @@ static int loop(uint64_t size, unsigned ring, int reps, int ncpus,
> >					obj.alignment = 0;
> >					gem_execbuf(fd, &execbuf);
> >
> > -					/* fault out */
> > -					obj.alignment = 1ull << 63;
> > -					__gem_execbuf(fd, &execbuf);
> > +					if (ahnd) {
> > +						obj.offset = get_offset(ahnd, obj.handle, size, 0);
> > +						obj.flags |= EXEC_OBJECT_PINNED | EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
> > +					} else {
> > +						/* fault out */
> > +						obj.alignment = 1ull << 63;
> > +						__gem_execbuf(fd, &execbuf);
> > +					}
> 
> Bug above, __gem_execbuf should be moved out of the else {}.

No, it shouldn't. Normal execbuf will lead to unbind/bind with new offset
and no 'alignment' fault-out execbuf is necessary.

--
Zbigniew

> 
> With the bug fixed this is:
> 
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>


More information about the igt-dev mailing list