CHROMIUM: DPTF kernel driver update to 8.0.9

Added support for UI tuning overrides.

Added primitive to set depth limit for P/T states and
	RAPL power limit.

Modified handling for suspend/resume events for S3.

Minor code clean-up and incremented the version to 8.0.9.

BUG=chrome-os-partner:25110
TEST=Manually tested
CQ-DEPEND=CL:190335

Change-Id: I60851d4021e43ffab8bdb01b7bc385d95ff3b41f
Signed-off-by: Brad Geltz <brad.geltz@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/190334
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
(cherry picked from commit a8e52e5e969e025ead36d0bb89ad7e414264d7c1)
Reviewed-on: https://chromium-review.googlesource.com/195288
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHROMIUM : DPTF update to v8.0.10

Fixed:
        S3 Resume issue
        Kernel panic fix

BUG=chrome-os-partner:26591
BUG=chrome-os-partner:27086
BUG=chrome-os-partner:27463
TEST=Manually tested
CQ-DEPEND=CL:192021

Change-Id: I1b2076c694f92a5535a6d5f81b4816156a642e3d
Signed-off-by: Brad Geltz <brad.geltz@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/192022
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Commit-Queue: Duncan Laurie <dlaurie@chromium.org>
(cherry picked from commit 1704f64a53dfb7ba2ac1e5a0c4e279511dfee4e0)
Reviewed-on: https://chromium-review.googlesource.com/195289
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHERRY-PICK: drm/i915/vlv: assert and de-assert sideband reset on resume

This is a bit like the CMN reset de-assert we do in DPIO_CTL, except
that it resets the whole common lane section of the PHY.  This is
required on machines where the BIOS doesn't do this for us on resume to
properly re-calibrate and get the PHY ready to transmit data.

Without this patch, such machines won't resume correctly much of the time,
with the symptom being a 'port ready' timeout and/or a link training
failure.

BUG=chrome-os-partner:25517
TEST=by hand on glimmer: suspend/resume a few times, with and without HDMI plugged in

Original-Change-Id: I3ee3e683db7638ee06ede982f957ebd3d2dfe934
Signed-off-by: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194325
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
(cherry picked from commit 93d59b7f49a1e0ca75f2e116013df8a1f262dbd0)

Change-Id: Iff6de44d1319b802b93dee43c1663c53ce3ef716
Reviewed-on: https://chromium-review.googlesource.com/195552
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
CHERRY-PICK: BACKPORT: ASoC: Intel: Make sure sst_byt_notify_work is run before freeing the stream

There is possibility that sst_byt_notify_work() is run after
sst_byt_stream_free() which can lead to a kernel crash since struct
sst_byt_stream is freed at that point.

Fix this by calling cancel_work_sync() for the stream notify work before
freeing the stream structure.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
(cherry picked from commit 114c5b96e955a1d8fb340743eea376e9eee6ea77)

BUG=chrome-os-partner:26948
TEST=Manual: Check that silent playback is rare

Original-Change-Id: Ib3d04b2b1d6491fffba6af6b7ebca8ee95570074
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/191745
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Jim Bride <jim.bride@intel.com>
(cherry picked from commit 3038d8dcee37729f31e7de2d8ff57a6199f447a8)

Change-Id: I284707fc0e0bc9afcce412213ebcc6f1d123b103
Reviewed-on: https://chromium-review.googlesource.com/196220
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHERRY-PICK: BACKPORT: ASoC: Byt-max98090: Add callback for stream start.

Register a callback for stream start to enable SHDN bit after stream has
started.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
(cherry picked from commit ffb290a85f226e5678b6db18fca0e9a5ee4fbc33)

Conflicts:

	sound/soc/intel/byt-max98090.c

BUG=chrome-os-partner:26948
TEST=Manual: Check that silent playback is rare

Original-Change-Id: I3a78c0f95ef0b0368480e790b03845001be12048
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/191743
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Jim Bride <jim.bride@intel.com>
(cherry picked from commit c05a0bf4a77d18a3cd749a6ec4af5d9ad18c1067)

Change-Id: I3a97049ea845079d62e876a6939c32b5f4b27bbf
Reviewed-on: https://chromium-review.googlesource.com/196221
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHERRY-PICK: BACKPORT: ASoC: Intel: Add notifier methods to receive confirmation of stream start/stop

Add callbacks so that we can notify other users that the FW has started
the stream (and LRCLK and BCLK). This is run as scheduled work to avoid
locking problems (since IRQs are OFF).

This waits for receipt of stream start/stop message from the DSP FW so
clocks will be running at this point.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
(cherry picked from commit b62547e7320597afbcf10ecac78ff3c9fada6e80)

BUG=chrome-os-partner:26948
TEST=Manual: Check that silent playback is rare

Original-Change-Id: Id929657b908d938c999b1b6e1f282d65565d2c94
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/191742
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Jim Bride <jim.bride@intel.com>
(cherry picked from commit aecff8e896edefdd6d72965ee7e851b1c95f81f0)

Change-Id: I1895376560bc1fbffc47a52d7e158605db4d23f1
Reviewed-on: https://chromium-review.googlesource.com/196222
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHERRY-PICK: BACKPORT: ASoC: Maxim 98090: Add PLL lock irq handler

This patch will try to recover the PLL lock on PLL unlocked interrupt.

The PLL lock can be recovered by toggling the SHDN bit OFF/On and then re-checking
the PLL state. This patch also masks interrupt sources until their handlers complete.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
(cherry picked from commit 27b0e2a703fdd1ddfb69cc0b0ab3e89f0478a220)

BUG=chrome-os-partner:26948
TEST=Manual: Check that silent playback is rare

Original-Change-Id: Id9e5cb1f244f6e5b54d03ed5d602cda27a54b9cb
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/191740
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Brian J Lovin <brian.j.lovin@intel.com>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Jim Bride <jim.bride@intel.com>
(cherry picked from commit d6ffa00d9e03a07d887424ff4a1f537f7ece4d1f)

Change-Id: I5c81e03d3f1c972c9c405905043e397f28a4ab2d
Reviewed-on: https://chromium-review.googlesource.com/196223
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHERRY-PICK: CHROMIUM: ASoC: Byt-max98090: Switch Max98090 codec to use 25mhz MCLK.

This will fix the pll unlock issue which is the root cause for audio
playback failure.
This requests corresponding coreboot change to use 25MHz.

BUG=chrome-os-partner:26948
TEST=Manual: Check that playback is never silent

Original-Change-Id: I2d07c7477d2843e8ecdf0400408a055774a2fae2
Signed-off-by: yang fang <yang.a.fang@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/193360
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
(cherry picked from commit 60b723c6dc68ec4ef8f7f2787f85b4d0206c82ad)

Change-Id: I82972962fbd02c3409c37ed6abc00dd791021c6b
Reviewed-on: https://chromium-review.googlesource.com/196224
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
CHROMIUM: ASoC: max98090 - Add corrected DMIC settings

BUG=chrome-os-partner:27888
TEST=Record audio from DMIC on rambi and listen for noise.

Change-Id: I7dd9fc7ef4a5547bd37d82b8b433834f116d32e1
Signed-off-by: Ralph Birt <ralph.birt@maximintegrated.com>
Reviewed-on: https://chromium-review.googlesource.com/194443
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit c0f21eea220db00b9b15bfef208bca67d4eb8077)
Reviewed-on: https://chromium-review.googlesource.com/196590
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
CHROMIUM: LPE: Fix audio crash due to negative address offset

There were occasional LPE crash during reboot testing:

[   11.883364] BUG: unable to handle kernel paging request at ffffc90121700000
[   11.883380] IP: [<ffffffffc024d8bc>] sst_module_insert_fixed_block+0x24f/0x26d [snd_soc_sst_dsp]
[   11.883397] PGD 7800b067 PUD 0
[   11.883405] Oops: 0002 [#1] SMP
[   11.886418] gsmi: Log Shutdown Reason 0x03

The virtual address, ffffc90121700000, was out of range. The virtual
address is calculated by adding LPE base address with an offset:

sst_memcpy32(dsp->addr.lpe + data->offset, data->data, data->size);

The offset is calculated in sst_byt_parse_module, by subtraction of
two virtual addresses dsp->addr.fw_ext and dsp->addr.lpe:

block_data.offset = block->ram_offset + (dsp->addr.fw_ext - dsp->addr.lpe);

These virtual addresses are assigned by kernel from ioremap:

sst->addr.lpe = ioremap(pdata->lpe_base, pdata->lpe_size);
sst->addr.fw_ext = ioremap(pdata->fw_base, pdata->fw_size);

In current driver code, offset is defined as unsigned int32:

struct sst_module_data {
...
	u32 offset;		/* offset in FW file */
};

Most of the time kernel assigned virtual addresses with addr.fw_ext
greater than addr.lpe. But sometimes it was the other way round.

Fix the problem by declaring offset as signed int32_t.

BUG=chrome-os-partner:28168
TEST=Test reboot on Rambi.

Change-Id: I050dd8d61e7249a94b4316d3f552459938147c9c
Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/195626
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
(cherry picked from commit efbd4ee43769df064881552cadf7289f177ddc04)
Reviewed-on: https://chromium-review.googlesource.com/196591
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>