Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4806411ybp; Mon, 7 Oct 2019 14:21:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBBdKNzZACCj/anmvms0N8c27MRTETgqoquGPOoV09cD3MAKNVPk5bI3SCvk2NP4zcbnrk X-Received: by 2002:a17:906:c47:: with SMTP id t7mr25562106ejf.133.1570483294133; Mon, 07 Oct 2019 14:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570483294; cv=none; d=google.com; s=arc-20160816; b=QdlC+5NCCz2rZlgUNV63DkSSI6VhhcIT3guzcSuApN+P/P2041aXZfkMtDqRZx/e0b 5vkSy3YSz3JZbW5LSr11Ved4eyJD7MYtfeKeSrprpU1AX/KrFbpbeg8gRBM7hSwfHw9R 7rhTuq5cVF9vZIErMmiFSQcGoAQ/7hGnRb6dMLqfUHbIw0VcncD6/ZvwAPhSJrnSbWqq S6vGiHHiKMm5rpXO+0fXapDDqbR3tyG5wMhV2x367StJpS69npaUihbXQsjKCw7/+kfb RbKzWZuO4vuU7sTuYjjl4zUt3ChNxDBa+JtVGhuWDoBhtlRuEGsADX3B9tGP8u2uY6lU eoFA== 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=Ne+gjpSAsSZCPqyjaVRLIU8NFITcOF/zLKSCkYOILvY=; b=mWMt+i7mzYbe1LN9rGNOU6VhKkRmSZLroSzz6qolWK0lIFMnhiXbpWBwbKJzgiV6jr 0br39j4d9IWcxr4o6VdF+PhiMRU8e73NaRWP2lCDMYA1ChHDueID23rHJTWfbX3xd9+f ThBSILM7tYgeDmAq/BuUsptHIcY2D5qCWA2Mu8ol7OnJVVUMC3lPeubQQCg1t4fWG3ir HPrsCwfmaO3Gy84iaNeF0G4Uvxa7kbpMFWaQ6p1WaWFWQT9Q0iVSMNNmFIMxlN5G9S4Q W3D4O7BEoY4agy9Hp2mB9pQaLicvyy+m2B38uYG/2Ol3XxyRzPlATAoR01s3xwyvDVu2 yP8Q== 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 u8si7860974ejt.219.2019.10.07.14.21.10; Mon, 07 Oct 2019 14:21:34 -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 S1729430AbfJGVVD (ORCPT + 99 others); Mon, 7 Oct 2019 17:21:03 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39916 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728753AbfJGVVD (ORCPT ); Mon, 7 Oct 2019 17:21:03 -0400 Received: by mail-pg1-f195.google.com with SMTP id e1so8974914pgj.6 for ; Mon, 07 Oct 2019 14:21:01 -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=Ne+gjpSAsSZCPqyjaVRLIU8NFITcOF/zLKSCkYOILvY=; b=jKabTA9ZmREbBLR0KQDUOLmiAJjZBIHO+LCmxMbUGyzq2HsQz8TjSYD+FASTIc4FjV FQNWhK2S/PElaEML3Mh2nhh6ni3z8e2QylDCmmDU6zjwS0vjzfMVqUdKYiH9/GX1yiUq kMhSCdW4vg4M+UurWGV8x8dbKOg5VcI30UOX68iTDpJNuk3GlfN2/nWm4GNsCrtXxawf 36sPMNox5llyuqktPL/25b6bsHOcrHihk14ypzaCGa/cFcueDOct1HgxZyOma/NF18xg cGhwpcnvr/teNL3L1H5q00u1QVNwHTytpSEuUd6J6pLaOmIR/5RyVEaZZgD3z6G3swoZ P6LA== X-Gm-Message-State: APjAAAXjtuIKejsU5PVlH6KuS4WSeQBLEeCoQ0PGqz8N6UwYRpnENfQt ha6mHPVAQOyc3HiIu5RsmcJJqg== X-Received: by 2002:a63:9144:: with SMTP id l65mr33107157pge.148.1570483260688; Mon, 07 Oct 2019 14:21:00 -0700 (PDT) Received: from localhost ([2601:647:5b00:424:4354:8908:1ef2:1e9f]) by smtp.gmail.com with ESMTPSA id w2sm14662672pfn.57.2019.10.07.14.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 14:20:59 -0700 (PDT) Date: Mon, 7 Oct 2019 14:20:58 -0700 From: Moritz Fischer To: Thor Thayer Cc: Moritz Fischer , Appana Durga Kedareswara Rao , 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 , agust@denx.de Subject: Re: [PATCH v4 1/2] fpga: fpga-mgr: Add readback support Message-ID: <20191007212058.GA2929169@archbox> References: <1532672551-22146-1-git-send-email-appana.durga.rao@xilinx.com> <4476bf39-b665-50d8-fecd-d50687d10ca2@linux.intel.com> <20190927182308.GA6797@archbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi Thor, On Mon, Oct 07, 2019 at 01:06:51PM -0500, Thor Thayer wrote: > Hi Moritz, > > On 9/27/19 1:23 PM, Moritz Fischer wrote: > > 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 :) > > > The CvP case is the same as III) Thomas' case. The FPGA configuration > bitstream is downloaded over the PCIe. > > The one difference in my case is that there isn't an SoC. This is a Intel > host processor connecting to a non-SoC Stratix10/Arria10. The non-SoC > A10/S10, boots a minimal image (CvP) setting up the peripheral pins and > enabling the PCIe endpoint for CvP downloads. > > The host can then download bitstreams using the FPGA Manager through debugFS > and when the bitstream finishes downloading and the FPGA enters User Mode, > the functionality is available for the host to use. I am generally confused by this driver. How does it work exactly? What happens after altera-cvp binds a PCI device? You can use it to download a bitstream (say we had the debugfs interface), and then what happens next? How do I use the device? It already has a PCI driver bound to it at that point? What happens next? Please tell me that not the only use-case for this is /dev/mem :) Thomas' use-case is different in that behind the FPGA device there are actual other *discoverable* PCI devices that will get enumerated and bind to separate drivers. Thanks, Moritz PS: I'll be out this week on vacation starting tmr so responses might be delayed