Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4137469imu; Mon, 14 Jan 2019 15:59:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ma7Slu0BBLjr3en8sLb3GDeSzxGWzSgaNDcbM7fvtJIodWc7n+vld83FvoXTjv2jpbKcn X-Received: by 2002:a63:4b60:: with SMTP id k32mr1047511pgl.186.1547510339966; Mon, 14 Jan 2019 15:58:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547510339; cv=none; d=google.com; s=arc-20160816; b=OSCwoP7CUvLhPGnKooqq/vjLzjSn9lT4+JYu/2qRenAzSrLEsqanDFeRXF0KTbme/H 6Swa01j5YaMCjJ84Si36jHBxpO8+4en+7epJzgWbvDsjed8gY2nx7ssF1E0/twjMGggJ Xdfv5Y1HnRGGXDoTXUsWSPyftsWZPI54QsENZWNT7Oy/5t7jkP8Hi9QkgTB0smVhFod/ dTxpdUI4zFO+//sKLaZCqba5izEHsKyRH161JsheaW+S6NxUHRbD+QgcOpfWDr5+Af1M XM8zSgXUOVl6PQxBBjrnRcb4Rap4qfWZjYHS0f2Z4xW5difWz6PBZEMZURdmEAC2Vt3t 4Tuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ETaBNaBq6+nrFaEi64tbRzDh+0WDaQNiIYNOeevOXQU=; b=tRcwRcNvUTllAW3fKfOKPtfAILA5L7raw1F+mwaIfjQAWL+TOs30uDO8L2BF5tQwjm XZ0Bj/mXz9Ft0mkDu2DIhUiZsnlof1LsQrd1PqI0dsaSxHLqWvcNYyuRGdxYpQakOkWM oTN3YPVXOojc64FbQRW/29zxLcbXEoXnWUN+C1N22VSAHkzUcR5wqrtlLzSf1KN4S6Ld y2lz/KpFsyql4j0pGfmttvsp3JlAuAk+Qr621mipZ9Us+1MphZqXzvD4vGwNq02RWCz9 2n1n2JwUl6BwmoD2Gjix9gtyEYtSxudUawXHBFmhzwktg2y1zZWAsGztIQ1BJ4zlWWxs 6w9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=NOwvfxyQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d125si1411806pgc.418.2019.01.14.15.58.43; Mon, 14 Jan 2019 15:58:59 -0800 (PST) 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; dkim=fail header.i=@lechnology.com header.s=default header.b=NOwvfxyQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727261AbfANX5J (ORCPT + 99 others); Mon, 14 Jan 2019 18:57:09 -0500 Received: from vern.gendns.com ([98.142.107.122]:52106 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbfANX5J (ORCPT ); Mon, 14 Jan 2019 18:57:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ETaBNaBq6+nrFaEi64tbRzDh+0WDaQNiIYNOeevOXQU=; b=NOwvfxyQigPCyNPEMN0uEL1JDC N5fua+xo0CQk75PBu9j8yCT0gyfBEtxalWTOCNG2bKOxTdym/HaUB5Fu6t6O0n2YTW1Syv3yQ65We 06uJKuLnWnNokn5Ap0MWPp+ISH8xEv0Z2qITj3EZ6JSdP5R2YyaovTZgOEX7MTCVhfOlHLP7SwDBY m37/icax0KSI0TyIR/Xxps+VF2fAV3XVUljXez+OYuFgR9zTMZvsIvyZek4RkLALuP3lZAHFodoz7 OZacnxGJDXd1cambrEWxeQ799HasnDqirHffBceBaf4rWs3ZlLf9ALXhaTXS6UcgxWLjM8RNZnl78 UDv7LOdQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:42952 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gjC3h-0004GO-D5; Mon, 14 Jan 2019 18:54:21 -0500 Subject: Re: [PATCH] Revert "spi: omap2-mcspi: Set FIFO DMA trigger level to word length" To: Vignesh R , "linux-spi@vger.kernel.org" Cc: Mark Brown , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" References: <20190113204905.29795-1-david@lechnology.com> <829bdc72-cf96-6aee-28d8-a47d0430710d@ti.com> From: David Lechner Message-ID: Date: Mon, 14 Jan 2019 17:57:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <829bdc72-cf96-6aee-28d8-a47d0430710d@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/14/19 6:30 AM, Vignesh R wrote: > > On 14/01/19 2:19 AM, David Lechner wrote: >> This reverts commit b682cffa3ac6d9d9e16e9b413c45caee3b391fab. >> >> That commit breaks displays using tinydrm drivers, such as ili9225. >> >> It causes corruption in the image that is displayed (it looks like only >> 1/2 of the framebuffer data is sent, the other half of the display >> remains blank.) >> >> The following error appears multiple times: >> >> ili9225 spi1.0: EOW timed out >> >> Eventually, the system locks up without any additional errors. >> > Oops, that's unfortunate. I see ili9225 is using bits_per_word = 16. > I believe commit b682cffa3ac6d9d broke spi_transfers where > bits_per_word anything other than 8 bits. > I don't have ili9225 HW but was able emulate this condition using a SPI > flash as slave on AM335x and successfully reproduced the issue. Could > you test if this diff[1] helps in fixing the regression without needing > to revert commit b682cffa3ac6d9d? > > If below diff does not help, then could you post logs of types of > spi_transfers being queued by ili9225 driver? I guess you can dump them > by enabling DEBUG option in tinydrm-helpers.c. > Also which TI SoC are you using? > > Sorry for the trouble! > > [1]: > > Adjust maxburst size of DMA xfer according to the DMA trigger level and word length > instead of just word length > > > diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c > index 2fd8881fcd65..6b7edcff0e6b 100644 > --- a/drivers/spi/spi-omap2-mcspi.c > +++ b/drivers/spi/spi-omap2-mcspi.c > @@ -623,8 +623,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) > cfg.dst_addr = cs->phys + OMAP2_MCSPI_TX0; > cfg.src_addr_width = width; > cfg.dst_addr_width = width; > - cfg.src_maxburst = es; > - cfg.dst_maxburst = es; > + cfg.src_maxburst = width / es; > + cfg.dst_maxburst = width / es; Just an observation... won't `width / es` always == 1 because width is always == es? > > rx = xfer->rx_buf; > tx = xfer->tx_buf; >