[PATCH 06/24] drm/i915: Convert the dmabuf object to use the new i915_gem_object_ops

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

 



On Fri, 14 Sep 2012 11:02:02 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> On Tue,  4 Sep 2012 21:02:58 +0100
> Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > @@ -3731,9 +3731,6 @@ void i915_gem_free_object(struct drm_gem_object *gem_obj)
> >  
> >  	trace_i915_gem_object_destroy(obj);
> >  
> > -	if (gem_obj->import_attach)
> > -		drm_prime_gem_destroy(gem_obj, obj->sg_table);
> > -
> >  	if (obj->phys_obj)
> >  		i915_gem_detach_phys_object(dev, obj);
> >  
> > @@ -3755,6 +3752,9 @@ void i915_gem_free_object(struct drm_gem_object *gem_obj)
> >  
> >  	BUG_ON(obj->pages);
> >  
> > +	if (obj->base.import_attach)
> > +		drm_prime_gem_destroy(&obj->base, NULL);
> > +
> >  	drm_gem_object_release(&obj->base);
> >  	i915_gem_info_remove_obj(dev_priv, obj->base.size);
> >  
> 
> Was the order in which destroy happens moved intentionally?

Yes. ;)

> > diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
> > index 4bb1b94..ca3497e 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c
> > @@ -82,7 +82,8 @@ out:
> >  }
> >  
> >  static void i915_gem_unmap_dma_buf(struct dma_buf_attachment *attachment,
> > -			    struct sg_table *sg, enum dma_data_direction dir)
> > +				   struct sg_table *sg,
> > +				   enum dma_data_direction dir)
> >  {
> >  	dma_unmap_sg(attachment->dev, sg->sgl, sg->nents, dir);
> >  	sg_free_table(sg);
> 
> I thought we frown upon unnecessary whitespace fixes in patches which
> have behavioral changes?

Call it a leftover from the time I spent moving much of the common code
to drm_prime.c
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux