Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3790847ybn; Fri, 27 Sep 2019 11:23:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKDF8rIlJMIraA5//764bvo7zpHM7yJOvKaZfDZZc3Knh/6sPR1z3WnTtK4jpte4MXxTjt X-Received: by 2002:aa7:cf11:: with SMTP id a17mr6112967edy.153.1569608633740; Fri, 27 Sep 2019 11:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569608633; cv=none; d=google.com; s=arc-20160816; b=KzJ0wDClYR+iNMBGuaKLg9lYcA915KdxdNlKLOCSp1OGNOp4cUkr8B66CTIHc03Uhk kwfgsigsJl3079rukOd14VSBFijSWY2zaA59yv0uONB9wrQ2cdBVw3UBpL8UoHQYd+rE 18g1p5lFkz7iSred6kM0JpmFoBnzVp59/XEKZ2iiEPFYawwomxsVOB8PhZ+ooNgPo0EU Gm2IBtO5qgclH2hvyU/ApM2cAld6HIW0WCY7SAxxy2orNBpOp1JOK7AlyWKedwfKTXHW i6JUTPsiSygQLhE6f0kdzvTYDwThh6Q3Wod+rSBd2VZk4UouRrXy2Cxw3lhBcrYB5mMz YUKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oDBtpY1GQLpL/JR+SFoGIBX4Y29kVVG5vEdX0iccMk8=; b=PPtCaxZLBilEivHxF2Dc8YAiQOMT4AkiFyS14kvrDE3dLM8Tb8KOVJZaz2Y/BNL31m aTHWLQj1ptDfOHIa/j0xUrKJb9X+aEPcCkrEht5gwBfOTRab98cZKXV8EbCAwGGt07Iw 7yxd1cmIDadZnYZbuMMQEncXHrSDSsDJTe66hBk6qMv8oGGh6spYDdpUABS3kBZuUZSs 5hJuXiNPeIGlVC+rS4z3dLDvHoJRky/bmrySHPVmHZnGpD3iOwvThICjgBD/bTz55MjK DCIs7EbNwgPQ9Jv7EIVKxs9gxFCXFump+j27E2kUL19zlKfrjbP3td4SZB/oQ+xZavVP c6Wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si2241333edx.353.2019.09.27.11.23.29; Fri, 27 Sep 2019 11:23:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728117AbfI0SXN (ORCPT + 99 others); Fri, 27 Sep 2019 14:23:13 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33983 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727243AbfI0SXM (ORCPT ); Fri, 27 Sep 2019 14:23:12 -0400 Received: by mail-pg1-f196.google.com with SMTP id y35so3946462pgl.1 for ; Fri, 27 Sep 2019 11:23:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oDBtpY1GQLpL/JR+SFoGIBX4Y29kVVG5vEdX0iccMk8=; b=EplLOykmIYJ5r8AfBfQCNMof2KYuxTuuU9hKZhcBIKjp+FBiFlMOoSHE5JS/2h8SG6 mYpSd8KxDU1jUfu2M2HZrv9oJ2pfxsOwkc9TyIRgXL2UszUIWNTlEP2lmH1iF+8eIYNQ NBRCww3EN9ap+CKHwwQ08fr3tvys2NvBOVoX1CIYCp06jMgHUKrZDnY4Ka1NGzthsBFb pw7qWCh/A/lnYg1wOmFie+1MmHV5uJZQ39T3EgTY7QrTxoNQh/v6WB1IP/sBaDtps2Zr NrUUyvj55N3FIXOtxUdLwg6aTrVQt+CV3AZn/6ani1f1eg6NLDcTFg+ikRd3k6g0185p QUOA== X-Gm-Message-State: APjAAAVkoc8R5ebMH0ZvmGdPhuH106j9VFjoOaag2ZPJknDBWB3eOu/C S7TPsq+Xd7nCd5BcCTiUjQb0FQ== X-Received: by 2002:a62:8683:: with SMTP id x125mr5840538pfd.108.1569608590487; Fri, 27 Sep 2019 11:23:10 -0700 (PDT) Received: from localhost ([2601:647:5b80:29f7:1bdd:d748:9a4e:8083]) by smtp.gmail.com with ESMTPSA id j16sm6087780pje.6.2019.09.27.11.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2019 11:23:09 -0700 (PDT) Date: Fri, 27 Sep 2019 11:23:08 -0700 From: Moritz Fischer To: Thor Thayer Cc: Appana Durga Kedareswara Rao , Moritz Fischer , Alan Tull , Michal Simek , "kedare06@gmail.com" , "linux-fpga@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel , Nava kishore Manne , Siva Durga Prasad Paladugu , Richard Gong , Dinh Nguyen Subject: Re: [PATCH v4 1/2] fpga: fpga-mgr: Add readback support Message-ID: <20190927182308.GA6797@archbox> References: <1532672551-22146-1-git-send-email-appana.durga.rao@xilinx.com> <4476bf39-b665-50d8-fecd-d50687d10ca2@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4476bf39-b665-50d8-fecd-d50687d10ca2@linux.intel.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thor, On Fri, Sep 27, 2019 at 09:32:11AM -0500, Thor Thayer wrote: > Hi Kedar & Moritz, > > On 9/27/19 12:13 AM, Appana Durga Kedareswara Rao wrote: > > Hi Alan, > > > > Did you get a chance to send your framework changes to upstream? No they weren't upstreamed. > > @Moritz Fischer: If Alan couldn't send his patch series, Can we take this patch series?? > > Please let me know your thoughts on this. Alan had some comments RE: #defines, I'll have to take another look. > > > > Regards, > > Kedar. > > > I'd like to see some mechanism added as well. Our CvP driver needs a way to > load images to the FPGA over the PCIe bus. Can you elaborate a bit on the CvP use-case and how that would work? Who would use the device how after loading the bitstream? Generally there are several use cases that I have collected mentally over the years: I) DFL use case: - Mixed-set of drivers: Kernel and Userspace - FPGA logic is discoverable through DFL - Userspace application wants to reprogram FPGA II) DT configfs use case: - Mixed-set of drivers: Kernel and Userspace - FPGA logic is *not* discoverable (hence DT overlay) - Userspace application wants to reprogram FPGA III) Thomas' case: - Kernel only drivers (pcie bridge, pcie drivers, ...) - FPGA logic is fully discoverable (i.e. PCIe endpoint implemented in FPGA, connected to SoC via PCIe) - Userspace application wants to reprogram FPGA IV) VFIO case: - Usually exposes either entire device via vfio-pci or part via vfio-mdev - Loading (basic) bitstream at boot from flash - vfio-mdev case can use FPGA region interface + ioctl - Full VFIO case is similar to III) How does your CvP use case fit in? Collecting all the use-cases would help with moving forward on coming up with an API :) > > It wasn't clear to me from the discussion on Alan's patchset[1] that the > debugfs was acceptable to the mainline. I'd be happy to resurrect that > patchset with the suggested changes. Back then we decided to not move forward with the debugfs patchset since it's essentially cat foo.bin > /dev/xdevcfg / cat bar.rbf > /dev/fpga0 in disguise. Which is why I vetoed it back then. > Since debugfs isn't enabled for production, are there any alternatives? > > Alan sent a RFC [2] for loading FIT images through the sysfs. > > The RFC described a FIT image that included FPGA image specific information > to be included with the image (for systems running without device tree like > our PCIe bus FPGA CvP). Yeah I had originally suggested that as a mechanim to make FPGA images discoverable by the kernel. I still think the idea has merit, however it will run into the same issues that the configfs interface ran into w.r.t using dt-overlays. Generally I'd like to see a solution that exposes the *same* interface to DT and not DT systems to userspace. Using FIT headers one could go ahead and design something along the lines of what DFL is doing, except for instead of parsing the DFL in the logic, one would parse the FIT header to create subdevices. > Unfortunately, I believe this has the same uphill battle that the Device > Tree Overlay patches[3] have to getting accepted. See above. While I'm happy to discuss this more I atm don't have the bandwidth to push the DT work any further. Thanks, Moritz