Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933004AbcLIK0N (ORCPT ); Fri, 9 Dec 2016 05:26:13 -0500 Received: from smtpoutz26.laposte.net ([194.117.213.101]:58698 "EHLO smtp.laposte.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932393AbcLIK0L (ORCPT ); Fri, 9 Dec 2016 05:26:11 -0500 Subject: Re: Tearing down DMA transfer setup after DMA client has finished To: Vinod Koul , =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= References: <20fc9020-7278-bc2f-2a8d-43aff5cabff8@free.fr> <20161206051222.GQ6408@localhost> <5846B237.8060409@free.fr> <20161207164341.GX6408@localhost> <20161208103921.GC6408@localhost> <91b0d10c-1bc2-c3e1-4088-f4ad9adcd6c0@free.fr> <20161208163755.GH6408@localhost> <20161209065955.GJ6408@localhost> Cc: Mason , Russell King , dmaengine@vger.kernel.org, Linus Walleij , Dan Williams , LKML , Linux ARM , Jon Mason , Mark Brown , Lars-Peter Clausen , Lee Jones , Laurent Pinchart , Arnd Bergmann , Maxime Ripard , Dave Jiang , Peter Ujfalusi , Bartlomiej Zolnierkiewicz , Thibaud Cornic From: Sebastian Frias Message-ID: <6ce1ea97-1d68-2203-c7b4-73315e801655@laposte.net> Date: Fri, 9 Dec 2016 11:25:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161209065955.GJ6408@localhost> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-VR-SrcIP: 92.154.11.170 X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeelfedrheeigddtfecutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeehnecuhfhrohhmpefu X-VR-Cause-4: vggsrghsthhirghnucfhrhhirghsuceoshhfkeegsehlrghpohhsthgvrdhnvghtqeenucfkphepledv X-VR-Cause-5: rdduheegrdduuddrudejtdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopegludej X-VR-Cause-6: vddrvdejrddtrddvudegngdpihhnvghtpeelvddrudehgedruddurddujedtpdhmrghilhhfrhhomhep X-VR-Cause-7: shhfkeegsehlrghpohhsthgvrdhnvghtpdhrtghpthhtohepvhhinhhougdrkhhouhhlsehinhhtvghl X-VR-Cause-8: rdgtohhm X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1481 Lines: 32 On 09/12/16 07:59, Vinod Koul wrote: > On Thu, Dec 08, 2016 at 04:48:18PM +0000, M?ns Rullg?rd wrote: >> Vinod Koul writes: >> >>> To make it efficient, disregarding your Sbox HW issue, the solution is >>> virtual channels. You can delink physical channels and virtual channels. If >>> one has SW controlled MUX then a channel can service any client. For few >>> controllers request lines are hard wired so they cant use any channel. But >>> if you dont have this restriction then driver can queue up many transactions >>> from different controllers. >> >> Have you been paying attention at all? This exactly what the driver >> ALREADY DOES. > > And have you read what the question was? > I think many people appreciate the quick turn around time and responsiveness of knowledgeable people making constructive remarks in this thread, but it looks we are slowly drifting away from the main problem. If we had to sum up the discussion, the current DMA API/framework in Linux seems to lack a way to properly handle this HW (or if it has a way, the information got lost somewhere). What concrete solution do you propose? Alternatively, one can think of the current issue (i.e.: the fact that the IRQ arrives "too soon") in a different way. Instead of thinking the IRQ indicates "transfer complete", it is indicating "ready to accept another command", which in practice (and with proper API support) can translate into efficient queuing of DMA operations.