Running into problems with UDMABUF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gerd,

I'm running into a problem trying to use UDMABUF and I'm not sure if it's a bug in udmabuf, or I'm just using it wrong.

I create a UDMABUF in userspace, enable CPU access to it, copy some data, disable CPU access, then register it with the IIO subsystem using an ioctl I'm working on (not yet upstream).

In udmabuf.c, the "get_sg_table" function is first called by the "begin_cpu_udmabuf", and then called a second time by "map_udmabuf" when the IIO subsystem creates a dma_buf_attachment then maps it.

Now the behaviour I'm seeing, is that the first call to "dma_map_sgtable" in get_sg_table sets sg->nents == 1 which is equal to sg_nents(sg->sgl) and as such is the expected value, but the second call to "dma_map_sgtable" will set sg->nents == 0 and I don't understand why.

I wonder if you are seeing this behaviour as well?

Cheers,
-Paul





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux