linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] Add streaming API for firmware and FPGA manager
@ 2017-03-10  0:18 yi1.li
  2017-03-10  0:18 ` [RFC 1/2] firmware class: Add stream_firmware API yi1.li
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: yi1.li @ 2017-03-10  0:18 UTC (permalink / raw)
  To: ming.lei, mcgrof, gregkh, atull, moritz.fischer, linux-kernel,
	linux-fpga
  Cc: Yi Li

From: Yi Li <yi1.li@linux.intel.com>

As the FPGA hardware advances, the firmware image size grows (hundres
of MBs or more). It could be an issue for kernel to allocate a big
buffer to load the whole firmware file.
Here is an attempt to read the firmware file into a small buffer and
program the FPGA in a loop (or so call the streaming mode). It should not
be a performance hit for FPGA programing since the majority of time
spend is with the FPGA CvP/PR-IP interface. 

pseudo code in fpga manager:
while (size > 0) {
	ret = stream_firmware(&fw, image_name, dev, offset, streamsize);
	ret = mgr->mops->write(mgr, fw->data, fw->size);
	offset += fw->size;
	size -= fw->size;
}

Thanks,
Yi

Yi Li (2):
  firmware class: Add stream_firmware API.
  fpga manager: Add fpga_mgr_firmware_stream API

 drivers/base/firmware_class.c | 128 ++++++++++++++++++++++++++++++++++++++++++
 drivers/fpga/fpga-mgr.c       |  77 +++++++++++++++++++++++++
 include/linux/firmware.h      |   2 +
 include/linux/fpga/fpga-mgr.h |   4 ++
 4 files changed, 211 insertions(+)

-- 
2.7.4

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

end of thread, other threads:[~2017-03-27 21:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10  0:18 [RFC 0/2] Add streaming API for firmware and FPGA manager yi1.li
2017-03-10  0:18 ` [RFC 1/2] firmware class: Add stream_firmware API yi1.li
2017-03-10 17:44   ` matthew.gerlach
2017-03-10 19:25     ` Li, Yi
2017-03-13 21:09       ` matthew.gerlach
2017-03-14 16:10         ` Li, Yi
2017-03-14 16:55           ` matthew.gerlach
2017-03-20 18:00   ` Alan Tull
2017-03-20 18:34     ` Alan Tull
2017-03-22 22:05       ` Li, Yi
2017-03-23  0:34         ` Alan Tull
2017-03-27 19:36   ` Luis R. Rodriguez
2017-03-27 21:20     ` Li, Yi
2017-03-10  0:18 ` [RFC 2/2] fpga manager: Add fpga_mgr_firmware_stream API yi1.li
2017-03-13 18:00   ` Alan Tull
2017-03-13 19:04     ` Li, Yi
2017-03-10 17:11 ` [RFC 0/2] Add streaming API for firmware and FPGA manager matthew.gerlach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).