Skip to content

Commit 2260d1f

Browse files
Devarsh Thakkarhverkuil
authored andcommitted
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>
1 parent 9f2d0da commit 2260d1f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ static int ti_csi2rx_init_vb2q(struct ti_csi2rx_dev *csi)
895895
q->dev = dmaengine_get_dma_device(csi->dma.chan);
896896
q->lock = &csi->mutex;
897897
q->min_queued_buffers = 1;
898+
q->allow_cache_hints = 1;
898899

899900
ret = vb2_queue_init(q);
900901
if (ret)

0 commit comments

Comments
 (0)