Re: [PATCH 1/3] drm/i915: Assert we do not try to expand VMA for hugepage inside GGTT

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

 



Quoting Matthew Auld (2017-10-08 16:01:00)
> On 8 October 2017 at 14:43, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> > We only apply the hugepage PD redirection inside the ppGTT, so during
> > i915_vma_insert() we want to exclude the GGTT from the additional
> > alignment constraints (thereby avoiding the extra GTT pressure from
> > fragmentation). Add an assert to document that intention alongside the
> > comment.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Matthew Auld <matthew.william.auld@xxxxxxxxx>
> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_vma.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> > index 72e86b32ab41..2d27027eaf85 100644
> > --- a/drivers/gpu/drm/i915/i915_vma.c
> > +++ b/drivers/gpu/drm/i915/i915_vma.c
> > @@ -513,6 +513,8 @@ i915_vma_insert(struct i915_vma *vma, u64 size, u64 alignment, u64 flags)
> >                                 rounddown_pow_of_two(vma->page_sizes.sg |
> >                                                      I915_GTT_PAGE_SIZE_2M);
> >
> > +                       GEM_BUG_ON((flags & PIN_USER) == 0); /* No GGTT! */
> > +
> Maybe GEM_BUG_ON(i915_is_ggtt(vm)); should also catch misuse with the appgtt?

It is not categorically misuse with appgtt, I thought we could support
large pages there (even if we don't atm)? Hence why I was hesitant at
ruling it out completely.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux