<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/dma/pl330.c, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-07-07T04:00:16Z</updated>
<entry>
<title>dmaengine: pl330: Really fix choppy sound because of wrong residue calculation</title>
<updated>2015-07-07T04:00:16Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2015-06-15T14:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5dd90e5b91e0f5c925b12b132c7cd27538870256'/>
<id>urn:sha1:5dd90e5b91e0f5c925b12b132c7cd27538870256</id>
<content type='text'>
When pl330 driver was used during sound playback, after some time or
after a number of plays the sound became choppy or totally noisy. For
example on Odroid XU3 board the first four executions of aplay with
small WAVE worked fine, but fifth was unrecognizable with errors:
	$ aplay /usr/share/sounds/alsa/Front_Right.wava
	underrun!!! (at least 0.095 ms long)

Issue was caused by wrong residue reported by pl330 driver to
pcm_dmaengine for its cyclic dma transfers.

The pl330_tx_status(), residue reporting function, used a "last" flag in
a descriptor to indicate that there is no more data to send.

The pl330_tx_submit() iterated over descriptors trying to remove this
flag from them and then mark last descriptor as "last".  However when
iterating it actually removed the flag not from descriptors but always
from last of it (and then reset it). Thus effectively once some
descriptor was marked as last, then it stayed like this forever causing
residue to be reported too low.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski.k@gmail.com&gt;
Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: gabriel@unseen.is
Suggested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: Fix overflow when reporting residue in memcpy</title>
<updated>2015-07-07T03:57:53Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2015-06-15T08:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae128293d97404f491dc76f1843c7adacfec3441'/>
<id>urn:sha1:ae128293d97404f491dc76f1843c7adacfec3441</id>
<content type='text'>
During memcpy operations the residue was always set to an u32 overflowed
value.

In pl330_tx_status() function number of currently transferred bytes was
subtracted from internal "bytes_requested" field. However this
"bytes_requested" was not initialized at start to length of memcpy
buffer so transferred bytes were subtracted from 0 causing overflow.

Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2015-06-29T16:44:45Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-06-29T16:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bc5e157ed2b4f5b206155fc772d860158acd201'/>
<id>urn:sha1:1bc5e157ed2b4f5b206155fc772d860158acd201</id>
<content type='text'>
Pull dmaengine updates from Vinod Koul:
 "This time we have support for few new devices, few new features and
  odd fixes spread thru the subsystem.

  New devices added:
   - support for CSRatlas7 dma controller
   - Allwinner H3(sun8i) controller
   - TI DMA crossbar driver on DRA7x
   - new pxa driver

  New features added:
   - memset support is bought back now that we have a user in xdmac controller
   - interleaved transfers support different source and destination strides
   - supporting DMA routers and configuration thru DT
   - support for reusing descriptors
   - xdmac memset and interleaved transfer support
   - hdmac support for interleaved transfers
   - omap-dma support for memcpy

  Others:
   - Constify platform_device_id
   - mv_xor fixes and improvements"

* tag 'dmaengine-4.2-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (46 commits)
  dmaengine: xgene: fix file permission
  dmaengine: fsl-edma: clear pending interrupts on initialization
  dmaengine: xdmac: Add memset support
  Documentation: dmaengine: document DMA_CTRL_ACK
  dmaengine: virt-dma: don't always free descriptor upon completion
  dmaengine: Revert "drivers/dma: remove unused support for MEMSET operations"
  dmaengine: hdmac: Implement interleaved transfers
  dmaengine: Move icg helpers to global header
  dmaengine: mv_xor: improve descriptors list handling and reduce locking
  dmaengine: mv_xor: Enlarge descriptor pool size
  dmaengine: mv_xor: add support for a38x command in descriptor mode
  dmaengine: mv_xor: Rename function for consistent naming
  dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup
  dmaengine: pl330: fix wording in mcbufsz message
  dmaengine: sirf: add CSRatlas7 SoC support
  dmaengine: xgene-dma: Fix "incorrect type in assignement" warnings
  dmaengine: fix kernel-doc documentation
  dmaengine: pxa_dma: add support for legacy transition
  dmaengine: pxa_dma: add debug information
  dmaengine: pxa: add pxa dmaengine driver
  ...
</content>
</entry>
<entry>
<title>dmaengine: pl330: fix wording in mcbufsz message</title>
<updated>2015-06-08T11:04:38Z</updated>
<author>
<name>Michal Suchanek</name>
</author>
<published>2015-06-03T21:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5489d5e9031e34d50f03e3d132f392314e74cf1'/>
<id>urn:sha1:e5489d5e9031e34d50f03e3d132f392314e74cf1</id>
<content type='text'>
The kernel is not trying to increase mcbufsz. It suggests you should try
doing so. Also print the calculated required size of mcbufsz.

Signed-off-by: Michal Suchanek &lt;hramrach@gmail.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: Initialize pl330 for pl330_prep_dma_memcpy after NULL check of pch</title>
<updated>2015-05-25T17:06:08Z</updated>
<author>
<name>Maninder Singh</name>
</author>
<published>2015-05-25T19:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5636854f3fcee3dcb45a9d0122cf099e72615e5'/>
<id>urn:sha1:f5636854f3fcee3dcb45a9d0122cf099e72615e5</id>
<content type='text'>
Currently pch pointer is already dereferenced before NULL check
and thus we are getting below warning:
warn: variable dereferenced before check 'pch'

So initialize struct pl330_dmac *pl330 after NULL check
of dma_pl330_chan *pch.

Signed-off-by: Maninder Singh &lt;maninder1.s@samsung.com&gt;
Reviewed-by: Vaneet Narang &lt;v.narang@samsung.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: Fix hang on dmaengine_terminate_all on certain boards</title>
<updated>2015-05-22T12:31:03Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2015-05-21T00:34:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81cc6edc08705ac0146fe6ac14a0982a31ce6f3d'/>
<id>urn:sha1:81cc6edc08705ac0146fe6ac14a0982a31ce6f3d</id>
<content type='text'>
The pl330 device could hang infinitely on certain boards when DMA
channels are terminated.

It was caused by lack of runtime resume when executing
pl330_terminate_all() which calls the _stop() function. _stop() accesses
device register and can loop infinitely while checking for device state.

The hang was confirmed by Dinh Nguyen on Altera SOCFPGA Cyclone V
board during boot. It can be also triggered with:

$ echo 1 &gt; /sys/module/dmatest/parameters/iterations
$ echo dma1chan0 &gt; /sys/module/dmatest/parameters/channel
$ echo 1 &gt; /sys/module/dmatest/parameters/run
$ sleep 1
$ cat /sys/module/dmatest/parameters/run

Reported-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Fixes: ae43b3289186 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Cc: &lt;stable@vger.kernel.org&gt;
Tested-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: fix return status on pending transfers</title>
<updated>2015-03-18T17:11:49Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2015-03-16T11:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75967b788c2898601620ce91ed14b4a9a371b6fe'/>
<id>urn:sha1:75967b788c2898601620ce91ed14b4a9a371b6fe</id>
<content type='text'>
The pl330_tx_status() function returns the desc-&gt;status if the
dma_cookie_status() call does indicate the cookie completed,
however the desc-&gt;status is not look directly compatible. Sparse
throws the following warning:

pl330.c:2262:35: warning: mixing different enum types
pl330.c:2262:35:     int enum desc_status  versus
pl330.c:2262:35:     int enum dma_status

Attempt to fix this by adding a switch statement to turn the
desc-&gt;status into a dma_status.

Note, this has only been tested with the dmatest suite.

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
--
Vinod Koul &lt;vinod.koul@intel.com&gt;
Dan Williams &lt;dan.j.williams@intel.com&gt;
DMA List &lt;dmaengine@vger.kernel.org&gt;
Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Linux ARM Kernel &lt;linux-arm-kernel@lists.infradead.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: make unexported functions static</title>
<updated>2015-03-18T17:11:49Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2015-03-16T11:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5503aed8117881f58a2688521dfbf9fc7dbcdfe7'/>
<id>urn:sha1:5503aed8117881f58a2688521dfbf9fc7dbcdfe7</id>
<content type='text'>
Whilst running sparse on pl330 driver it was noticed there are
two functions that are not static but not exported to any other
users in the kernel.

Fix the following warnings by making 'pl330_pause' and the
'pl330_get_current_xferred_count' static:

pl330.c:2165:5: warning: symbol 'pl330_pause' was not declared. Should it be static?
pl330.c:2206:5: warning: symbol 'pl330_get_current_xferred_count' was not declared. Should it be static?

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
--
Vinod Koul &lt;vinod.koul@intel.com&gt;
Dan Williams &lt;dan.j.williams@intel.com&gt;
DMA List &lt;dmaengine@vger.kernel.org&gt;
Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Linux ARM Kernel &lt;linux-arm-kernel@lists.infradead.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: fix issues with big-endian armv7</title>
<updated>2015-03-18T17:11:48Z</updated>
<author>
<name>Ben Dooks</name>
</author>
<published>2015-03-16T11:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a2307f72e684199a27ae9d8e7cfd98e8b05c8db'/>
<id>urn:sha1:3a2307f72e684199a27ae9d8e7cfd98e8b05c8db</id>
<content type='text'>
When running Xilinx Zynq in big-endian mode the pl330 driver
fails to pass the dmatest suite. To fix this, ensure all non
byte values are written in little endian.

As a note, the documentation does not mention if it will do
big-endian descriptor fetches, only that it will swap the
data in flight.

Signed-off-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
--
Vinod Koul &lt;vinod.koul@intel.com&gt;
Dan Williams &lt;dan.j.williams@intel.com&gt;
DMA List &lt;dmaengine@vger.kernel.org&gt;
Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Jassi Brar &lt;jassisinghbrar@gmail.com&gt;
Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Linux ARM Kernel &lt;linux-arm-kernel@lists.infradead.org&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
<entry>
<title>dmaengine: pl330: add DMA_PAUSE feature</title>
<updated>2015-02-16T04:03:36Z</updated>
<author>
<name>Robert Baldyga</name>
</author>
<published>2015-02-11T12:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88987d2c7534a0269f567fb101e6d71a08f0f01d'/>
<id>urn:sha1:88987d2c7534a0269f567fb101e6d71a08f0f01d</id>
<content type='text'>
DMA_PAUSE command is used for halting DMA transfer on chosen channel.
It can be useful when we want to safely read residue before terminating
all requests on channel. Otherwise there can be situation when some data
is transferred before channel termination but after reading residue,
which obviously results with data loss. To avoid this situation we can
pause channel, read residue and then terminate all requests.
This scenario is common, for example, in serial port drivers.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
</content>
</entry>
</feed>
