Commit Graph

3605 Commits

Author SHA1 Message Date
Marcin Maka edea885ba5 pm-runtime: cavs: introduce common pm runtime data
A common structure should be define for all cAVS platforms
for data that will be used by common cAVS pm runtime routines.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-09-27 16:20:53 +01:00
Marcin Maka bf8aded456 platform: add wait for interrupt handler
Another platform specific platform_wait_for_interrupt handler
enables more platform level power optimizations when
entering sleep mode.

By default implemented as a call to the generic wait_for_interrupt
until the platforms start additing their specific settings there.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-09-27 16:20:53 +01:00
Marcin Maka ab5059145e arch: host: remove include constraint from wait.h
This header may be included by a platform specific, intermediate
wait() layer inserted between the lib and the architecture code.
Therefore the including unit should not be limited to lib only.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-09-27 16:20:53 +01:00
Curtis Malainey 7804f530e9 platforms: Enable optional cherrytrail DMA
The 3rd DMAC that CHT has seems to be causing issues. Since it is not
needed lets make it optional so the platform can be usable.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-27 15:52:15 +01:00
Tomasz Lauda f585df2a3b ll_schedule: don't run tasks in non atomic context
Low latency scheduler is low latency, so the tasks shouldn't
be preempted by other things. This doesn't change any flow,
because xtos sets highest possible irq level in interrupt
dispatcher anyway.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-27 15:49:28 +01:00
Sathyanarayana Nujella 7046e849cb topology: tgl_rt1308: update link_id's for iDisp Dai Config's
Update the topology to use the same iDisp link_id's as in
tgl-rt1308 m/c driver.

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
2019-09-26 10:15:25 +02:00
Marcin Rajwa 3ce82a1544 kpb: make change state logs verbose
This patch makes logs related to state change in KPB
component verbose.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-25 17:57:14 +02:00
Tomasz Lauda 3be6f2e742 dw-dma: use generic dma reg functions
Changes usage to generic dma reg functions instead of using
dw-dma specific methods.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-25 17:53:52 +02:00
Tomasz Lauda 941834da57 hda-dma: use generic dma reg functions
Changes usage to generic dma reg functions instead of using
hda-dma specific methods.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-25 17:53:52 +02:00
Paul Olaru 9871995697 drivers: dw: Use generic dma_reg_* functions
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-09-25 13:36:11 +02:00
Paul Olaru def04819b3 drivers: hda-dma: Use generic dma_reg_* functions
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-09-25 13:36:11 +02:00
Paul Olaru f8bdaf0328 sof: lib: dma: Add register access helper functions
These functions replace the raw io_reg_* functions for accessing the DMA
hardware registers.

Every DMA driver makes auxiliary functions for accessing the hardware
registers; this is an effort to make common functions for this purpose.

This commit adds the generic functions.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-09-25 13:36:11 +02:00
Bartosz Kokoszko d42c01956f buffer: add overwrite in circular wrap case
In case when we overwrite "old" data in buffer
(when buffer is full) we should align r_ptr
with w_ptr.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-09-24 12:44:16 +02:00
Paul Olaru c22d3c188d drivers: imx: timer: Do not enable timer in timer_start
This function is called too early for native timers to work. On the
other platform which uses native timers (Haswell) this function is also
empty.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
2019-09-24 13:37:49 +03:00
Marcin Maka 9794dd7866 task: add option to provide stack allocated externally
Dynamic allocations of the stack with the default size
may impact the performance in case of frequently re-initiated
short tasks. This option may be useful in that case.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-09-23 21:48:01 +02:00
Marcin Rajwa 6cc3892f71 host: fix wrong check for host_period_bytes
This patch fixes the incorrect check for
host_period_bytes. This value was incorrectly used
to store host request for stream position. After
we introduced dedicated parameter for this purpose
(no_stream_position) the check needs to be updated
accordingly. Therefore this patch adds a check
for no_stream_position rather than host_period_bytes
to decide if stream position shall be send.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-23 10:28:26 +02:00
Marcin Rajwa 1852036454 ipc: align stream.h with kernel
This change is to align sof_ipc_stream_params with its
kernel equivalent. In this patch no_stream_position
parameter is added to relax host_period_bytes from
storing information about the need of stream position
update.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-23 10:28:26 +02:00
Curtis Malainey 32ef184a21 issue_template: remove dead references and duplicate fields
reproducibility field is duplicated and soft is archived and no longer
needed. Add placeholders for needed system information.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-23 09:32:45 +02:00
Curtis Malainey 0b4712906d topology: sof-cht-max98090 reduce buffer size of media pipeline
Reduce size of buffers so dsp doesn't run out of memory on topology load

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-20 16:58:44 +02:00
Curtis Malainey aa3b18ed71 topology: sof-cht-max98090 move DAI definition above media pipeline
The DAI definition needs to come first otherwise the media pipeline with
be parsed incorrectly resulting in a failure to load the topology

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-20 16:58:44 +02:00
Marcin Rajwa ccba8e0668 timer_domain: check if delay occurred during scheduling
This patch checks if during scheduling we were
delayed.
If such situation happens we log error message.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-20 14:43:58 +02:00
Marcin Rajwa 75188e2243 timer: rework timer_set() so it verifies requested ticks
This patch reworks cAVS timer_set() interface used
to write into timer's compare register.
This change takes care of ticks request which are
"past time". If such condition occur we set compare
register to current time so the latency is minimum.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-20 14:43:58 +02:00
Marcin Rajwa aa788b995c codeowners: add @tlauda and @mrajwa as codeowners of schedule directory
This adds @tlauda and @mrajwa as codeowners of
src\scheduler directory so they will be
auto-requested for review in all changes related
to files under this directory.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-09-20 14:43:58 +02:00
Curtis Malainey 1571af188b topology: cht-max98090 add missing virtual widgets
Topology will fail to probe without these widgets

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-09-20 11:44:19 +02:00
Liam Girdwood 25c8990d39 fuzzer: add BSW platform and fix fw_ready for CHT.
CHT was missing fw_ready callback. Add BSW platform.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 689ce5ac99 fuzzer: byt: align macros to line length limit.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 224f177020 fuzzer: add support for HSW and BDW platforms.
Can now send fuzzing IPCs and topologies to HSW/BDW VMs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood bf72bf7a7b fuzzer: cleanup mailbox platform abstraction
Pass mailbox as parameter and add convenience helper for platform ops.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 29a9b9d529 fuzzer: add more logging and cleanup printf
provide more detail to the user and print to stdout.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood c33e1a3677 fuzzer: no need for extra new line.
message already contains the newline.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 5dce3fb8fb fuzzer: fix return value of topology loader.
Return the real error code.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Liam Girdwood 8cd194e624 fuzzer: fix fuzzer hardcoding of topology.
Command line option was ignored. Fix it.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-20 10:09:17 +01:00
Pan Xiuli b0bb5a33c8 scripts: qemu: fix qemu check for BDW and HSW
The qemu for BDW and HSW removed shm mbox and moved it into dram.
Change the scripts to the new version.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-09-19 15:36:59 +01:00
Tomasz Lauda 0bed38788e timer: remove unused core field
Removes unused core field from timer structure.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 7325dda291 timer: remove unused timesource_data structure
Removes structure timesource_data, which is no longer used.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 0e6f3a9fe4 platform: rename PLATFORM_WORKQ_DEFAULT_TIMEOUT define
Renames define PLATFORM_WORKQ_DEFAULT_TIMEOUT to
PLATFORM_LL_DEFAULT_TIMEOUT.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda ec0570483d platform: remove unused PLATFORM_WORKQ_CLOCK define
Removes unused define PLATFORM_WORKQ_CLOCK.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 93ecfe671a agent: use PLATFORM_DEFAULT_CLOCK
Changes clock used by agent to PLATFORM_DEFAULT_CLOCK.
Previously used PLATFORM_WORKQ_CLOCK also has value of
PLATFORM_DEFAULT_CLOCK.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda e95edfe48d platform: remove unused PLATFORM_WORKQ_WINDOW define
Removes unused define PLATFORM_WORKQ_WINDOW.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 0f1f3d1222 platform: remove unused PLATFORM_LINK_DMA_TIMEOUT define
Removes unused define PLATFORM_LINK_DMA_TIMEOUT.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 7d5842f300 ll_schedule: use ll_schedule_domain in ll_schedule
Refactors ll scheduler in order to incorporate the usage
of ll scheduling domain. Functionally it stays the same.
Now we use data shared in ll_schedule_domain instead
of allocating shared ll context.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda a4b4d5ff2b notifier: add macro for getting clk notification id
Adds macro to simplify getting clock change notification id
based on the selected clock id.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 8fa4c0013c schedule: add timer_domain
Adds first ll scheduler domain, which is timer.
Timer domain implementation is functionally the same,
as the implementation already used in ll_schedule.
It will replace the original ll_schedule one.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 869b0c11e3 timer: save handler irq argument in scheduler
Changes timer API to save interrupt handler argument
in ll scheduler shared context instead of timer struct.
This way we will be able to share the same timer structure
between all the cores.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Tomasz Lauda 4ee233990e schedule: introduce ll_schedule_domain
This patch introduces new structure called ll_schedule_domain.
It will be used to initialize ll scheduler with different
types of scheduling time domains. Right now it's only working
based on timer interrupts, but will be extended.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-19 15:32:23 +01:00
Liam Girdwood 460c41aa66 tgl: platform: removed unused scheduling macros.
No longer used so remove.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-18 21:01:16 +02:00
Liam Girdwood 39874c5f6c mailbox: remove duplicated mailbox macro
Duplicates MAILBOX_SIZE

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-18 21:01:16 +02:00
Liam Girdwood 049411519e linker: Make sure config.h is used by all linker scripts and memory.h.
This was partially used in some scripts. Fix it so all scripts can use
config.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-18 21:01:16 +02:00
Liam Girdwood 9d560bba9e tools: build: use standard naming convention for build dirs.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-09-18 21:01:16 +02:00
Seppo Ingalsuo 81f8de93c5 Tools: Test: Updates for testbench to match other changes in SOF
This patch updates the locations of "make install" libraries default
install locations into shell script to run SRC test cases. The script
also now prints the used LD_LIBRARY path to ease setting up code
debugging.

The segfault of testbench executable is fixed by returning a valid
pointer reference instead of a NULL from test dummy function
arch_schedulers_get().  The rest of testbench version of schedule.c
was also updated to be like the current real version module.

Finally in the testbench.c main the file names string pointers are
initilizated to null as well as the word length parameter to avoid
a segfault if executable is started without command line arguments
to see the usage help text.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-18 20:50:50 +02:00