From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 06/24] drm/i915: Convert the dmabuf object to use the new i915_gem_object_ops Date: Fri, 14 Sep 2012 19:24:48 +0100 Message-ID: <6c3329$62jm4n@orsmga002.jf.intel.com> References: <1346788996-19080-1-git-send-email-chris@chris-wilson.co.uk> <1346788996-19080-7-git-send-email-chris@chris-wilson.co.uk> <20120914110202.67c56a34@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B6CCA0EFD for ; Fri, 14 Sep 2012 11:25:17 -0700 (PDT) In-Reply-To: <20120914110202.67c56a34@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 14 Sep 2012 11:02:02 -0700, Ben Widawsky wrote: > On Tue, 4 Sep 2012 21:02:58 +0100 > Chris Wilson 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