Re: [PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-12 Thread Jason Gunthorpe
On Wed, Mar 11, 2020 at 02:51:57PM +0100, Christian König wrote: > +/** > + * amdgpu_vram_mgr_alloc_sgt - allocate and fill a sg table > + * > + * @adev: amdgpu device pointer > + * @mem: TTM memory object > + * @dev: the other device > + * @dir: dma direction > + * @sgt: resulting sg table > + * >

Re: [PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-12 Thread Jason Gunthorpe
On Wed, Mar 11, 2020 at 02:51:57PM +0100, Christian König wrote: > +/** > + * amdgpu_vram_mgr_alloc_sgt - allocate and fill a sg table > + * > + * @adev: amdgpu device pointer > + * @sgt: sg table to free Wrong kdoc in many ways > + * Free a previously allocate sg table. > + */ > +void amdgpu_v

Re: [PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-11 Thread Alex Deucher
On Wed, Mar 11, 2020 at 9:52 AM Christian König wrote: > > We should be able to do this now after checking all the prerequisites. > > v2: fix entrie count in the sgt > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 56 --- > drivers/gpu/drm/amd/am

[PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-11 Thread Christian König
We should be able to do this now after checking all the prerequisites. v2: fix entrie count in the sgt Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 56 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_