<div dir="auto"><div><br>Hi Christian,</div><div dir="auto"><br></div><div dir="auto">Could I simply force it by overwriting peer2peer after the attach call?</div><div dir="auto"><br></div><div dir="auto">Cheers</div><div dir="auto">Dirk</div><div dir="auto"><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dirk,<br>
<br>
> Any ideas?<br>
Could be anything. Most likely cause is that some function things the <br>
two device can't communicate directly with each other.<br>
<br>
Please provide a full dmesg and "lspci -t -nn -v" as attachment and note <br>
which devices should communicate with which.<br>
<br>
I'm currently on vacation so it could take a while till I have time to <br>
look deeper into this.<br>
<br>
Christian.<br>
<br>
Am 01.10.2018 um 15:07 schrieb Dirk Eibach:<br>
> Hi Christian,<br>
><br>
> I took the repository Dieter suggested and gave it a spin. I am not<br>
> sure, if I got the API right.<br>
><br>
> In userspace I create a bo and get a fd.<br>
> bo = gbm_bo_create(gbm, w, h, GBM_FORMAT_ARGB8888, GBM_BO_USE_LINEAR);<br>
> dmabuf_fd = gbm_bo_get_fd(bo);<br>
><br>
> Then I pass the fd to the grabber driver. There I get a sgt, that I<br>
> want to pass to the DMA-machine.<br>
> struct dma_buf_attach_info dma_buf_attach_info = {<br>
> .dev = &engine->xdev->pdev->dev,<br>
> .peer2peer = true,<br>
> };<br>
> dma_buf = dma_buf_get(xdma_dma_buf_ioctl.dma_buf_fd);<br>
> dma_buf_attach_info.dmabuf = dma_buf;<br>
> dma_buf_attachment = dma_buf_attach(&dma_buf_attach_info);<br>
> sgt = dma_buf_map_attachment(dma_buf_attachment, DMA_TO_DEVICE);<br>
><br>
> But the addresses in the sgt do not look like PCIe addresses at at all.<br>
><br>
> Any ideas?<br>
><br>
> Cheers<br>
> Dirk<br>
> Am Sa., 29. Sep. 2018 um 11:53 Uhr schrieb Dieter Nützel <<a href="mailto:Dieter@nuetzel-hh.de" rel="noreferrer noreferrer" target="_blank">Dieter@nuetzel-hh.de</a>>:<br>
>> Hello Dirk,<br>
>><br>
>> I think Christian is talking about this branch:<br>
>><br>
>> <a href="https://cgit.freedesktop.org/~deathsimple/linux/log/?h=p2p" rel="noreferrer noreferrer noreferrer" target="_blank">https://cgit.freedesktop.org/~deathsimple/linux/log/?h=p2p</a><br>
>><br>
>> His 'home' is, here:<br>
>> <a href="https://cgit.freedesktop.org/~deathsimple/linux/" rel="noreferrer noreferrer noreferrer" target="_blank">https://cgit.freedesktop.org/~deathsimple/linux/</a><br>
>><br>
>> Happy hacking! ;-)<br>
>><br>
>> Dieter<br>
>><br>
>> Am 29.09.2018 10:17, schrieb Dirk Eibach:<br>
>>>> This is work in progress.<br>
>>>><br>
>>>> I published patches to enable DMA_buf P2P a few months ago, but now<br>
>>>> I'm waiting for the PCI subsystem to pick up core support for this.<br>
>>> Great news! Can you give me a link to this series so I can already have<br>
>>> a look?<br>
>>><br>
>>>> I can prepare you a branch based on current upstream kernel next week<br>
>>>> if you want to test this.<br>
>>> That would be awesome, thanks.<br>
>>><br>
>>> Cheers<br>
>>> Dirk<br>
>>> _______________________________________________<br>
>>> dri-devel mailing list<br>
>>> <a href="mailto:dri-devel@lists.freedesktop.org" rel="noreferrer noreferrer" target="_blank">dri-devel@lists.freedesktop.org</a><br>
>>> <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
<br>
</blockquote></div></div></div>