Hi:
I'm using a 3530 and an OV5642 camera under 2.6.32 to capture a video stream. Video works fine if I don't have to rotate it. But since I have to rotate the stream, I'm trying to use 4 of the 12 SMS/VRFB contexts, one per camera kmem buffer, to do the rotation for me.
The first SMS ROT context is iomapped from its physical address of 0x6C000180 to 0xFC000180. The code writes appropriate settings to the registers and then reads back for dmesg logging. The readbacks seem sane, so I think the iomap is ok.
For the first attempt at using the VRFBs, I'm using 0-degree rotation (there should be no difference between pulling frames from kmembuf and the 0-degree VRFB).. The first VRFBs at 0-degrees is iomapped from its physical address of 0x70000000 to 0xC7000000.
The code writes the physical memory address of the first kmem camera buffer (0x86400000) into the first SMS base address. The dmesg log reports the correct address in the sms_ba register.
The userspace program uses memmap against the address the camera passes it via the V4L2 buffer structure. This works when the code passes the kmem buffer address to the user program, but FAILS when the VRFB address is passed to the user program.
When I try to memcpy from the first VRFB address, I get "unhandled fault: external abort on non-linefetch (0x1018) at 0x406a6000".
So... what am I missing here? Video works without using SMS/VRFB, so it has to be the way I'm using SMS/VRFB.
I'd be grateful for any help - thanks!