cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rmuss
Journeyman III

Problem using AMD Pinned Memory with a Capture Card

I'm writing a linux application that captures video frames with a  PCIE 1080p60 capture card and transfers them to a texture buffer on an AMD GPU.  The incoming frames are DMA'd directly to physical memory obtained via the linux API pci_alloc_consistant().  This is performed in a kernel module. 

The user space application maps the physical-space frame buffers into app memory using  mmap(). If I copy the mmap'd buffers to a malloced buffer I have no problem using pinned memory.  However, I need to avoid this frame copy altogether.  The problem is that if I pass the address of the mmap'd buffer to glBufferData() the fglrx driver complains that it cant' "map into GARP space".

Here's a snippet:

        glBindBuffer((GLenum)GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, m_GL_BOName);

        glBufferData((GLenum)GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, m_nSize, m_pData, GL_STREAM_DRAW);

        checkGLErrors(" ");

from dmesg:

  [fglrx:MCIL_LockMemory] *ERROR* Could not lock memory into GART space 

So the question is, how can I use pinned memory to transfer data directly from physical memory allocated via pci_alloc_consistant() to a GPU texture buffer without doing any memcopy()s?

Thanks!

Message was edited by:

Ronald M  Here is the error I get when calling glBufferData on the mmap'd physical memory: [fglrx:MCIL_LockMemory] *ERROR* Could not lock memory into GART space

0 Likes
2 Replies
ribalda
Journeyman III

It looks like the error happens with all the mmaped memory, not only with pinned memory: http://devgurus.amd.com/thread/166692

0 Likes
ribalda
Journeyman III

Hello rmuss:

Did you find any solution for your problem?

0 Likes