I InKi Dae #
Message details and related content
thank you for your comments. your second comment has no any problem as I said before, user virtual addess could be translated in page unit. but the problem, as you said, is that when cpu access to the memory in user mode, the memory allocated by malloc, page fault occurs so we can't find pfn to user virtual address. I missed that. but I think we could resolve this one. as before, user application allocates memory through malloc function and then send it to device driver(using userptr feature). if the pfn is null when device driver translated user virtual address in page unit then it allocates phsical memory in page unit using some interface such as alloc_page() and then mapping them. when pfn is null, to check it and allocate physical memory in page unit could be processed by videobuf2. of course, videobuf2 has no any duty considered for system mmu. so videobuf2 just provides callback for 3rd party and any platform with system mmu such as Samsung SoC C210 implements the function(allocating physical memory and mapping it) and registers it to callback of videobuf2. by doing so, I think your first comment could be cleared. please, feel free to give me your opinion and pointing out. thank you. 2011년 1월 7일 오전 8:57, Jonghun Han [off-list ref]님의 말:
Hello, There are two reasons why malloc isn't suitable for it. The first is that malloc doesn't allocate memory when malloc is called. So driver or vb2 cannot find PFN for it in the VIDIOC_QBUF. The second is that malloc uses 4KB page allocation. SYS.MMU(IO-MMU) can handle scattered memory. But it has a penalty when TLB miss is occurred. So as possible as physically contiguous pages are needed for performance enhancement. So new allocator which can clear two main issues is needed. Best regards,quoted
-----Original Message----- From: <redacted> [mailto:linux-media- owner@vger.kernel.org] On Behalf Of InKi Dae Sent: Thursday, January 06, 2011 10:25 PM To: <redacted> Subject: Memory sharing issue by application on V4L2 based device driverwithquoted
system mmu. Hello, all. I'd like to discuss memory sharing issue by application on v4l2 baseddevice driverquoted
with system mmu and get some advices about that. Now I am working on Samsung SoC C210 platform and this platform has some multimedia devices with system mmu such as fimc, and mfc also we have implemented device drivers for them. those drivers are based on V4L2frameworkquoted
with videobuf2. for system mmu of each device, we used VCM(VirtualContiguousquoted
Memory) framework.
-- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html