lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250312112140.449765-1-devarsht@ti.com>
Date: Wed, 12 Mar 2025 16:51:40 +0530
From: Devarsh Thakkar <devarsht@...com>
To: <jai.luthra@...ux.dev>, <mchehab@...nel.org>,
        <linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <s-jain1@...com>, <r-donadkar@...com>, <devarsht@...com>,
        <vigneshr@...com>, <praneeth@...com>,
        <tomi.valkeinen@...asonboard.com>, <y-abhilashchandra@...com>
Subject: [PATCH] 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 as shared here [1].

[1]:
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@...com>
---
 drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
index 6412a00be8ea..284d33b2a0ec 100644
--- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
+++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
@@ -895,6 +895,7 @@ static int ti_csi2rx_init_vb2q(struct ti_csi2rx_dev *csi)
 	q->dev = dmaengine_get_dma_device(csi->dma.chan);
 	q->lock = &csi->mutex;
 	q->min_queued_buffers = 1;
+	q->allow_cache_hints = 1;
 
 	ret = vb2_queue_init(q);
 	if (ret)
-- 
2.39.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