Re: [PATCH i-g-t] i915/gem_softpin: Check the last 32b page is excluded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tang, CQ (2020-12-16 21:23:04)
> 
> 
> > -----Original Message-----
> > From: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Sent: Wednesday, December 16, 2020 12:53 PM
> > To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>; Tang, CQ <cq.tang@xxxxxxxxx>
> > Subject: [PATCH i-g-t] i915/gem_softpin: Check the last 32b page is excluded
> > 
> > In order to prevent issues with 32b stateless address, the last page under 4G
> > is excluded for non-48b objects.
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: CQ Tang <cq.tang@xxxxxxxxx>
> > ---
> >  tests/i915/gem_softpin.c | 37
> > +++++++++++++++++++++++++++++++++++++
> >  1 file changed, 37 insertions(+)
> > 
> > diff --git a/tests/i915/gem_softpin.c b/tests/i915/gem_softpin.c index
> > a3e6dcac3..703beb77d 100644
> > --- a/tests/i915/gem_softpin.c
> > +++ b/tests/i915/gem_softpin.c
> > @@ -156,6 +156,39 @@ static void test_zero(int i915)
> >       gem_close(i915, object.handle);
> >  }
> > 
> > +static void test_32b_last_page(int i915) {
> > +     uint64_t sz, gtt = gem_aperture_size(i915);
> > +     struct drm_i915_gem_exec_object2 object = {
> > +             .flags = EXEC_OBJECT_PINNED,
> > +     };
> > +     struct drm_i915_gem_execbuffer2 execbuf = {
> > +             .buffers_ptr = to_user_pointer(&object),
> > +             .buffer_count = 1,
> > +     };
> > +
> > +     /*
> > +      * The last page under 32b is excluded for !48b objects in order to
> > +      * prevent issues with stateless addressing.
> > +      */
> > +
> > +     igt_require(gtt >= 1ull << 32);
> > +     object.handle = batch_create(i915, &sz),
> 
> Where is this batch_create() version?

In upstream. Just the regular batch_create() but returning the allocated
size.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux