On Thu, 2015-10-08 at 12:02 +0100, Chris Wilson wrote:
> On Thu, Oct 08, 2015 at 11:54:29AM +0530, ankitprasad.r.sha...@intel.com 
> wrote:
> > +   /* stolen objects are already pinned to prevent shrinkage */
> > +   memset(&node, 0, sizeof(node));
> > +   ret = drm_mm_insert_node_in_range_generic(&i915->gtt.base.mm,
> > +                                             &node,
> > +                                             4096, 0, I915_CACHE_NONE,
> > +                                             0, i915->gtt.mappable_end,
> > +                                             DRM_MM_SEARCH_DEFAULT,
> > +                                             DRM_MM_CREATE_DEFAULT);
> > +   if (ret)
> > +           return ret;
> > +
> > +   i915->gtt.base.insert_entries(&i915->gtt.base, obj->pages,
> > +                                 node.start, I915_CACHE_NONE, 0);
> 
> This was written using an insert_page() function you don't have. Either
> grab that as well, or you need to pin the entire object into the GGTT,
> i.e. i915_gem_obj_ggtt_pin(obj, 0, PIN_MAPPABLE); note that to do so
> will also need to be very careful to handle the pinning of obj->pages
> and the introduction of a new GGTT vma.

We thought to implement the second alternative, but as you mentioned
handling the pinning of obj->pages and the introduction of a new GGTT
vma, is a bit messy.

Can you please share the insert_page() function?

Thanks,
Ankit

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to