All of lore.kernel.org
 help / color / mirror / Atom feed
From: matthew.gerlach@linux.intel.com
To: Yi Li <yi1.li@linux.intel.com>
Cc: ming.lei@canonical.com, mcgrof@kernel.org,
	gregkh@linuxfoundation.org, atull@opensource.altera.com,
	moritz.fischer@ettus.com, linux-kernel@vger.kernel.org,
	linux-fpga@vger.kernel.org
Subject: Re: [RFC 0/2] Add streaming API for firmware and FPGA manager
Date: Fri, 10 Mar 2017 09:11:54 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703100908130.2460@mgerlach-VirtualBox> (raw)
In-Reply-To: <1489105090-4996-1-git-send-email-yi1.li@linux.intel.com>



On Thu, 9 Mar 2017, yi1.li@linux.intel.com wrote:

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


Hi Yi,

This functionality is extremely helpful. I am working with a
firmware image of about 90 MBs, and even using scatter-gather instead of a 
continguous piece of memory is a lot of memory.

Matthew Gerlach

>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

      parent reply	other threads:[~2017-03-10 17:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` matthew.gerlach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1703100908130.2460@mgerlach-VirtualBox \
    --to=matthew.gerlach@linux.intel.com \
    --cc=atull@opensource.altera.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=moritz.fischer@ettus.com \
    --cc=yi1.li@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.