Hello Dhruvit,
thank you for the answer.
void page_cache_release(struct page *page);
I have physical address (reserved in device tree) and kernel virtual address, gotten from memremap. But I don't have page structs. Don't know how to get them and whether to call this function for every page in this range.
Generic DMA layer:
Not sure whether CSI is a DMA which is covered by dma layer.
Coherent: Because of uncached memory, I guess there wouldn't be any speed improvement.
Streaming: This API is probably the correct choice to handle this problem. But the CSI driver which is doing the MIPI transfer doesn't set up the buffer. So, functions like dma_sync_single_for_cpu/dma_sync_single_for_device either crash or have no function at all.
I've had a look at the example in your referenced link. It seems to me unmapping before reading and accessing the physical memory directly wouldn't gain speed improvement. So, I guess I should use the sync functions without unmapping the memory.
Will try again to setup the memory similiar to the example and use sync functions. Though I don't have a pci dev struct for csi and sensor driver. I'm in sensor interrupt driver.
Thanks
Bernd