[Intel-gfx] [PATCH 16/18] drm/i915/gtt: One instance of scratch page table/directory
Daniel Vetter
daniel at ffwll.ch
Fri Jun 26 09:44:37 PDT 2015
On Fri, Jun 26, 2015 at 03:05:29PM +0300, Mika Kuoppala wrote:
> Daniel Vetter <daniel at ffwll.ch> writes:
>
> > On Thu, Jun 25, 2015 at 06:35:18PM +0300, Mika Kuoppala wrote:
> >> +static int setup_scratch(struct i915_address_space *vm)
> >> +{
> >> + struct i915_address_space *ggtt_vm = &to_i915(vm->dev)->gtt.base;
> >> +
> >> + if (i915_is_ggtt(vm))
> >> + return setup_scratch_ggtt(vm);
> >> +
> >> + vm->scratch_page = ggtt_vm->scratch_page;
> >> + vm->scratch_pt = ggtt_vm->scratch_pt;
> >> + vm->scratch_pd = ggtt_vm->scratch_pd;
> >> +
> >> + return 0;
> >> +}
> >
> > The point of a ppgtt is full isolation, sharing the scratch page destroys
> > that. Hence nack. If you want a bit of polish, renaming initialize_pd/pt
> > to initialize_scratch_pd/pt would make sense though I think.
> > -Daniel
>
> We already have a shared scratch. This just makes the upper layer
> structures also shared as there is no point of having identical
> scratch pt and scratch pd pointing to the same scratch.
>
> Do we want per ppgtt scratch? I have patches for that also.
Summary of our irc discussion: Yes I think we want a per-ppgtt scratch,
and I even thought we once had such a thing. But didn't digg around in
history tbh.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list