Re: [PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-05-06 Thread Daniel Vetter
On Mon, May 06, 2019 at 10:05:07AM +, Koenig, Christian wrote: > Am 06.05.19 um 10:04 schrieb Daniel Vetter: > > [SNIP] > + /* pin buffer into GTT */ > + return amdgpu_bo_pin(bo, AMDGPU_GEM_DOMAIN_GTT); > >>> This is kinda what I mean with "shouldn't we pin the attachment" - afaiui >

Re: [PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-05-06 Thread Koenig, Christian
Am 06.05.19 um 10:04 schrieb Daniel Vetter: > [SNIP] + /* pin buffer into GTT */ + return amdgpu_bo_pin(bo, AMDGPU_GEM_DOMAIN_GTT); >>> This is kinda what I mean with "shouldn't we pin the attachment" - afaiui >>> this can fail is someone already pinned the buffer into vram. And that >>>

Re: [PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-05-06 Thread Daniel Vetter
On Fri, May 03, 2019 at 02:35:02PM +0200, Christian König wrote: > Am 30.04.19 um 16:16 schrieb Daniel Vetter: > > [SNIP] > > > /** > > > - * amdgpu_gem_map_attach - _buf_ops.attach implementation > > > - * @dma_buf: Shared DMA buffer > > > + * amdgpu_gem_pin_dma_buf - _buf_ops.pin_dma_buf

Re: [PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-05-03 Thread Christian König
Am 30.04.19 um 16:16 schrieb Daniel Vetter: [SNIP] /** - * amdgpu_gem_map_attach - _buf_ops.attach implementation - * @dma_buf: Shared DMA buffer + * amdgpu_gem_pin_dma_buf - _buf_ops.pin_dma_buf implementation + * + * @dma_buf: DMA-buf to pin in memory + * + * Pin the BO which is backing the

Re: [PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-04-30 Thread Daniel Vetter
On Fri, Apr 26, 2019 at 02:36:36PM +0200, Christian König wrote: > The caching of SGT's is actually quite harmful and should probably removed > altogether when all drivers are audited. > > Start by providing a separate DMA-buf export implementation in amdgpu. This is > also a prerequisite of

[PATCH 10/12] drm/amdgpu: add independent DMA-buf export v3

2019-04-26 Thread Christian König
The caching of SGT's is actually quite harmful and should probably removed altogether when all drivers are audited. Start by providing a separate DMA-buf export implementation in amdgpu. This is also a prerequisite of unpinned DMA-buf handling. v2: fix unintended recursion, remove debugging