Commit Graph

1462 Commits

Author SHA1 Message Date
Marcin Maka 5118c6d330 memory: heap reorg for smp
All kernel level components/services allocate objects
from sys heap again. Separation from the runtime heap
provides more reliable, deterministic power flows.
It also presents an opportunity to implement kernel/app
memory protection on platforms which support it.

A better performance is expected due to much simpler
allocation approach.

In order to enable 'free()', slave cores allocate their
objects from their small dedicated sys heaps and when
the core goes down, the entire heap is reset at once.
Further memory power optimization is possible by moving
each sys heap to a separate memory bank that is powered
on/off along with the slave core.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-17 14:54:00 +02:00
Pan Xiuli 4f3f4d7ec3 ipc: set IPC process task to lower priority
IPC process task priority should be lower than pipeline copy task.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:40 +08:00
Pan Xiuli 38d541fee9 scheduler: add task priority into scheduler
Check priority before check timeout delta to make sure task with higher
priority run first.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:40 +08:00
Pan Xiuli 85e1c0d738 schedule: fix schedule list double add
Check if the schedule task is added in the list before add it.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:39 +08:00
Pan Xiuli 869c08d6c0 schedule: fix edf reschedule
Should reschedule if we did not try to reschedule.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 14:17:39 +08:00
Rander Wang d527b50816 pipe: fix a infinite loop issue in schedule module
There are two paths to delete a task in shedule list. A task would be
deleted when task is completed or cancelled. So it maybe deleted
twice. there is a circle in the schedule list after a sequence
of append-delete operations. This makes a infinite loop in schedule function

Now all of list items are deleted in one place and cancelled when task are complete

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-09-14 14:17:32 +08:00
Pan Xiuli 7be08fdbeb task: refine task to avoid double task function run
Add spinlock to the arch task irq list to avoid double function run.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-14 13:43:07 +08:00
Liam Girdwood f17abe644c
Merge pull request #370 from mmaka1/link
build: linker: x scripts for cavs platforms aligned
2018-09-13 16:09:22 +02:00
Liam Girdwood 96edbbb99c
Merge pull request #368 from xiulipan/mirqlistfix
interrupt: fix unsafe list del
2018-09-13 16:08:01 +02:00
Liam Girdwood 98652478e5
Merge pull request #367 from xiulipan/merge12
Merge stable-1.2 into master without scheduler and task part
2018-09-13 16:04:16 +02:00
Marcin Maka 15fdbd938c build: linker: x scripts for cavs platforms aligned
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-13 13:44:51 +02:00
Pan Xiuli 2ad08d2893 interrupt: fix unsafe list del
Use list_for_item_safe when need to del list item

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 18:57:35 +08:00
Rander Wang 1ff4a9df32 playback: kill a infinite loop in pcm_param
Don't delete item with list_for_item. with list_for_item, a item
is deleted from list but the next of this item is used to visit
the list.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:29:23 +08:00
Rander Wang bc96f88e65 dma-trace: kill a infinite loop in dma_trace_config
Don't delete item with list_for_item. with list_for_item, a item
is deleted from list but the next of this item is used to visit
the list.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:29:07 +08:00
Rander Wang 7c400d0f7f byt: remove waiti on byt
waiti would cause FW panic if it is called in irq level
higher than passive level.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:28:46 +08:00
Pan Xiuli 0df634e8a9 list: refine list_item_del to avoid make list chaos
There are possible that we call list_item_del to same list item twice. This
will cause the list be into chaos. Reset the next and prev pointer to 0
to avoid risk.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:27:48 +08:00
Rander Wang be0b058974 dma-trace: tune the dma trace reschedule time
500us woulld cause dma trace buffer overflow at the boot up time.
Now refine it to 100us to make both scheduler and dma trace happy

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:26:15 +08:00
Pan Xiuli c0c720a6cb dma-trace: workaround reschedule work fail
If reschedule work timeout is too small. The reschedule will fail.
Workaround this issue by increace the reschedule timeout.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:26:15 +08:00
Pan Xiuli 734a5bfe70 wait: add check for waiti
waiti can only work with interrupt level 0, check if the level is 0 and
set SOF_IPC_PANIC_WFI panic.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-09-13 16:25:29 +08:00
Rander Wang 9ebd1bce88 dw-dma: refine dw_dma_stop to clear done bit in all lli
The initialization of lli should be out of loop

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-13 16:15:47 +08:00
Liam Girdwood 84e15e721a
Merge pull request #363 from jajanusz/apl-cleanup-merge-del-platform-c
apl: remove duplicated platform.c file
2018-09-13 09:04:08 +02:00
Janusz Jankowski eb7e101ae0 apl: remove duplicated platform.c file
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-09-12 13:26:25 +02:00
Liam Girdwood 6137beed1e
Merge pull request #350 from jajanusz/gcc-optional-implicit-fallthrough
autoconf: optional implicit-fallthrough
2018-09-11 13:42:11 +01:00
Janusz Jankowski 054a218e83 autoconf: optional implicit-fallthrough
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-09-11 12:13:17 +02:00
Liam Girdwood 7d9c1b4080
Merge pull request #325 from tlauda/topic/mem_window_3_change
platform: cavs: let trace manager to clear mem window
2018-09-10 16:56:05 +01:00
Liam Girdwood c86b6b6bdd
Merge pull request #162 from bkokoszx/ssp_clock_idle
drivers: apl-ssp: change clock idle state
2018-09-10 16:54:55 +01:00
Bartosz Kokoszko 1d2c681d8d drivers: apl-ssp: handling bclk idle state
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-09-10 16:02:48 +02:00
Bartosz Kokoszko 780dd79659 uapi: ipc: Add clks_control field to ssp_struct
I've added clks_control field in sof_ipc_dai_ssp_params
struct. I've deleted mclk/bclk/fs_keep_active field. They
will be supported by clks_control field and defined macros.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2018-09-10 16:02:48 +02:00
Liam Girdwood d582a36fd0
Merge pull request #340 from tlauda/topic/cache_fixes
memory: cavs: cache fixes
2018-09-10 14:14:36 +01:00
Liam Girdwood 269659622b
Merge pull request #339 from tlauda/topic/notifier_master_core
notifier: right now reserved only for master core
2018-09-10 14:07:01 +01:00
Liam Girdwood 1395483aea
Merge pull request #338 from tlauda/topic/agent_ms
agent: switch from us to ms
2018-09-10 14:06:19 +01:00
Liam Girdwood 6c3b0ac18b
Merge pull request #336 from mmaka1/cherry-pick/hda-dma-init-fix
dma: hda: playback preload phase synced with logical buffer state
2018-09-10 14:01:45 +01:00
Liam Girdwood 5a4ba0a355
Merge pull request #332 from bardliao/bard/master
ipc: add missing schedule_task_init/config
2018-09-10 13:44:06 +01:00
Tomasz Lauda 1b28d0b88c notifier: right now reserved only for master core
Make notifier available only for master core.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 11:10:10 +02:00
Tomasz Lauda 4d1c566c3c memory: cavs: cache fixes
We need to writeback clock data, because it's used
in work queue. Also we need to writeback bss in order
to share static pointers with slave cores.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 11:05:53 +02:00
Bard liao c45746e8f8 ipc: add missing schedule_task_init/config
schedule_task_init and schedule_task_config was removed on the
"Merge remote-tracking branch 'gh/next' into next-master2" commit.
Which is necessary for scheduler task.

