From: "Christian König" <christian.koenig@amd.com>
To: Dirk Eibach <dirk.eibach@googlemail.com>, Dieter@nuetzel-hh.de
Cc: dri-devel@lists.freedesktop.org
Subject: Re: PCIe P2P access to GPU memory
Date: Mon, 1 Oct 2018 20:12:52 +0200 [thread overview]
Message-ID: <2eda0bdf-c532-9ef4-c66a-d85108092a20@amd.com> (raw)
In-Reply-To: <CANVMifLdnP+jfb=CBobFqTpK01X_=f68Nc40SUwnN0AcpzxKCA@mail.gmail.com>
Hi Dirk,
> Any ideas?
Could be anything. Most likely cause is that some function things the
two device can't communicate directly with each other.
Please provide a full dmesg and "lspci -t -nn -v" as attachment and note
which devices should communicate with which.
I'm currently on vacation so it could take a while till I have time to
look deeper into this.
Christian.
Am 01.10.2018 um 15:07 schrieb Dirk Eibach:
> Hi Christian,
>
> I took the repository Dieter suggested and gave it a spin. I am not
> sure, if I got the API right.
>
> In userspace I create a bo and get a fd.
> bo = gbm_bo_create(gbm, w, h, GBM_FORMAT_ARGB8888, GBM_BO_USE_LINEAR);
> dmabuf_fd = gbm_bo_get_fd(bo);
>
> Then I pass the fd to the grabber driver. There I get a sgt, that I
> want to pass to the DMA-machine.
> struct dma_buf_attach_info dma_buf_attach_info = {
> .dev = &engine->xdev->pdev->dev,
> .peer2peer = true,
> };
> dma_buf = dma_buf_get(xdma_dma_buf_ioctl.dma_buf_fd);
> dma_buf_attach_info.dmabuf = dma_buf;
> dma_buf_attachment = dma_buf_attach(&dma_buf_attach_info);
> sgt = dma_buf_map_attachment(dma_buf_attachment, DMA_TO_DEVICE);
>
> But the addresses in the sgt do not look like PCIe addresses at at all.
>
> Any ideas?
>
> Cheers
> Dirk
> Am Sa., 29. Sep. 2018 um 11:53 Uhr schrieb Dieter Nützel <Dieter@nuetzel-hh.de>:
>> Hello Dirk,
>>
>> I think Christian is talking about this branch:
>>
>> https://cgit.freedesktop.org/~deathsimple/linux/log/?h=p2p
>>
>> His 'home' is, here:
>> https://cgit.freedesktop.org/~deathsimple/linux/
>>
>> Happy hacking! ;-)
>>
>> Dieter
>>
>> Am 29.09.2018 10:17, schrieb Dirk Eibach:
>>>> This is work in progress.
>>>>
>>>> I published patches to enable DMA_buf P2P a few months ago, but now
>>>> I'm waiting for the PCI subsystem to pick up core support for this.
>>> Great news! Can you give me a link to this series so I can already have
>>> a look?
>>>
>>>> I can prepare you a branch based on current upstream kernel next week
>>>> if you want to test this.
>>> That would be awesome, thanks.
>>>
>>> Cheers
>>> Dirk
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-10-01 18:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 7:00 PCIe P2P access to GPU memory Dirk Eibach
2018-09-29 7:27 ` Koenig, Christian
2018-09-29 8:17 ` Dirk Eibach
2018-09-29 9:53 ` Dieter Nützel
2018-10-01 13:07 ` Dirk Eibach
2018-10-01 18:12 ` Christian König [this message]
2018-10-01 18:47 ` Dirk Eibach
2018-10-03 7:14 ` Daniel Vetter
2018-10-03 8:54 ` Koenig, Christian
2018-10-03 9:06 ` Daniel Vetter
2018-10-03 13:37 ` Christian König
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=2eda0bdf-c532-9ef4-c66a-d85108092a20@amd.com \
--to=christian.koenig@amd.com \
--cc=Dieter@nuetzel-hh.de \
--cc=dirk.eibach@googlemail.com \
--cc=dri-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.