Re: [PATCH 1/7] drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2

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

 



On Fri, Nov 27, 2020 at 03:11:05PM +0100, Christian König wrote:
> Ping? Daniel any more ideas on this or should we push it?

Occasionally I bit more prose would be nice about why things changed or
so. Iirc the reason I asked about using ttm_sg_tt_init is that it makes it
easier to convince ourselves that we don't mix things up. Maybe add that
(or cover letter next time around). Just helps since at least my silly
brain forgets details like that within days, and is usually terminally
lost when git bisect lands on such a patch. Also helps reviewers stay
motivated sometimes :-)

Anyway I think this looks all reasonable now, on the series:

Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> 
> Thanks,
> Christian.
> 
> Am 25.11.20 um 13:59 schrieb Christian König:
> > This is deprecated.
> > 
> > v2: also use ttm_sg_tt_init to avoid allocating the page array.
> > 
> > Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> > ---
> >   drivers/gpu/drm/radeon/radeon_ttm.c | 11 ++++++-----
> >   1 file changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> > index 0ca381b95d3d..5d00b3dff388 100644
> > --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> > @@ -401,8 +401,8 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_bo_device *bdev, struct ttm_tt *
> >   	if (r)
> >   		goto release_sg;
> > -	drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
> > -					 gtt->ttm.dma_address, ttm->num_pages);
> > +	drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL, gtt->ttm.dma_address,
> > +					 ttm->num_pages);
> >   	return 0;
> > @@ -542,7 +542,7 @@ static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo,
> >   	else
> >   		caching = ttm_cached;
> > -	if (ttm_dma_tt_init(&gtt->ttm, bo, page_flags, caching)) {
> > +	if (ttm_sg_tt_init(&gtt->ttm, bo, page_flags, caching)) {
> >   		kfree(gtt);
> >   		return NULL;
> >   	}
> > @@ -580,8 +580,9 @@ static int radeon_ttm_tt_populate(struct ttm_bo_device *bdev,
> >   	}
> >   	if (slave && ttm->sg) {
> > -		drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
> > -						 gtt->ttm.dma_address, ttm->num_pages);
> > +		drm_prime_sg_to_page_addr_arrays(ttm->sg, NULL,
> > +						 gtt->ttm.dma_address,
> > +						 ttm->num_pages);
> >   		return 0;
> >   	}
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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