From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27232C43331 for ; Sat, 7 Sep 2019 09:06:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0578721871 for ; Sat, 7 Sep 2019 09:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733030AbfIGJGk (ORCPT ); Sat, 7 Sep 2019 05:06:40 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:38477 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbfIGJGk (ORCPT ); Sat, 7 Sep 2019 05:06:40 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 06F003000618E; Sat, 7 Sep 2019 11:06:38 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id D2B7DA0C; Sat, 7 Sep 2019 11:06:37 +0200 (CEST) Date: Sat, 7 Sep 2019 11:06:37 +0200 From: Lukas Wunner To: Mark Brown , linux-spi@vger.kernel.org, dmaengine@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com Cc: Eric Anholt , Nuno Sa , Martin Sperl , Noralf Tronnes , Robert Jarzmik , Florian Kauer , Florian Fainelli , Ray Jui , Scott Branden , Vinod Koul , Stefan Wahren Subject: Re: [PATCH 00/10] Raspberry Pi SPI speedups Message-ID: <20190907090637.macdahajrzjepluc@wunner.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Dear Mark, On Sat, Aug 03, 2019 at 12:10:00PM +0200, Lukas Wunner wrote: > So far the BCM2835 SPI driver cannot cope with TX-only and RX-only > transfers (rx_buf or tx_buf is NULL) when using DMA: It relies on > the SPI core to convert them to full-duplex transfers by allocating > and DMA-mapping a dummy rx_buf or tx_buf. This costs performance. > > Resolve by pre-allocating reusable DMA descriptors which cyclically > clear the RX FIFO (for TX-only transfers) or zero-fill the TX FIFO > (for RX-only transfers). Patch [07/10] provides some numbers for > the achieved latency improvement and CPU time reduction with an > SPI Ethernet controller. SPI displays should see a similar speedup. > I've also made an effort to reduce peripheral and memory bus accesses. Just a gentle ping, this patch set was posted to the list 5 weeks ago, has all necessary acks and has been tested successfully by 2 people besides myself. Do you have any thoughts on it? Any objections? In case the patches no longer apply cleanly I've prepared this branch based on your for-next branch of Aug 23 from which you can merge if you prefer that: https://github.com/l1k/linux/commits/bcm2835_spi_simplex_v1 However I can also repost if necessary. (PS: Apologies for misspelling your name as "Marc" in my e-mail of Aug 24.) Thanks, Lukas > Lukas Wunner (10): > dmaengine: bcm2835: Allow reusable descriptors > dmaengine: bcm2835: Allow cyclic transactions without interrupt > spi: Guarantee cacheline alignment of driver-private data > spi: bcm2835: Drop dma_pending flag > spi: bcm2835: Work around DONE bit erratum > spi: bcm2835: Cache CS register value for ->prepare_message() > spi: bcm2835: Speed up TX-only DMA transfers by clearing RX FIFO > dmaengine: bcm2835: Document struct bcm2835_dmadev > dmaengine: bcm2835: Avoid accessing memory when copying zeroes > spi: bcm2835: Speed up RX-only DMA transfers by zero-filling TX FIFO > > drivers/dma/bcm2835-dma.c | 38 +++- > drivers/spi/spi-bcm2835.c | 408 ++++++++++++++++++++++++++++++++------ > drivers/spi/spi.c | 18 +- > 3 files changed, 390 insertions(+), 74 deletions(-) > > -- > 2.20.1