dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb@gmail.com>
To: Thomas Hellstrom <thomas@shipmail.org>
Cc: airlied@redhat.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/ttm: delay freeing of old node during move_memcpy until after iounmap
Date: Thu, 09 Dec 2010 21:15:07 +1000	[thread overview]
Message-ID: <1291893317.12581.23.camel@nisroch> (raw)
In-Reply-To: <4D00835C.3040905@shipmail.org>

On Thu, 2010-12-09 at 08:21 +0100, Thomas Hellstrom wrote:
> On 12/09/2010 03:26 AM, skeggsb@gmail.com wrote:
> > From: Ben Skeggs<bskeggs@redhat.com>
> >
> > Drivers using their own implementation of io_mem_reserve/io_mem_free are
> > likely to store the tracking information for the map in mem.mm_node, so
> > it can't be freed while still mapped.
> >
> > Signed-off-by: Ben Skeggs<bskeggs@redhat.com>
> >    
> 
> Looks good.
Cool, thanks!  Adding dri-devel to CC as I apparently missed it
before :)

Ben.
> 
> 
> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
> 
> 
> > ---
> >   drivers/gpu/drm/ttm/ttm_bo_util.c |    2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > index a89839f..77dbf40 100644
> > --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> > +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> > @@ -370,7 +370,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
> >   	}
> >   	mb();
> >   out2:
> > -	ttm_bo_free_old_node(bo);
> >   	old_copy = *old_mem;
> >   	*old_mem = *new_mem;
> >   	new_mem->mm_node = NULL;
> > @@ -385,6 +384,7 @@ out1:
> >   	ttm_mem_reg_iounmap(bdev, old_mem, new_iomap);
> >   out:
> >   	ttm_mem_reg_iounmap(bdev,&old_copy, old_iomap);
> > +	ttm_bo_mem_put(bo,&old_copy);
> >   	return ret;
> >   }
> >   EXPORT_SYMBOL(ttm_bo_move_memcpy);
> >    
> 

           reply	other threads:[~2010-12-09 11:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4D00835C.3040905@shipmail.org>]

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=1291893317.12581.23.camel@nisroch \
    --to=skeggsb@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thomas@shipmail.org \
    /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