Commit Graph

2303 Commits

Author SHA1 Message Date
Tomasz Lauda 8134a46705 work: fix to the previous change for ASYNC tasks
Fixes previous change for ASYNC tasks.
By mistake it didn't take into account provided timeout.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 15:42:56 +00:00
Guennadi Liakhovetski e5bc088e04 dw-dma: remove superfluous check
In dw_dma_start() .lli_current cannot be NULL. If it were NULL, lines
following the check, would cause a NULL-pointer dereference. Remove
the superfluous check.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 14:23:11 +00:00
Tomasz Lauda 1f97d44a3b work: proper timeout for new and rescheduled work
Takes work flag into consideration during initial and
rescheduled timeout setup.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 12:07:34 +00:00
Janusz Jankowski b749cd0fab [skip ci] github: add @jajanusz as cmake owner
+ scripts related to CMake and Kconfig

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 11:13:07 +00:00
Janusz Jankowski 328562093e gitignore: update for kconfig
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 11:08:09 +00:00
Pan Xiuli 2b0249373f scripts: change names for binary in qemu-check
Use back old style name.
Modify the build folder as gcc and xcc prefix added.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Pan Xiuli 140914aa03 scripts: update build all scripts
Use different build folder for gcc and xcc build.
Will auto selected if ROM build is not supported for the platform,
thus make -a -r can work.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Pan Xiuli 5c93db8ca7 CMake: restore the naming style of binaries
use sof-*.ri back to make alignment with Linux driver FW name
requirement.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Guennadi Liakhovetski 72d398c30d cavs: add a DMA capability to the system-runtime heap zone
The system-runtime zone on CAVS system is suitable for DMA, add the
capability to heap descriptors.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski f451f67028 alloc: always check heap capabilities
Currently only the runtime zone has several heaps with different
capabilities on some systems. So that if a memory allocation request
is made from that zone, a suitable heap is selected. Additionally,
if the request cannot be satisfied from the runtime heap, an attempt
is made to satisfy it from the buffer heap. The other two zones -
system and system-runtime - have per-core heaps with identical
capabilities. If the request to one of those zones cannot be
satisfied from it, no attempt is made to allocate memory from a
different zone. Supposedly because of this determinism no capability
check is performed. This is wrong, since if capabilities don't match
it should be assumed, that the obtained memory will not be suitable
for the designated purpose. This patch adds the missing checks.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski c8f1edfaa4 alloc: fix and improve the block allocation algorithm
The block allocation algorithm, as implemented in _balloc(), is first
trying to find a single free memory block to satisfy the request. If
that fails it is then trying to allocate several blocks in a
sequence. That part is implemented wrongly. It can end up allocating
multiple such block sequences, and not using but leaking them
instead. This patch first simplifies the search for a single suitable
buffer, then fixes the leakage.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 8c62c4457c alloc: improve a jump procision
In _balloc() if no heap was found, no need to jump to a location in
the function, where a potentially successful allocation is still
being processed, jump directly to the unlock-and-return point.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 5a9b8e7ee9 alloc: fix two potential NULL dereferences
bzero() doesn't check its pointer argument for NULL, the caller has
to avoid such calls.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 84d7eabde9 alloc: eliminate two redundant variable initialisations
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 46b7645c92 alloc: eliminate two goto statements
Use "break" to terminate loops instead of a "goto."

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 48145df552 alloc: optimise the contiguous block allocation algorithm
If we found a busy block among the potential sequence of blocks, that
we were trying to allocate, no need to retry the attempt from the
next starting block, unless it was the first block, that was busy. It
is enough to resume searching from the next block after the busy one.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Zhu Yingjiang a766e471b0 add nocodec topology for CNL
add nocodec topology for CNL, with three SSPs and one DMIC

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-23 09:20:41 +00:00
Janusz Jankowski 297958f418 icl: increase text section size
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 2843b43f94 cmake: update qemu-check.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 06b576f828 cmake: update host-build-all.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9840ecbbfe cmake: update xtensa-build-all.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0682b6e923 cmake: debug build support
Change DEBUG_BUILD define to use Kconfig's CONFIG_DEBUG

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 1526860228 cmake: vm rom build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 4574fdc15a cmake: add overrideconfig
overrideconfig is custom target that can be used
to set config values from scripts

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski d91be6da67 buildsystem: remove autotools from sof
This commit doesn't touch tools buildsystem.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 82b4da291b cmake: defconfigs support
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 07bd1b20cb cmake: add doc CMakeLists
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski a59e428b61 test: debugability: fix for full paths
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9a3dff5475 cmake: add CMakeLists for unit tests
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 7680a7b0dc cmake: add testbench host build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski d2528e101f cmake: bootloader build and meu support
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0beb84b828 cmake: add rimage build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9af711c761 rimage: remove config.h dependency
man_* files don't need it
pkcs can use PEM_KEY_PREFIX from passed in defines

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski e0ba98d21a cmake: add CMakeLists for firmware build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 82d234466a cmake: version script
Replace version.sh with cmake script.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0fd97adfb0 cmake: add utility scripts
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 86cd1a9ac4 kconfig: add initial Kconfig files
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 7c0f0d917c kconfig: add Kconfiglib
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Pan Xiuli 36e1139c97 scripts: pre update sof docker for cmake covert
Update the sof docker to support cmake to pre test cmake build system
change.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-22 09:36:13 +00:00
Zhang Keqiao eca416ad79 test: add a script for xrun injection test
This script is used to check the ability of alsa xrun handling

Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-01-21 21:41:22 +00:00
Ranjani Sridharan 03ababfb1c scripts: modify sof_bootone.sh to exit if sof_remove failed
Exit if sof_remove fails. This avoids running into further issues.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-18 08:36:03 +00:00
Pan Xiuli 323f255a5b CI: travis: add QEMU boot test for skl, kbl, cnl
Add QEMU boot test to remaining unsupported SKL, KBL, CNL.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-18 08:27:29 +00:00
Pan Xiuli cb0786cf42 scripts: update qemu boot check
Enable checks to all supported platforms of QEMU now.
Check both IPC header regs and memory window IPC message header.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-18 08:27:29 +00:00
Pan Xiuli 51cab44e2a scripts: install hexdump in docker
Need hexdump for the binary file read to detect qemu boot status.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-18 08:27:29 +00:00
Slawomir Blauciak f9640aa170 dma: link tx timeout
This is to prevent FW from getting stuck in case of anomalous
situations such as DMA taking too long to copy the data.

Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
2019-01-17 14:09:46 +00:00
Ranjani Sridharan 364f52b74f topology: cml: update macros for HDA DAI's
HDA_DAI_CONFIG has been replaced to re-use DAI_CONFIG.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2019-01-17 08:50:06 +00:00
Liam Girdwood ef8df6f95c heap: buffers: Increase buffer heap size by least used large blocks.
Trace show large blocks infrequently used. Decrease usage count so we
can increase buffer heap.

TODO: Large block could be completely removed and we could be allocated
from buffer heap instead.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-01-16 20:59:48 +00:00
Pierre-Louis Bossart d0ddef6c0d src/include/sof/dma-trace.h: fix style
Make checkpatch happy

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-16 20:07:40 +00:00
Pierre-Louis Bossart b15e1b15f9 src/include/sof/debug.h: fix style
Make checkpatch happy

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-16 20:07:40 +00:00
Pierre-Louis Bossart d8f529c830 src/include/sof/dai.h: fix style
Make checkpatch happy

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-16 20:07:40 +00:00