mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC 0/2]fpga: Add fpga configuration support from a pre-allocated dma-able buffer
@ 2023-11-22  5:30 Nava kishore Manne
  2023-11-22  5:30 ` [RFC 1/2] fpga: support loading from a pre-allocated buffer Nava kishore Manne
  2023-11-22  5:30 ` [RFC 2/2] fpga: versal: Use the scatterlist interface Nava kishore Manne
  0 siblings, 2 replies; 4+ messages in thread
From: Nava kishore Manne @ 2023-11-22  5:30 UTC (permalink / raw)
  To: mdf, hao.wu, yilun.xu, trix, sumit.semwal, christian.koenig,
	linux-fpga, linux-kernel, linux-media, dri-devel, linaro-mm-sig

Lots of embedded systems have memory constraints but they need to load
very large configuration files.The FPGA subsystem allows drivers to
request this configuration image be loaded from the filesystem,but this
requires that the entire configuration data be loaded into kernel memory
first before it's provided to the driver.This can lead to a situation where
we map the configuration data twice, once to load the configuration data
into kernel memory and once to copy the configuration data into the final
resting place which is nothing but a dma-able continuous buffer.

This creates needless memory pressure and delays due to multiple copies.
Let's add a dmabuf handling support to the fpga manager framework that
allows drivers to load the Configuration data directly from a pre-allocated
buffer. This skips the intermediate step of allocating a buffer in kernel
memory to hold the Configuration data.

This implementation allows the lower-level drivers to request the FPGA
Configuration image be loaded from pre-allocated dma-able continuous
buffer and also it avoid needless memory pressure and delays due to
multiple copies.

Please take a look at the changes and let us know if any improvements
are required.

Nava kishore Manne (2):
  fpga: support loading from a pre-allocated buffer
  fpga: versal: Use the scatterlist interface

 drivers/fpga/fpga-mgr.c       | 113 ++++++++++++++++++++++++++++++++++
 drivers/fpga/versal-fpga.c    |  13 ++++
 include/linux/fpga/fpga-mgr.h |  10 +++
 3 files changed, 136 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-15 17:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  5:30 [RFC 0/2]fpga: Add fpga configuration support from a pre-allocated dma-able buffer Nava kishore Manne
2023-11-22  5:30 ` [RFC 1/2] fpga: support loading from a pre-allocated buffer Nava kishore Manne
2024-01-15 17:08   ` Marco Pagani
2023-11-22  5:30 ` [RFC 2/2] fpga: versal: Use the scatterlist interface Nava kishore Manne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®