Signed-off-by: Bard liao <yung-chuan.liao@intel.com>
2018-09-10 16:42:35 +08:00
Tomasz Lauda 08ed1b4d9a agent: switch from us to ms
We should switch from microseconds to milliseconds as
difference in cycles for current timeout is 150000.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-10 10:34:55 +02:00
Marcin Maka fee9f9656d dma: hda: playback preload phase synced with logical buffer state
Removed dma/dsp race condition that happened within preload phase.

Min buffer size set to entire buffer to avoid dma and dsp
pointers misalignmen in case the period size is not multiple
of the hda dma burst size.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-09-08 17:34:10 +02:00
Liam Girdwood 7abb55fe72
Merge pull request #324 from tlauda/topic/trace_smp
trace: implement multicore traces
2018-09-07 14:45:05 +01:00
Tomasz Lauda 37877f2b04 platform: cavs: let trace manager to clear mem window
Removes zeroing of memory window 3 - it will be now performed
in different place. Zeroing here causes removal of some traces
at the beginning.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-07 14:34:30 +02:00
Tomasz Lauda 2fe33241b7 trace: implement multicore traces
Implements multicore traces for both DMA and memory window mode.
Also adds core id to the logs.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-09-07 14:28:11 +02:00
Liam Girdwood a81c919783
Merge pull request #319 from dabekjakub/temp_pipeline_free
test: pipeline_free
2018-09-07 11:53:42 +01:00
Jakub Dabek 4434ca77c2 test: pipeline_free
Added tests for pipeline free and underlining static functions.
Also refactored previously added tests to incorporate code reuse.

Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2018-09-07 11:08:48 +02:00
Liam Girdwood 051f827dbb
Merge pull request #318 from singalsu/eq_iir_fix_comp_data_retrieve
EQ IIR: Fix just introduced bug in eq_iir_cache()
2018-09-06 14:19:39 +01:00
Seppo Ingalsuo 374f8b31d5 EQ IIR: Fix just introduced bug in eq_iir_cache()
The component data pointer need to be retrieved after dev data
has been invalidated. If wrong order the cd may be set to garbage.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-09-06 12:16:29 +03:00
Liam Girdwood bf26cd9ca7
Merge pull request #317 from singalsu/eq_iir_simplify_init_dcache_invalidate_proposal
EQ IIR: Increase IPC length, simplify initilialization, and dcache invalidate code
2018-09-06 09:46:00 +01:00
Liam Girdwood d27ec1ddb0
Merge pull request #284 from tlauda/topic/dai_remove_wait
dai: remove wait on stop
2018-09-06 09:32:37 +01:00
Seppo Ingalsuo 83d19fb57e IPC: Increase max size from 128 to 384
This patch increases IPC length to be sufficient for e.g. 2x 12th order
IIR configuration. This is near to minimum feasible to enable testing of
equalizers. There may be need to adjust the limit up even more later but
this is the proposal now until we know better the requirements.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-09-06 11:24:00 +03:00
Seppo Ingalsuo 6d8a397852 EQ IIR: Change initialization and simplify dcache invalididate function
This patch changes equalizer initialization to store the allocated
delay lines buffers address in a single pointer and size component
data. This simplifies the dcache invalidate code avoids knowledge of
filter internals that may change for future intrinsic optimized
version.

The EQ reconfigure and responses switching is by this patch changed to
happen in prepare() to avoid doing unnecessary allocation and free
operations in typical component life cycle. Prior to to prepare sent
configuration is just stored but not initialized into equalizers.
On-the-fly response switching can be enabled later with some work for
the component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-09-06 11:24:00 +03:00
Liam Girdwood 318176fc74
Merge pull request #312 from cujomalainey/master
Move towards modern markdown README
2018-09-06 08:25:09 +01:00