Linux Media Controller development
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: RFC: unpinned DMA-buf exporting
Date: Mon, 12 Mar 2018 20:15:40 +0100	[thread overview]
Message-ID: <e4b847f4-f6e7-6284-eaec-6bd3e1945c2d@gmail.com> (raw)
In-Reply-To: <20180312172401.GM8589@phenom.ffwll.local>

Am 12.03.2018 um 18:24 schrieb Daniel Vetter:
> On Fri, Mar 09, 2018 at 08:11:40PM +0100, Christian K??nig wrote:
>> This set of patches adds an option invalidate_mappings callback to each
>> DMA-buf attachment which can be filled in by the importer.
>>
>> This callback allows the exporter to provided the DMA-buf content
>> without pinning it. The reservation objects lock acts as synchronization
>> point for buffer moves and creating mappings.
>>
>> This set includes an implementation for amdgpu which should be rather
>> easily portable to other DRM drivers.
> Bunch of higher level comments, and one I've forgotten in reply to patch
> 1:
>
> - What happens when a dma-buf is pinned (e.g. i915 loves to pin buffers
>    for scanout)?

When you need to pin an imported DMA-buf you need to detach and reattach 
without the invalidate_mappings callback.

> - pulling the dma-buf implementations into amdgpu makes sense, that's
>    kinda how it was meant to be anyway. The gem prime helpers are a bit too
>    much midlayer for my taste (mostly because nvidia wanted to bypass the
>    EXPORT_SYMBOL_GPL of core dma-buf, hooray for legal bs). We can always
>    extract more helpers once there's more ttm based drivers doing this.

Yeah, I though to abstract that similar to the AGP backend.

Just moving some callbacks around in TTM should be sufficient to 
de-midlayer the whole thing.

Thanks,
Christian.

>
> Overall I like, there's some details to figure out first.
> -Daniel

  reply	other threads:[~2018-03-12 19:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 19:11 RFC: unpinned DMA-buf exporting Christian König
2018-03-09 19:11 ` [PATCH 1/4] dma-buf: add optional invalidate_mappings callback Christian König
2018-03-12 17:07   ` Daniel Vetter
2018-03-12 19:13     ` Christian König
2018-03-13 15:17       ` Daniel Vetter
2018-03-13 15:52         ` Christian König
2018-03-13 16:00           ` Daniel Vetter
2018-03-13 17:20             ` Christian König
2018-03-15  9:20               ` Daniel Vetter
2018-03-15  9:56                 ` Christian König
2018-03-15 11:02                   ` Daniel Vetter
2018-03-09 19:11 ` [PATCH 2/4] drm/ttm: keep a reference to transfer pipelined BOs Christian König
2018-03-09 19:11 ` [PATCH 3/4] drm/amdgpu: add independent DMA-buf export Christian König
2018-03-09 19:11 ` [PATCH 4/4] drm/amdgpu: add independent DMA-buf import Christian König
2018-03-12 17:24 ` RFC: unpinned DMA-buf exporting Daniel Vetter
2018-03-12 19:15   ` Christian König [this message]
2018-03-12 19:41     ` Daniel Vetter

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=e4b847f4-f6e7-6284-eaec-6bd3e1945c2d@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.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