AMD-GFX Archive on lore.kernel.org
 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, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.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

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

  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
     [not found] ` <20180309191144.1817-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
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
     [not found]             ` <2866813a-f2ab-0589-ee40-30935e59d3d7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-13 16:00               ` Daniel Vetter
     [not found]                 ` <20180313160052.GK4788-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-13 17:20                   ` Christian König
     [not found]                     ` <052a6595-9fc3-48a6-9366-67ca2f2da17e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-15  9:20                       ` Daniel Vetter
     [not found]                         ` <20180315092013.GC25297-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-03-15  9:56                           ` Christian König
     [not found]                             ` <d9946822-cea1-f774-d6dc-94ec970b6694-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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]
     [not found]       ` <e4b847f4-f6e7-6284-eaec-6bd3e1945c2d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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