Hi Christian,
Could I simply force it by overwriting peer2peer after the attach call?
Cheers
Dirk
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@xxxxxxxxxxxxx>:
>> 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@xxxxxxxxxxxxxxxxxxxxx
>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel