dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/i915: unpin backing storage in dmabuf_unmap
Date: Wed, 7 Aug 2013 11:19:38 +0200	[thread overview]
Message-ID: <20130807091938.GU22035@phenom.ffwll.local> (raw)
In-Reply-To: <1375866908-5000-3-git-send-email-daniel.vetter@ffwll.ch>

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 <maarten.lankhorst@canonical.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

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

  reply	other threads:[~2013-08-07  9:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  9:15 [PATCH 0/3] Small i915/exynos prime cleanup Daniel Vetter
2013-08-07  9:15 ` [PATCH 1/3] drm: use common drm_gem_dmabuf_release in i915/exynos drivers Daniel Vetter
2013-08-07  9:37   ` [Intel-gfx] " Chris Wilson
2013-08-07  9:40   ` Inki Dae
2013-08-07  9:55     ` Daniel Vetter
2013-08-07 10:18       ` Joonyoung Shim
2013-08-07 10:21         ` Daniel Vetter
2013-08-07 10:29           ` Joonyoung Shim
2013-08-07 12:01           ` Inki Dae
2013-08-07 12:07             ` Daniel Vetter
2013-08-07 12:37               ` Inki Dae
2013-08-07 23:21                 ` Daniel Vetter
2013-08-08  4:32                   ` Inki Dae
2013-08-08  4:39                     ` [PATCH 1/4] drm/exynos: explicit store base gem object in dma_buf->priv Inki Dae
2013-08-08  4:56                       ` Inki Dae
2013-08-08  6:58                         ` Daniel Vetter
2013-08-08  6:31                     ` [PATCH 1/3] drm: use common drm_gem_dmabuf_release in i915/exynos drivers Daniel Vetter
2013-08-07  9:15 ` [PATCH 2/3] drm/i915: unpin backing storage in dmabuf_unmap Daniel Vetter
2013-08-07  9:19   ` Daniel Vetter [this message]
2013-08-07  9:29   ` [Intel-gfx] " Chris Wilson
2013-08-07  9:49     ` Daniel Vetter
2013-08-07 10:09       ` [PATCH 1/2] " Daniel Vetter
2013-08-07 10:09         ` [PATCH 2/2] drm/i915: no interruptible locking for dma_buf->map Daniel Vetter
2013-08-07 10:30           ` Chris Wilson
2013-08-07 10:49             ` Daniel Vetter
2013-08-07 10:40         ` [PATCH 1/2] drm/i915: unpin backing storage in dmabuf_unmap Maarten Lankhorst
2013-08-08  0:50         ` Konrad Rzeszutek Wilk
2013-08-08  1:20           ` Chris Wilson
2013-08-07  9:15 ` [PATCH 3/3] drm/i915: explicit store base gem object in dma_buf->priv Daniel Vetter
2013-08-07  9:43   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130807091938.GU22035@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox