Re: [PATCH] drm/ttm: delay freeing of old node during move_memcpy until after iounmap

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

 



On Thu, 2010-12-09 at 08:21 +0100, Thomas Hellstrom wrote:
> On 12/09/2010 03:26 AM, skeggsb@xxxxxxxxx wrote:
> > From: Ben Skeggs<bskeggs@xxxxxxxxxx>
> >
> > 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@xxxxxxxxxx>
> >    
> 
> Looks good.
Cool, thanks!  Adding dri-devel to CC as I apparently missed it
before :)

Ben.
> 
> 
> Reviewed-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
> 
> 
> > ---
> >   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);
> >    
> 


_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux