From: Daniel Vetter Subject: Re: [PATCH 2/3] drm/i915: unpin backing storage in dmabuf_unmap Date: Wed, 7 Aug 2013 11:19:38 +0200 Message-ID: <20130807091938.GU22035@phenom.ffwll.local> References: <1375866908-5000-1-git-send-email-daniel.vetter@ffwll.ch> <1375866908-5000-3-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by gabe.freedesktop.org (Postfix) with ESMTP id D1FC7E6D8C for ; Wed, 7 Aug 2013 02:19:32 -0700 (PDT) Received: by mail-wg0-f49.google.com with SMTP id y10so476867wgg.28 for ; Wed, 07 Aug 2013 02:19:32 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1375866908-5000-3-git-send-email-daniel.vetter@ffwll.ch> 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: DRI Development Cc: Maarten Lankhorst , Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Aug 07, 2013 at 11:15:07AM +0200, Daniel Vetter wrote: > This fixes a WARN in i915_gem_free_object when the > obj->pages_pin_count isn't 0. > > Reported-by: Maarten Lankhorst > Cc: Maarten Lankhorst > Signed-off-by: Daniel Vetter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67391 > --- > drivers/gpu/drm/i915/i915_gem_dmabuf.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/i915_gem_dmabuf.c > index 63ee1a9..0bf3d51 100644 > --- a/drivers/gpu/drm/i915/i915_gem_dmabuf.c > +++ b/drivers/gpu/drm/i915/i915_gem_dmabuf.c > @@ -85,9 +85,13 @@ static void i915_gem_unmap_dma_buf(struct dma_buf_attachment *attachment, > struct sg_table *sg, > enum dma_data_direction dir) > { > + struct drm_i915_gem_object *obj = attachment->dmabuf->priv; > + > dma_unmap_sg(attachment->dev, sg->sgl, sg->nents, dir); > sg_free_table(sg); > kfree(sg); > + > + i915_gem_object_unpin_pages(obj); > } > > static void *i915_gem_dmabuf_vmap(struct dma_buf *dma_buf) > -- > 1.8.3.2 > -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch