[Intel-gfx] [PATCH 09/22] drm/i915: Split insertion/binding of an object into the VM

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 28 09:34:36 UTC 2016


On Thu, Jul 28, 2016 at 12:25:06PM +0300, Joonas Lahtinen wrote:
> On ke, 2016-07-27 at 12:14 +0100, Chris Wilson wrote:
> > Split the insertion into the address space's range manager and binding
> > of that object into the GTT to simplify the code flow when pinning a
> > VMA.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 35 +++++++++++++++--------------------
> >  1 file changed, 15 insertions(+), 20 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index f47a9e450239..1773b35703bc 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -2966,12 +2966,12 @@ static bool i915_gem_valid_gtt_space(struct i915_vma *vma,
> >   * @flags: mask of PIN_* flags to use
> >   */
> >  static struct i915_vma *
> > -i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
> > -			   struct i915_address_space *vm,
> > -			   const struct i915_ggtt_view *ggtt_view,
> > -			   u64 size,
> > -			   u64 alignment,
> > -			   u64 flags)
> > +i915_gem_object_insert_into_vm(struct drm_i915_gem_object *obj,
> > +			       struct i915_address_space *vm,
> > +			       const struct i915_ggtt_view *ggtt_view,
> > +			       u64 size,
> > +			       u64 alignment,
> > +			       u64 flags)
> 
> Could be just object_insert_into_vm() ? Or will you expose it later.

It becomes i915_vma_insert() very shortly. Tentative plans to move it
out of i915_gem.c
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list