Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932419AbcCHJzA (ORCPT ); Tue, 8 Mar 2016 04:55:00 -0500 Received: from mga02.intel.com ([134.134.136.20]:9621 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753525AbcCHJy4 (ORCPT ); Tue, 8 Mar 2016 04:54:56 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,556,1449561600"; d="asc'?scan'208";a="760110692" Date: Tue, 8 Mar 2016 15:29:04 +0530 From: Vinod Koul To: Maxime Ripard Cc: Boris Brezillon , Dan Williams , dmaengine@vger.kernel.org, Chen-Yu Tsai , linux-sunxi@googlegroups.com, Emilio =?iso-8859-1?Q?L=F3pez?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dma: sun4i: expose block size and wait cycle configuration to DMA users Message-ID: <20160308095904.GM11154@localhost> References: <1457344771-12946-1-git-send-email-boris.brezillon@free-electrons.com> <20160307145429.GG11154@localhost> <20160307160857.577bb04d@bbrezillon> <20160307203024.GD8418@lukather> <20160308025547.GI11154@localhost> <20160308075131.GE8418@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jKBxcB1XkHIR0Eqt" Content-Disposition: inline In-Reply-To: <20160308075131.GE8418@lukather> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2901 Lines: 75 --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 08, 2016 at 08:51:31AM +0100, Maxime Ripard wrote: > > > > > > + * struct sun4i_dma_chan_config - DMA channel config > > > > > > + * > > > > > > + * @para: contains information about block size and time befor= e checking > > > > > > + * DRQ line. This is device specific and only applicable to = dedicated > > > > > > + * DMA channels > > > > >=20 > > > > > What information, can you elobrate.. And why can't you use existi= ng > > > > > dma_slave_config for this? > > > >=20 > > > > Block size is related to the device FIFO size. I guess it allows the > > > > DMA channel to launch a transfer of X bytes without having to check= the > > > > DRQ line (the line telling the DMA engine it can transfer more data > > > > to/from the device). The wait cycles information is apparently rela= ted > > > > to the number of clks the engine should wait before polling/checking > > > > the DRQ line status between each block transfer. I'm not sure what = it > > > > saves to put WAIT_CYCLES() to something !=3D 1, but in their BSP, > > > > Allwinner tweak that depending on the device. > >=20 > > we already have block size aka src/dst_maxburst, why not use that one. >=20 > I'm not sure it's really the same thing. The DMA controller also has a > burst parameter, that is either 1 byte or 8 bytes, and ends up being > different from this one. Nope that is buswidth. maxburst is words which cna be sent to device FIFO. >=20 > > Why does dmaengine need to wait? Can you explain that >=20 > We have no idea, we thought you might have one :) Well that is hardware dependent. From DMAengine API usage we dont ahve to wait at all. We should submit next descriptor as soon as possible. > It doesn't really makes sense to us, but it does have a significant > impact on the throughput. --=20 ~Vinod --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW3qJoAAoJEHwUBw8lI4NHHhYQAIzxemhI4r3niRapY37yt2vs fcy6oekJSgfXcaLDZfF6ghsTeTwQf1bF4scbAC3F32ctUu8nkVsEjqDXtRzH8jaz E9OG6LJ6tPHxvohQAyolLDWtmhW3s0G6ydmCqI2xwvRvGo58Q6lEzpG6sHtXjlzU gl9q+1DPhBW2VuuvlR/QuVh6rUBH2vJFBsXZlNVO+hGrNLf3E4MacY0WlQRWSPo/ Uo+DE2aBYfZE2dgQ8BbLEaIIUxsLnbNXDXMsSvJEIqNL3IOJnzagloV8JGIaGQny eolEKJYEboeNHI1MrZA7QOBOOwopxDMfv4WdebMdH4hwn5OrvIlI1MrKwUw2qBXa YoNcdhEHPUmrjnuqx/RIJvoFWVnK44reQ5erBWGbDJytk4DJG4NVNWHwFSJwXY+X tpZP4xNSEVg7l8CBf3fNqF9pnXbCukvOP1wkwkkD4/zTKyebOSKLlULOKWpflDtB ZLsV1sAGmh46afYGNmXr53Tp1MqGMMUe3aVKXLPnVxu5MOzs/gIgaLZa3VAlq+12 VYHzE43GCMjL7ZXn/yNsM9vv5DYVodXN4t0UzLwFHwwG6FnZRt/jo4ZL5r1ubo4V BUncMEcNOTgxXeQQYkuYr5wtKJQbysNe3TVojp/vq3ix9AfX8Tp8n5kZxI/eCzHx xLWDHM1sSiBLnJc+mdqt =tqlQ -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt--