Commit Graph

3662 Commits

Author SHA1 Message Date
Janusz Jankowski 92fa1858c8 rimage: image manifest v2.5
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski e2743bc397 rimage: add SHA384 hashing
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 72b6521c87 rimage: rename module_sha functions
These functions are generic and can be used for other SHA algorithms.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 71c8b502a0 rimage: rename ri_hash
We are going to have more hashing function,
so they should be named after hashing algorithms.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski a3af6df17a manifest: add v2.5 definitions
New version of manifest introduced with TGL platform
uses SHA384 for component hash.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Tomasz Lauda f69f4a839f host: remove not needed set of DMA_CB_STATUS_END
Next has this status set by default, so there is no need
to set it explicitly.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda f1fb5d3807 dma: remove unused DMA_CB_STATUS_SPLIT
Removes unused DMA_CB_STATUS_SPLIT and related code.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda d2d0eba43a dma: remove unused DMA_CB_STATUS_IGNORE
Removes DMA_CB_STATUS_IGNORE, which is no longer used.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 4777f261e1 dw-dma: cleanup and remove irq related code
Cleanups DW-DMA driver and removes any code related
to interrupt handling.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 45015fa361 dw-dma: remove double channel index assignment
Removes double channel index assignment in dw_dma_probe.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 99fcd37f13 schedule: use DMA multi channel scheduling domain
Registers low latency scheduler with DMA multi channel
domain as scheduling source. This way we can finally get rid
of scheduling code from DW-DMA driver and DAI component.
Functionally it works the same as the previous implementation,
but transfers scheduling layer to the right places.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda ed9e888358 platform: hsw: increase system heap size
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda bf15c8973b dw-dma: add PLATFORM_DW_DMA_INDEX definition
Adds PLATFORM_DW_DMA_INDEX definition. This allows
to access this value from the generic API.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda faf12ac7a7 dw-dma: rename DMA_AGGREGATED_IRQ definition
Renames DMA_AGGREGATED_IRQ to DW_DMA_AGGREGATED_IRQ
definition. This is more appropriate as it's not generic
DMA setting.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 2ab6bc9afe dma: extract dma array
Extracts dma array to be accessible from the generic API.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda f6ffa55621 dw-dma: add PLATFORM_NUM_DW_DMACS definition
Adds PLATFORM_NUM_DW_DMACS definition. This way generic
API can access this information.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 24201a650d schedule: implement DMA scheduling domain
Implements DMA scheduling domain. It allows to initialize
another low latency scheduler and schedule on any DMA channel.
The functionality stays the same as the one already done in
DMA drivers e.g. DW-DMA.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda e1d76a9a61 dma: imx8: add missing dma_chan_irq macro
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 30241d0d20 dma: add PLATFORM_MAX_DMA_CHAN definition
Adds PLATFORM_MAX_DMA_CHAN definition to every platform.
This way generic API can retrieve this information.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda fa9b4ed674 hda-dma: remove HDA_DMA_MAX_CHANS definition
Removes HDA_DMA_MAX_CHANS definition as it's not needed.
We can directly use the number of allocated channels.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 43d608674d dma: move CAVS_PLATFORM_NUM_DMACS to specific platforms
Moves CAVS_PLATFORM_NUM_DMACS definition to specific platforms
and renames it to PLATFORM_NUM_DMACS. This way we can access
to the number of platform DMAs from generic code.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 818090f962 schedule: add SOF_SCHEDULE_LL_DMA
Adds SOF_SCHEDULE_LL_DMA as the new low latency scheduling
domain type.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda e08f951591 schedule: rename SOF_SCHEDULE_LL to SOF_SCHEDULE_LL_TIMER
There can be many potential low latency scheduling domains,
so let be more specific here.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 5a63a6baf5 dma: add scheduling_source
Adds scheduling_source field and dma_is_scheduling_source
function. It allows for easy identification whether particular
DMA channel is the source of pipeline scheduling.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 67826253ea component: add comp_is_scheduling_source function
Adds comp_is_scheduling_source function, which checks whether
component is the one used as a scheduling source for the pipeline.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda b7591b579e dma: add core to dma_chan_data structure
Adds core to dma_chan_data structure. This way we can
easily identify which core currently owns the DMA channel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda ecae65c92d pipeline: add preload_task
Adds preload_task to pipeline. This task is only
allocated and initialized, when pipeline needs to be
preloaded with data e.g. render pipe scheduled on DMA irq.
It's always an EDF task, so we make sure it's get scheduled
no matter if interrupt was triggered or not.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda de7d4c95cf pipeline: allocate pipe_task only if needed
Changes implementation of pipe_task allocation and initialization
to happen in prepare call instead of during pipeline creations.
It might be that the pipeline will never be used.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda f58b83387c host: use blocking copy for one shot mode
Changes copy method for host working in one shot mode.
Blocking copy replaces interrupt based copy. In an effort
of extracting DMA interrupt based scheduling from DMA
to scheduler we need to minimize number of irq sources
in our flows. This patch also changes the interrupt
based implementation of traces copying through DMA.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda c38879d5ca dma: add interrupt ops implementations
Adds interrupt operation implementations for all existing
DMA drivers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 0b1eb91f10 dma: add interrupt operation
Adds interrupt operation and operation type to DMA API.
This is the first step in excluding DMA interrupt handling
to schedule layer.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 450ed737ee platform: cavs: include missing headers
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Tomasz Lauda 1d3fa8a432 platform: tgl: remove non-existent options selection
Removes selection of non-existent options.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 15:01:22 +03:00
Tomasz Lauda 17f2de5599 arch: xtensa: fix stack dump for exceptions in irq handlers
Fixes stack dump procedure for exceptions happening in interrupt
handlers. Stack base and size haven't been set to the interrupt's
one in current task context, so when exception happened during
interrupt processing we've got SOF_IPC_PANIC_STACK cause instead
of the real one.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:21:00 +01:00
Tomasz Lauda 84e75633d0 arch: xtensa: verify xtos_active_task offset
Adds STATIC_ASSERT to verify if the XTOS_TASK_CONTEXT_OFFSET
is set to the right value.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:21:00 +01:00
Tomasz Lauda db2a6e5b58 arch: xtensa: add macros to store values
Adds additional macros to store register values under the
selected structures per core.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:21:00 +01:00
Tomasz Lauda 7d12a6599b ipc: cleanup ipc functions
Cleanups ipc functions, so we don't have many not needed
layers of execution.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda 7f23b259c0 ipc: remove host_pending as it not needed
Removes host_pending from ipc structure, because it's no
longer needed. Scheduler will automatically throw an error,
when we'll try to run not completed task.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda 2e7fb133c8 ipc: add complete task callback
Changes ipc task implementation, so it accepts new messages from
host in a complete task callback. This way we will avoid the
situation, where host will send another message before we
truly complete current ipc task.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda 3c79047dad wait: panic only if we're lowering irq level
Change the waiti implementation to panic only if we're
lowering current interrupt level. In some rare cases
(like entering D3 for some platforms) we don't care,
because DSP will be disabled anyway.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda 3afc474518 task: add complete callback
Adds complete callback to task. Some EDF tasks will need to have
additional callback on task completion, which will be executed
in critical section along the setting task state to complete.
Doing it during regular execution is not enough, because it's done
on passive level and we want to avoid any race condition.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda eb0d309cf9 task: rename func to run
Renames task's func to run to better show intention of this callback.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Tomasz Lauda 752a3b2e15 task: change IPC and IDC tasks' priority
Changes priority of IPC and IDC tasks. They are always scheduled
as EDF tasks, where order of scheduling is based on deadline
and priority is meant for special tasks e.g. IDLE or ALMOST_IDLE.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 11:24:40 +02:00
Liam Girdwood db52ec9cac xtensa: add support for platforms with no threadptr register.
Fix the core-isa headers for HSW and BDW.

Provide a virtual threadptr register in the memory map using a linker
area below the stack. This can then be referenced instead of the register
for ISAs that dont support threadptr.

This patch also includes initial vthreadptr support for HSW/BDW platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-30 15:25:37 +01:00
Tomasz Lauda b80338c395 idc: move to cavs drivers
Moves idc implementation to cavs drivers instead of keeping
it in generic xtensa arch directory. IDC is specific for
SMP cAVS platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-30 11:34:39 +02:00
Tomasz Lauda 51c7667709 arch: xtensa: fix exception in case of spurious interrupt
We need to switch stacks before check for spurious interrupt,
because otherwise we will jump and try to restore stack pointer
from the wrong location.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-30 11:32:42 +02:00
Tomasz Lauda 889f0143a1 interrupt: imx: run cascaded irq handler in non atomic ctx
Runs interrupt handlers for cascaded interrupts in non atomic
context. Otherwise we are blocking other cores during execution,
which is not needed, since we only need to protect integrity of
the list.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-30 10:53:00 +02:00
Tomasz Lauda 564a18a1af interrupt: cavs: run cascaded irq handler in non atomic ctx
Runs interrupt handlers for cascaded interrupts in non atomic
context. Otherwise we are blocking other cores during execution,
which is not needed, since we only need to protect integrity of
the list.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-30 10:53:00 +02:00
Guennadi Liakhovetski b65f05006c mixer: fix mixer for capture pipelines
When triggering a pipeline, containing a mixer in the playback
direction, all input pipelines have to be considered. However, this
isn't applicable if the mixer is used in the capture direction. This
patch adds the missing check to mixer_trigger().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-09-29 14:45:36 +01:00
Marcin Rajwa 8528d932a9 host: verify if channel exists before resetting it
This patch provides a check for channel existence
before performing any action on it during reset
procedure.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-27 23:44:32 +02:00