[Intel-gfx] [PATCH 5/5] drm/i915: Convert execbuf code to use vmas
Ben Widawsky
ben at bwidawsk.net
Tue Aug 13 03:50:40 CEST 2013
On Sat, Aug 10, 2013 at 10:13:20AM +0100, Chris Wilson wrote:
> On Fri, Aug 09, 2013 at 10:12:16PM -0700, Ben Widawsky wrote:
> > static int
> > i915_gem_execbuffer_move_to_gpu(struct intel_ring_buffer *ring,
> > - struct list_head *objects)
> > + struct list_head *vmas)
> > {
> > - struct drm_i915_gem_object *obj;
> > + struct i915_vma *vma;
> > uint32_t flush_domains = 0;
> > int ret;
> >
> > - list_for_each_entry(obj, objects, exec_list) {
> > - ret = i915_gem_object_sync(obj, ring);
> > + list_for_each_entry(vma, vmas, exec_list) {
> > + ret = i915_gem_object_sync(vma->obj, ring);
> > if (ret)
> > return ret;
> >
> > - if (obj->base.write_domain & I915_GEM_DOMAIN_CPU)
> > - i915_gem_clflush_object(obj);
> > + if (vma->obj->base.write_domain & I915_GEM_DOMAIN_CPU)
> > + i915_gem_clflush_object(vma->obj);
> >
> > - flush_domains |= obj->base.write_domain;
> > + flush_domains |= vma->obj->base.write_domain;
>
> This, and a few more places, will be neater with a local
> struct drm_i915_gem_object *obj = vma->obj;
> -Chris
>
I got this and the other fixed you requested for needs_reloc_mappable. I
only found one other place that had more than one instance of vma->obj
though.
i915_gem_execbuffer_unreserve_vma
i915_gem_execbuffer_move_to_gpu
Please let me know if I missed one.
--
Ben Widawsky, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list