media: ti: j721e-csi2rx: Allow passing cache hints from user-space
authorDevarsh Thakkar <devarsht@ti.com>
Wed, 12 Mar 2025 11:21:40 +0000 (16:51 +0530)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 10 Jul 2025 09:32:24 +0000 (11:32 +0200)
commit2260d1fa5d0e7967d6596e26bc39d46200cede0c
treec6c1bd8b56c50c23a88ffce7ad6e3fe64afc3634
parent9f2d0da9b8c3477cd5ed4e1ed1e58bb44184561b
media: ti: j721e-csi2rx: Allow passing cache hints from user-space

User-space can provide cache hints to enable software managed cache
operations or skip certain cache operations using memory flags and buffer
flags. This is useful for SoCs such as AM62px which do not support
hardware cache coherency.

This is tested on AM62px with yavta capture by passing
V4L2_MEMORY_FLAG_NON_COHERENT while using VIDIOC_REQBUFS and
V4L2_BUF_FLAG_NO_CACHE_CLEAN while using VIDIOC_QBUF and ~5x reduction in
memcpy time is seen for copying captured frame to DDR.

Link: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1452545/am62p-the-ads6311-radar-camera-has-lost-frame-capture/5580472#5580472
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Acked-by: Jai Luthra <jai.luthra@linux.dev>
[Sakari Ailus: Reword and rewrap the commit message a little.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c