Thanks for the answer. I'll try to add this changes by myself.
Right now, I can get the physical pfn of the user pointer. The first
approach that came into my mind was to get a pointer to the page struct
with the pfn_to_page(...) function.
You already added a new function called uvc_buffer_write which maps
(kmap_atomic) the pfn associated with the page struct into the kernel
space (basically the logical kernel address is returned). And then the
data from the uvc cam is copied to the buffer and finally, the pfn is
unmapped with kunmap_atomic.
So, I thought this should work. But, I'm getting a paging error:
"Unable to handle kernel paging request at virtual address cdf46000"
Could that paging error occur because the physical page resides outside
of the physical memory that linux holds. That means I specified 216MB
for Linux. The memory from 216MB to 256MB is reserved for the DSP. And
the user pointer passed to the UVC driver points to 223MB which is above
the memory of Linux.
So, maybe the MMU doesn't know that there are physical pages and has no
mapping for it!?
Thanks,
Andreas
Laurent Pinchart schrieb:
Hi Andreas,
I've just answered your private e-mail, here's a copy for the list.
On Friday 28 May 2010 11:08:19 Andreas Auer wrote:
Hi,
I'm trying to get user pointer streaming with UVC webcams working. I
already got a patch from Laurent Pinchart (thanks) which enables user
pointer streaming. This patch works if I pass malloc()'d memory to the
driver.
My problem is that I want to use mmap()'d memory (via /dev/mem) and this
type of memory (flags VM_IO and VM_PFNMAP are set) is not supported to
be used with get_user_pages to map the memory to the kernel space.
So, is there another way to map the pages into the kernel space to be
used for user pointer streaming?? I had a look at kmap (kmap_atomic)...
would this be possible??
PFNMAP memory has no page struct associated with it, it can't be handled the
same way as regular main memory in the uvcvideo driver.
The DSP driver probably reserves memory at system startup. That memory isn't
managed by the Linux kernel memory manager.
The uvcvideo driver doesn't support PFNMAP memory at the moment. That
shouldn't be too difficult to fix though, but I'm afraid I don't have time to
work on it right now.
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel