Re: [PATCH 15/22] drm/i915: Remove highly confusing i915_gem_obj_ggtt_pin()

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

 



On Thu, Jul 28, 2016 at 01:38:14PM +0300, Joonas Lahtinen wrote:
> On ke, 2016-07-27 at 12:14 +0100, Chris Wilson wrote:
> > Since i915_gem_obj_ggtt_pin() is an idiom breaking curry function for
> > i915_gem_object_ggtt_pin(), spare us the confustion and remove it.
> 
> confustion should be combustion or confusion
> 
> > @@ -3741,7 +3742,8 @@ i915_gem_object_ggtt_pin(struct
> > drm_i915_gem_object *obj,
> >         struct i915_vma *vma;
> >         int ret;
> >  
> > -       BUG_ON(!view);
> > +       if (!view)
> > +               view = &i915_ggtt_view_normal;
> > 
> 
> Convert other calling sites to take advantage of this if,

Patches have already been sent to do so, and will be along later as part
of the VMA handling outside of execbuf.

> and also fix the error handling;

Hmm, what have I missed?

> "i915_is_ggtt(vm) ? &i915_ggtt_view_normal : NULL"
> is used in i915_gem_object_pin and i915_gem_obj_lookup_or_create_vma

They are queued for removal.
 
> The wrappers were introduced to reduce churn, which we're currently not
> having any shortage of.

I'm not a big fan of temporary API that sticks around and only made our
mistakes more glaring. :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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