]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
7 years agoMerge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5640', 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:36:48 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5640', 'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5660' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:36:44 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rockchip' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/max9867', 'asoc/topic/mtk', 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:36:35 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/max9867', 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/img' and 'asoc/topic/max98090' into asoc...
Mark Brown [Sun, 19 Feb 2017 16:36:32 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/img' and 'asoc/topic/max98090' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:36:23 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', 'asoc/topic/fsl', 'asoc/topic/fsl-sai' and 'asoc/topic/graph' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/debugfs' and 'asoc...
Mark Brown [Sun, 19 Feb 2017 16:36:18 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/debugfs' and 'asoc/topic/doc' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/chmap', 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:36:13 +0000 (16:36 +0000)]
Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/chmap', 'asoc/topic/cq93vc' and 'asoc/topic/da7218' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/topic/adau17x1', 'asoc/topic/adsp', 'asoc/topic...
Mark Brown [Sun, 19 Feb 2017 16:35:51 +0000 (16:35 +0000)]
Merge remote-tracking branches 'asoc/topic/adau17x1', 'asoc/topic/adsp', 'asoc/topic/ak4642', 'asoc/topic/amd' and 'asoc/topic/arizona' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/rcar' into asoc-next
Mark Brown [Sun, 19 Feb 2017 16:35:48 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next
Mark Brown [Sun, 19 Feb 2017 16:35:47 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/intel' into asoc-next
Mark Brown [Sun, 19 Feb 2017 16:35:45 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next
Mark Brown [Sun, 19 Feb 2017 16:35:44 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next

7 years agoMerge remote-tracking branch 'asoc/topic/component' into asoc-next
Mark Brown [Sun, 19 Feb 2017 16:35:41 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/topic/component' into asoc-next

7 years agoMerge remote-tracking branches 'asoc/fix/fsl-mxs-saif' and 'asoc/fix/sunxi' into...
Mark Brown [Sun, 19 Feb 2017 16:35:37 +0000 (16:35 +0000)]
Merge remote-tracking branches 'asoc/fix/fsl-mxs-saif' and 'asoc/fix/sunxi' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/rcar' into asoc-linus
Mark Brown [Sun, 19 Feb 2017 16:35:36 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/intel' into asoc-linus
Mark Brown [Sun, 19 Feb 2017 16:35:34 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus

7 years agoMerge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Mark Brown [Sun, 19 Feb 2017 16:35:33 +0000 (16:35 +0000)]
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

7 years agoMerge tag 'asoc-fix-v4.10-rc3' into asoc-linus
Mark Brown [Sun, 19 Feb 2017 16:35:15 +0000 (16:35 +0000)]
Merge tag 'asoc-fix-v4.10-rc3' into asoc-linus

ASoC: Fixes for v4.10

As well as the usual smattering of driver specific fixes collected since
the merge window this has one particularly important fix to the core for
handling of aux_devs which was broken during the merge window by some of
the componentization refactoring.

# gpg: Signature made Wed 11 Jan 2017 17:26:37 GMT
# gpg:                using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0
# gpg:                issuer "broonie@kernel.org"
# gpg: key 0D9EACE2CD7BEEBC: no public key for trusted key - skipped
# gpg: key 0D9EACE2CD7BEEBC marked as ultimately trusted
# gpg: key CCB0A420AF88CD16: no public key for trusted key - skipped
# gpg: key CCB0A420AF88CD16 marked as ultimately trusted
# gpg: key 162614E316005C11: no public key for trusted key - skipped
# gpg: key 162614E316005C11 marked as ultimately trusted
# gpg: key A730C53A5621E907: no public key for trusted key - skipped
# gpg: key A730C53A5621E907 marked as ultimately trusted
# gpg: key 276568D75C6153AD: no public key for trusted key - skipped
# gpg: key 276568D75C6153AD marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@debian.org>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@kernel.org>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>" [ultimate]
# gpg:                 aka "Mark Brown <broonie@linaro.org>" [ultimate]
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>" [ultimate]

7 years agoASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine
Jeeja KP [Fri, 17 Feb 2017 09:34:46 +0000 (15:04 +0530)]
ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine

After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: nau8825: automatic BCLK and LRC divde in master mode
John Hsu [Fri, 17 Feb 2017 01:55:33 +0000 (09:55 +0800)]
ASoC: nau8825: automatic BCLK and LRC divde in master mode

configurable LRC and BCLK divide. The driver
will make configurations of LRC and BCLK automatically according to
BCLK and FS information in master mode.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Add device id for Geminilake
Vinod Koul [Thu, 9 Feb 2017 11:14:04 +0000 (16:44 +0530)]
ASoC: hdac_hdmi: Add device id for Geminilake

Geminilake is new Intel SoC, so add codec entry for HDMI

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add Geminlake IDs
Vinod Koul [Thu, 9 Feb 2017 11:14:03 +0000 (16:44 +0530)]
ASoC: Intel: Skylake: Add Geminlake IDs

Geminilake is next gen SoC, so add the IDs for Geminilake.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt298: Add DMI match for Geminilake reference platform
Vinod Koul [Thu, 9 Feb 2017 11:14:02 +0000 (16:44 +0530)]
ASoC: rt298: Add DMI match for Geminilake reference platform

Geminilake reference platform also uses combo jack for audio connector
so we need to set codec pdata to use this based on DMI match for this
board.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Check device type to get endpoint configuration
Senthilnathan Veppur [Thu, 9 Feb 2017 11:14:01 +0000 (16:44 +0530)]
ASoC: Intel: Skylake: Check device type to get endpoint configuration

Geminilake has two different devices connected to the same SSP, so use
device_type check to get correct device configuration.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine
Jeeja KP [Tue, 7 Feb 2017 13:40:00 +0000 (19:10 +0530)]
ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine

After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:58 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine

After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine
Jeeja KP [Tue, 7 Feb 2017 13:39:57 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine

After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add jack port initialize in rt286 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:56 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Add jack port initialize in rt286 machine

After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Add machine pin widget for each port
Jeeja KP [Tue, 7 Feb 2017 13:39:55 +0000 (19:09 +0530)]
ASoC: hdac_hdmi: Add machine pin widget for each port

Represent each port as machine DAPM pin widget. This helps in
enable/disable pin when monitor is connected/disconnected in case pcm
is rendered to multiple ports.

Create machine pin widgets  and pin switch kcontrol for each port and
report based on the pin status

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:54 +0000 (19:09 +0530)]
ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine

Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_da7219_max98357 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:53 +0000 (19:09 +0530)]
ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine

Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_rt298.c machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:52 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine

Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_ssm4567 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine
Jeeja KP [Tue, 7 Feb 2017 13:39:51 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine

Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_max98357a machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine
Jeeja KP [Tue, 7 Feb 2017 13:39:50 +0000 (19:09 +0530)]
ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine

Creates ASoC jack for HDMI pcm and calls hdmi codec API to initialize
jack in skl_rt268 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Use ASoC jack instead of snd_jack
Jeeja KP [Tue, 7 Feb 2017 13:39:49 +0000 (19:09 +0530)]
ASoC: hdac_hdmi: Use ASoC jack instead of snd_jack

Use snd_soc_jack instead of snd_jack and create the jack in machine
driver and pass the jack pointer to hdac_hdmi driver for jack
reporting.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Add support for multiple ports to a PCM
Jeeja KP [Tue, 7 Feb 2017 13:39:48 +0000 (19:09 +0530)]
ASoC: hdac_hdmi: Add support for multiple ports to a PCM

Since we have the MST feature enabled and Pin-Port mux for user to
select the converter routing, multiple port mapping to same converter
needs to be supported.

To support multiple port mapped to same converter following changes are
done for this:.
o Add port list to pcm, so that multiple ports can be mapped to a PCM.
o Jack reporting in case where multiple port are attached to same PCM.
o Change hdac_hdmi_get_port_from_cvt(), channel_map, remove functions
to parse through all ports mapped to same the PCM.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoc: hdac_hdmi: Configure pin verbs for MST
Jeeja KP [Tue, 7 Feb 2017 13:39:47 +0000 (19:09 +0530)]
ASoc: hdac_hdmi: Configure pin verbs for MST

To enable stream on a specific port of a MST capable pin, the port
needs to be selected before we configure the pin widget verb.

When port is selected, all the pin widget verb controlling the sink
device operation will be directed to selected port. So add port
selection before configuring the pin widget verb.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Handle MST pin jack detection at boot/resume
Jeeja KP [Tue, 7 Feb 2017 13:39:46 +0000 (19:09 +0530)]
ASoC: hdac_hdmi: Handle MST pin jack detection at boot/resume

The ELD notification can be received asynchronously from the graphics
side and this may happen just at the moment the sound driver is
initializing and notification will be missed. Similarly at system
resume, the notification is ignored as the  ELD and connection states
are updated in anyway at the end of the resume.
So check the jack status in boot/resume by querying the port presence
based on pin caps and report the jack status.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Add MST verb support
Jeeja KP [Tue, 7 Feb 2017 13:39:45 +0000 (19:09 +0530)]
ASoC: hdac_hdmi: Add MST verb support

To support DP MST audio, new pin verbs/params are added. This patch
adds helper functions to do following:
o To set a specific port
o To get the currently selected port
o To get the length of port.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: mediatek: add power-domains for mt2701-afe-pcm.txt
Garlic Tseng [Thu, 16 Feb 2017 05:27:16 +0000 (13:27 +0800)]
ASoC: mediatek: add power-domains for mt2701-afe-pcm.txt

This add power-domains for mt2701-afe-pcm

Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: mediatek: add power-domain get/put ctrl for mt2701
Garlic Tseng [Thu, 16 Feb 2017 05:27:15 +0000 (13:27 +0800)]
ASoC: mediatek: add power-domain get/put ctrl for mt2701

add power-domain ctrl for audio driver

Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: fsl_sai: support more than 2 channels
Alexandre Belloni [Fri, 10 Feb 2017 18:42:43 +0000 (19:42 +0100)]
ASoC: fsl_sai: support more than 2 channels

The FSL SAI can support up to 32 channels using TDM. Report that value so
they can actually be used.

Tested using 8 channels.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdmi-codec: remove HDMI device unregister
Vincent Abriou [Wed, 8 Feb 2017 09:47:01 +0000 (10:47 +0100)]
ASoC: hdmi-codec: remove HDMI device unregister

While unregistering the hdmi-codec, the hdmi device list must be
cleaned up. It avoid kernel page fault when registering again the
hdmi-codec.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Add support to handle MST capable pin
Jeeja KP [Mon, 6 Feb 2017 06:39:18 +0000 (12:09 +0530)]
ASoC: hdac_hdmi: Add support to handle MST capable pin

To handle jack event and configuration of the pin widget for MST
capable pin, this patch adds:
o Flag to identify the pin is MST capable.
o In notify callback(), based on the pipe and port information marks if
the port is mst_capable. In case of non MST, port is defaulted to zero.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add route change to nau88l25_ssm4567 machine
Jeeja KP [Mon, 6 Feb 2017 06:39:16 +0000 (12:09 +0530)]
ASoC: Intel: Skylake: Add route change to nau88l25_ssm4567 machine

To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_ssm4567 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add route change to nau88l25_max98357a machine
Jeeja KP [Mon, 6 Feb 2017 06:39:15 +0000 (12:09 +0530)]
ASoC: Intel: Skylake: Add route change to nau88l25_max98357a machine

To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: Add route change to rt298 machine
Jeeja KP [Mon, 6 Feb 2017 06:39:17 +0000 (12:09 +0530)]
ASoC: Intel: bxt: Add route change to rt298 machine

To support MST moved pin to port, this changes the routes based on
port. So change the route in bxt_rt298 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Begin to add support for DP Multi-stream audio
Jeeja KP [Mon, 6 Feb 2017 06:39:14 +0000 (12:09 +0530)]
ASoC: hdac_hdmi: Begin to add support for DP Multi-stream audio

With MST each pin contains several ports to which device can be
connected.

As a preparatory work to support DP MST this patch adds below changes:
1. Defines the port structure and moves all stream related information
   like ELD, converter list, chmap to port.
2. Creates ports for each pin based on the max_ports support.
3. Based on Pin-Port combination creates DAPM Mux widget instead of Pin
   to allow user to select a converter.
4. Port zero is the default port when pin does not support MST.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: fix ES8328_I2C/SPI dependencies
Arnd Bergmann [Mon, 6 Feb 2017 12:27:11 +0000 (13:27 +0100)]
ASoC: fix ES8328_I2C/SPI dependencies

The two front-ends to the codec can now be selected individually, but fail to
build when the bus support is missing:

sound/built-in.o: In function `es8328_spi_probe':
es8328-spi.c:(.text+0x125854): undefined reference to `__devm_regmap_init_spi'
sound/built-in.o: In function `es8328_spi_driver_init':
es8328-spi.c:(.init.text+0x3589): undefined reference to `__spi_register_driver'

Related to this, the added dependency on SND_SOC_ES8328 breaks:

warning: (SND_SOC_ALL_CODECS) selects SND_SOC_ES8328_I2C which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_ES8328 && I2C)

This adds the respective Kconfig dependencies and changes SND_SOC_ES8328 to a hidden
symbol that is selected implicitly by the two more specific options, as we do for
some other codecs. We have to remove the 'depends on' for SND_SOC_IMX_ES8328 in the
same step to avoid a recursive dependency.

Fixes: aa00f2c8aff7 ("ASoC: Allow to select ES8328_I2C and ES8328_SPI directly")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Report Platform ID info from NHLT
Subhransu S. Prusty [Wed, 11 Jan 2017 11:01:02 +0000 (16:31 +0530)]
ASoC: Intel: Skylake: Report Platform ID info from NHLT

This patch create entry in sysfs file system to report the
platform_id = "pci-id-oem_id-oem_table_id-oem_revision"
for board identification.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI
Romain Perier [Fri, 3 Feb 2017 14:37:59 +0000 (15:37 +0100)]
ASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI

The driver is used for Rockchip rk3288-based boards using a configurable
analog output (can be an headphone) and the built-in HDMI audio output
that is part of the RK3288 SoCs and use the Alsa HDMI codec driver. For
some rk3288-based boards the analog output and the hdmi audio are plugged
on the same i2s line, so we have to do the same in the driver by using a
DAI link CPU to multicodecs. This configuration can be found for example
on the Radxa Rock2 or the Firefly-RK3288.

This commit is based on the initial work that was done by Sjoerd Simons
<sjoerd.simons@collabora.com> with some improvements.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Allow to select ES8328_I2C and ES8328_SPI directly
Romain Perier [Fri, 3 Feb 2017 14:37:58 +0000 (15:37 +0100)]
ASoC: Allow to select ES8328_I2C and ES8328_SPI directly

Currently, we have to select these symbols explictly via Kconfig, from
another entry. If we plan to use generic audio drivers like
simple-audio-card, the user need to be able to enable these symbols
directly via the menuconfig.

This commit also fixes unmet dependencies to SND_SOC_IMX_ES8328 caused
by these changes.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: es8328: Add support for slave mode
Romain Perier [Fri, 3 Feb 2017 14:37:57 +0000 (15:37 +0100)]
ASoC: es8328: Add support for slave mode

Currently, the function that changes the DAI format only supports master
mode. Trying to use a slave mode exits the function with -EINVAL and
leave the codec misconfigured. This commits adds support for enabling
the slave mode.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: add channel map support in bxt_da7219_max98357a machine
Jeeja KP [Tue, 24 Jan 2017 16:19:07 +0000 (21:49 +0530)]
ASoC: Intel: bxt: add channel map support in bxt_da7219_max98357a machine

HDMI registers channel map controls per PCM. As PCMs are not
registered during dai_link init callback, store the pcm ids and
codec DAIs during this init callback.

Register for late probe and call the jack_init API which also
registers channel map in the late probe callback handler.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: Add route change to da7219_max98357a machine
Jeeja KP [Tue, 24 Jan 2017 16:19:13 +0000 (21:49 +0530)]
ASoC: Intel: bxt: Add route change to da7219_max98357a machine

To support MST moved pin to port, this changes the routes based on
port. So change the route in bxt_da7219_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Skylake: Add route change to rt286 machine
Jeeja KP [Tue, 24 Jan 2017 16:19:09 +0000 (21:49 +0530)]
ASoC: Intel: Skylake: Add route change to rt286 machine

To support MST moved pin to port, this changes the routes based on
port. So change the route in skl_rt286 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: bxt: add channel map support in rt298 machine
Jeeja KP [Tue, 24 Jan 2017 16:19:06 +0000 (21:49 +0530)]
ASoC: Intel: bxt: add channel map support in rt298 machine

HDMI registers channel map controls per pcm. As PCMs are not
registered during dai_link init callback, store the pcm ids and
codec DAIs during this init callback.

Register for late probe and call the jack_init API which registers
channel map in the late probe callback handler.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: hdac_hdmi: Move channel info from pin to PCM structure
Jeeja KP [Tue, 24 Jan 2017 16:19:05 +0000 (21:49 +0530)]
ASoC: hdac_hdmi: Move channel info from pin to PCM structure

Channel info is part of the pcm parameter and channel map control is
created for each pcm. So move channel info to pcm instead of pin
structure and the mutex lock to pcm.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: nau8540: new codec driver
John Hsu [Fri, 3 Feb 2017 08:19:24 +0000 (16:19 +0800)]
ASoC: nau8540: new codec driver

Add codec driver of NAU85L40

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Drop unnecessary debugfs ifdef
Daniel Baluta [Wed, 1 Feb 2017 13:37:35 +0000 (15:37 +0200)]
ASoC: Drop unnecessary debugfs ifdef

This is a relict of 6553bf06a369 ("ASoC: Don't try to register debugfs
entries if the parent does not exist").

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rsnd: fixup reset timing of sync convert_rate
Kuninori Morimoto [Thu, 2 Feb 2017 05:01:05 +0000 (05:01 +0000)]
ASoC: rsnd: fixup reset timing of sync convert_rate

Sync convert rate settings should be availabled *after* Playing.
Thus, src->sync should be reset first of init function.
Otherwise, it will set remaining settings when it start playing.
This patch fixes it. Thanks to Yokoyama-san

Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: cht-bsw-rt5645: fix unused variable compiler warning
Pierre-Louis Bossart [Wed, 1 Feb 2017 18:27:05 +0000 (12:27 -0600)]
ASoC: cht-bsw-rt5645: fix unused variable compiler warning

Missed unused variable in previous changes, oops.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt5645: fix error handling for gpio detection
Pierre-Louis Bossart [Wed, 1 Feb 2017 18:27:04 +0000 (12:27 -0600)]
ASoC: rt5645: fix error handling for gpio detection

Optional gpio handling should not cause an error status and prevent
probing if it's missing.  Remove error return for -ENOENT case and
move error message to dev_info

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches
Matt Ranostay [Tue, 31 Jan 2017 21:21:43 +0000 (13:21 -0800)]
ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches

We can get audio errors if hitting deeper idle states on omaps:

[alsa.c:230] error: Fatal problem with alsa output, error -5.
[audio.c:614] error: Error in writing audio (Input/output error?)!

This seems to happen with off mode idle enabled as power for the
whole SoC may get cut off between filling the McBSP fifo using DMA.
While active DMA blocks deeper idle states in hardware, McBSP
activity does not seem to do so.

Basing the QoS latency calculation on the FIFO size, threshold,
sample rate, and channels.

Based on the original patch by Tony Lindgren
Link: https://patchwork.kernel.org/patch/9305867/
Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: qcom: Drop __func__ usage from log prints
Bjorn Andersson [Mon, 30 Jan 2017 21:03:37 +0000 (13:03 -0800)]
ASoC: qcom: Drop __func__ usage from log prints

The combination of dev_err() and __func__ make most of these log prints
over 100 chars long. Remove the usage of __func__ to clean the kernel
log and as the usage is not necessary to identify the individual log
prints.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: qcom: lpass-cpu: Remove unnecessary clock checks
Bjorn Andersson [Mon, 30 Jan 2017 21:03:36 +0000 (13:03 -0800)]
ASoC: qcom: lpass-cpu: Remove unnecessary clock checks

Clean up the clock calling code by removing numerous IS_ERR() checks by
just assigning the clock NULL; as this turn all used functions in the
clk API to nops.

Also include the word "optional" in the error message when failing to acquire
the optional osr clocks.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: mt8173-max98090: remove the call to snd_soc_jack_add_pins.
Enric Balletbo i Serra [Fri, 27 Jan 2017 15:20:42 +0000 (16:20 +0100)]
ASoC: mt8173-max98090: remove the call to snd_soc_jack_add_pins.

The snd_soc_card_jack_new function can call snd_soc_jack_add_pins for
you, so pass directly the pins struct when you create the new jack.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: cht-bsw-rt5645: fix DAI formats
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:45 +0000 (14:09 -0600)]
ASoC: Intel: cht-bsw-rt5645: fix DAI formats

Remove default and set I2S mode correctly both on codec and
cpu sides

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: add support for ALC3270 codec
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:40 +0000 (14:09 -0600)]
ASoC: Intel: add support for ALC3270 codec

Use ACPI ID 10EC3270 to load machine driver for cht-bsw-rt5645
and add reference to 3270 to use the rt5645 mode

Tested on Asus T100HA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: cht-bsw-rt5645: select ASRC source based on routing quirk
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:44 +0000 (14:09 -0600)]
ASoC: Intel: cht-bsw-rt5645: select ASRC source based on routing quirk

Some platforms use AIF2, use routing information to set ASRC as needed

Suggested-by: Bard Liao <bardliao@realtek.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:43 +0000 (14:09 -0600)]
ASoC: Intel: cht-bsw-rt5645: add quirks for SSP0/AIF1/AIF2 routing

This driver may be used on Baytrail CR platforms where SSP2 is
not available.

Add quirks and routing detection based on work done for RT5640.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoc: rt5645: add ACPI ID 10EC3270
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:37 +0000 (14:09 -0600)]
ASoc: rt5645: add ACPI ID 10EC3270

ALC3270 is a low-cost version of RT5645, add ACPI ID
to enable probe and use rt5645 codec driver
Tested on Asus T100HA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:35 +0000 (14:09 -0600)]
ASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10

the BIOS reports this codec as RT5640 but it's a rt5670. Use the
quirk mechanism to use the cht_bsw_rt5672 machine driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: cht_bsw_rt5645: harden ACPI device detection
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:41 +0000 (14:09 -0600)]
ASoC: Intel: cht_bsw_rt5645: harden ACPI device detection

Fix classic issue of having multiple codecs listed in DSDT
but a single one actually enabled. The previous code did
not handle such errors and could also lead to uninitalized
configurations

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Atom: add machine driver for baytrail-rt5645 hardware
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:39 +0000 (14:09 -0600)]
ASoC: Intel: Atom: add machine driver for baytrail-rt5645 hardware

Use machine driver initially defined for CherryTrail

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt5645: add support for RT5648
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:36 +0000 (14:09 -0600)]
ASoC: rt5645: add support for RT5648

add ACPI ID 10EC5648 found e.g on Asus X205TA and use
rt5645 driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: codecs: rt5670: add quirk for Lenovo Thinkpad 10
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:34 +0000 (14:09 -0600)]
ASoC: codecs: rt5670: add quirk for Lenovo Thinkpad 10

the BIOS incorrectly reports this codec as 5640 but it is
really a rt5670

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: add support for Realtek 5651 on Cherrytrail
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:33 +0000 (14:09 -0600)]
ASoC: Intel: add support for Realtek 5651 on Cherrytrail

RT5651 is used on some Cherrytrail platforms, add the ACPI
ID in machine table.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156191
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Atom: Add HP Pavilion x2 10-p000 machine entry
Alexandrov Stansilav [Thu, 26 Jan 2017 20:09:32 +0000 (14:09 -0600)]
ASoC: Intel: Atom: Add HP Pavilion x2 10-p000 machine entry

Add machine entry for HP X2 Pavilion 10-p100.
This notebook contains rt5640 codec, but with ACPI ID "10EC3276".

Signed-off-by: Alexandrov Stansilav <neko@nya.ai>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: rt5640: Add "10EC3276" ACPI ID
Alexandrov Stansilav [Thu, 26 Jan 2017 20:09:31 +0000 (14:09 -0600)]
ASoC: rt5640: Add "10EC3276" ACPI ID

Add ACPI ID "10EC3276" for sound card found on notebook HP Pavilion X2 10-p000.
ACPI DSDT Table on this device describes this card as ALC3276, but it is in fact rt5640.

Signed-off-by: Alexandrov Stansilav <neko@nya.ai>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: cht_bsw_rt5645: add Baytrail MCLK support
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:38 +0000 (14:09 -0600)]
ASoC: Intel: cht_bsw_rt5645: add Baytrail MCLK support

The existing code assumes a 19.2 MHz MCLK as the default
hardware configuration. This is valid for CherryTrail but
not for Baytrail.

Add explicit MCLK configuration to set the 19.2 clock on/off
depending on DAPM events.

This is a prerequisite step to enable devices with Baytrail
and RT5645 such as Asus X205TA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoMerge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Tue, 31 Jan 2017 20:03:10 +0000 (20:03 +0000)]
Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel

7 years agoASoC: Intel: atom: fix frame polarity
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:29 +0000 (14:09 -0600)]
ASoC: Intel: atom: fix frame polarity

The current frame sync polarity definitions are inconsistent in the
Atom/DPCM driver, fix to align with regular ASoC definitions and
update code in platform and machine drivers for RT5640 and RT5651.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: boards: remove .pm_ops in all Atom/DPCM machine drivers
Pierre-Louis Bossart [Thu, 26 Jan 2017 20:09:30 +0000 (14:09 -0600)]
ASoC: Intel: boards: remove .pm_ops in all Atom/DPCM machine drivers

This patch corrects an omission in bytcr_rt5640 and bytcr_rt5651.
All existing machine drivers shall not use .pm_ops to avoid a double
suspend, as initially implemented by 3f2dcbeaeb2b
("ASoC: Intel: Remove soc pm handling to allow platform driver handle it").

Reported-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoASoC: Intel: Atom: Configure media_loop1 and sprot_loop in stereo
Sebastien Guiriec [Thu, 26 Jan 2017 12:07:04 +0000 (13:07 +0100)]
ASoC: Intel: Atom: Configure media_loop1 and sprot_loop in stereo

Most of the devices are using stereo speakers so media_loop1 and
sprot_loop default mode should be stereo.

As per default all the routing UCM configuration doesn't enable Post
processing loops it is not impacting curent configurations.

Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
7 years agoLinux 4.10-rc6
Linus Torvalds [Sun, 29 Jan 2017 22:25:17 +0000 (14:25 -0800)]
Linux 4.10-rc6

7 years agodrm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()
Linus Torvalds [Sun, 29 Jan 2017 21:50:06 +0000 (13:50 -0800)]
drm/i915: Check for NULL i915_vma in intel_unpin_fb_obj()

I've seen this trigger twice now, where the i915_gem_object_to_ggtt()
call in intel_unpin_fb_obj() returns NULL, resulting in an oops
immediately afterwards as the (inlined) call to i915_vma_unpin_fence()
tries to dereference it.

It seems to be some race condition where the object is going away at
shutdown time, since both times happened when shutting down the X
server.  The call chains were different:

 - VT ioctl(KDSETMODE, KD_TEXT):

    intel_cleanup_plane_fb+0x5b/0xa0 [i915]
    drm_atomic_helper_cleanup_planes+0x6f/0x90 [drm_kms_helper]
    intel_atomic_commit_tail+0x749/0xfe0 [i915]
    intel_atomic_commit+0x3cb/0x4f0 [i915]
    drm_atomic_commit+0x4b/0x50 [drm]
    restore_fbdev_mode+0x14c/0x2a0 [drm_kms_helper]
    drm_fb_helper_restore_fbdev_mode_unlocked+0x34/0x80 [drm_kms_helper]
    drm_fb_helper_set_par+0x2d/0x60 [drm_kms_helper]
    intel_fbdev_set_par+0x18/0x70 [i915]
    fb_set_var+0x236/0x460
    fbcon_blank+0x30f/0x350
    do_unblank_screen+0xd2/0x1a0
    vt_ioctl+0x507/0x12a0
    tty_ioctl+0x355/0xc30
    do_vfs_ioctl+0xa3/0x5e0
    SyS_ioctl+0x79/0x90
    entry_SYSCALL_64_fastpath+0x13/0x94

 - i915 unpin_work workqueue:

    intel_unpin_work_fn+0x58/0x140 [i915]
    process_one_work+0x1f1/0x480
    worker_thread+0x48/0x4d0
    kthread+0x101/0x140

and this patch purely papers over the issue by adding a NULL pointer
check and a WARN_ON_ONCE() to avoid the oops that would then generally
make the machine unresponsive.

Other callers of i915_gem_object_to_ggtt() seem to also check for the
returned pointer being NULL and warn about it, so this clearly has
happened before in other places.

[ Reported it originally to the i915 developers on Jan 8, applying the
  ugly workaround on my own now after triggering the problem for the
  second time with no feedback.

  This is likely to be the same bug reported as

     https://bugs.freedesktop.org/show_bug.cgi?id=98829
     https://bugs.freedesktop.org/show_bug.cgi?id=99134

  which has a patch for the underlying problem, but it hasn't gotten to
  me, so I'm applying the workaround. ]

Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agoMerge branch 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 29 Jan 2017 18:56:56 +0000 (10:56 -0800)]
Merge branch 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull two parisc fixes from Helge Deller:
 "One fix to avoid usage of BITS_PER_LONG in user-space exported swab.h
  header which breaks compiling qemu, and one trivial fix for printk
  continuation in the parisc parport driver"

* 'parisc-4.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header
  parisc, parport_gsc: Fixes for printk continuation lines

7 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 28 Jan 2017 23:09:23 +0000 (15:09 -0800)]
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Two I2C driver bugfixes.

  The 'VLLS mode support' patch should have been entitled 'reconfigure
  pinctrl after suspend' to make the bugfix more clear. Sorry, I missed
  that, yet didn't want to rebase"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: imx-lpi2c: add VLLS mode support
  i2c: i2c-cadence: Initialize configuration before probing devices

7 years agoparisc: Don't use BITS_PER_LONG in userspace-exported swab.h header
Helge Deller [Sat, 28 Jan 2017 10:52:02 +0000 (11:52 +0100)]
parisc: Don't use BITS_PER_LONG in userspace-exported swab.h header

In swab.h the "#if BITS_PER_LONG > 32" breaks compiling userspace programs if
BITS_PER_LONG is #defined by userspace with the sizeof() compiler builtin.

Solve this problem by using __BITS_PER_LONG instead.  Since we now
#include asm/bitsperlong.h avoid further potential userspace pollution
by moving the #define of SHIFT_PER_LONG to bitops.h which is not
exported to userspace.

This patch unbreaks compiling qemu on hppa/parisc.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org>
7 years agoparisc, parport_gsc: Fixes for printk continuation lines
Helge Deller [Tue, 3 Jan 2017 21:55:50 +0000 (22:55 +0100)]
parisc, parport_gsc: Fixes for printk continuation lines

Signed-off-by: Helge Deller <deller@gmx.de>
7 years agoMerge tag 'nfs-for-4.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sat, 28 Jan 2017 19:50:17 +0000 (11:50 -0800)]
Merge tag 'nfs-for-4.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "Stable patches:
   - NFSv4.1: Fix a deadlock in layoutget
   - NFSv4 must not bump sequence ids on NFS4ERR_MOVED errors
   - NFSv4 Fix a regression with OPEN EXCLUSIVE4 mode
   - Fix a memory leak when removing the SUNRPC module

  Bugfixes:
   - Fix a reference leak in _pnfs_return_layout"

* tag 'nfs-for-4.10-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  pNFS: Fix a reference leak in _pnfs_return_layout
  nfs: Fix "Don't increment lock sequence ID after NFS4ERR_MOVED"
  SUNRPC: cleanup ida information when removing sunrpc module
  NFSv4.0: always send mode in SETATTR after EXCLUSIVE4
  nfs: Don't increment lock sequence ID after NFS4ERR_MOVED
  NFSv4.1: Fix a deadlock in layoutget

7 years agoMerge tag 'md/4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md
Linus Torvalds [Sat, 28 Jan 2017 19:09:04 +0000 (11:09 -0800)]
Merge tag 'md/4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md

Pull MD fixes from Shaohua Li:
 "This fixes several corner cases for raid5 cache, which is merged into
  this cycle"

* tag 'md/4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md:
  md/r5cache: disable write back for degraded array
  md/r5cache: shift complex rmw from read path to write path
  md/r5cache: flush data only stripes in r5l_recovery_log()
  md/raid5: move comment of fetch_block to right location
  md/r5cache: read data into orig_page for prexor of cached data
  md/raid5-cache: delete meaningless code

7 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Sat, 28 Jan 2017 19:06:42 +0000 (11:06 -0800)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Catalin Marinas:
 "Fix kernel panic on ACPI-based systems where CPU capacity description
  is not currently handled"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: skip register_cpufreq_notifier on ACPI-based systems

7 years agoMerge tag 'arc-4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Linus Torvalds [Sat, 28 Jan 2017 19:00:08 +0000 (11:00 -0800)]
Merge tag 'arc-4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Hopefully last set of changes for ARC for 4.10:

   - fix for unaligned access emulation corner case

   - fix for udelay loop inline asm regression

   - fix irq affinity finally for AXS103 board [Yuriy]

   - final fixes for setting IO-coherency sanely in SMP"

* tag 'arc-4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: [arcompact] handle unaligned access delay slot corner case
  ARCv2: smp-boot: wake_flag polling by non-Masters needs to be uncached
  ARC: smp-boot: Decouple Non masters waiting API from jump to entry point
  ARCv2: MCIP: update the BCR per current changes
  ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list
  ARCv2: MCIP: Deprecate setting of affinity in Device Tree

7 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 27 Jan 2017 20:54:16 +0000 (12:54 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) GTP fixes from Andreas Schultz (missing genl module alias, clear IP
    DF on transmit).

 2) Netfilter needs to reflect the fwmark when sending resets, from Pau
    Espin Pedrol.

 3) nftable dump OOPS fix from Liping Zhang.

 4) Fix erroneous setting of VIRTIO_NET_HDR_F_DATA_VALID on transmit,
    from Rolf Neugebauer.

 5) Fix build error of ipt_CLUSTERIP when procfs is disabled, from Arnd
    Bergmann.

 6) Fix regression in handling of NETIF_F_SG in harmonize_features(),
    from Eric Dumazet.

 7) Fix RTNL deadlock wrt. lwtunnel module loading, from David Ahern.

 8) tcp_fastopen_create_child() needs to setup tp->max_window, from
    Alexey Kodanev.

 9) Missing kmemdup() failure check in ipv6 segment routing code, from
    Eric Dumazet.

10) Don't execute unix_bind() under the bindlock, otherwise we deadlock
    with splice. From WANG Cong.

11) ip6_tnl_parse_tlv_enc_lim() potentially reallocates the skb buffer,
    therefore callers must reload cached header pointers into that skb.
    Fix from Eric Dumazet.

12) Fix various bugs in legacy IRQ fallback handling in alx driver, from
    Tobias Regnery.

13) Do not allow lwtunnel drivers to be unloaded while they are
    referenced by active instances, from Robert Shearman.

14) Fix truncated PHY LED trigger names, from Geert Uytterhoeven.

15) Fix a few regressions from virtio_net XDP support, from John
    Fastabend and Jakub Kicinski.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (102 commits)
  ISDN: eicon: silence misleading array-bounds warning
  net: phy: micrel: add support for KSZ8795
  gtp: fix cross netns recv on gtp socket
  gtp: clear DF bit on GTP packet tx
  gtp: add genl family modules alias
  tcp: don't annotate mark on control socket from tcp_v6_send_response()
  ravb: unmap descriptors when freeing rings
  virtio_net: reject XDP programs using header adjustment
  virtio_net: use dev_kfree_skb for small buffer XDP receive
  r8152: check rx after napi is enabled
  r8152: re-schedule napi for tx
  r8152: avoid start_xmit to schedule napi when napi is disabled
  r8152: avoid start_xmit to call napi_schedule during autosuspend
  net: dsa: Bring back device detaching in dsa_slave_suspend()
  net: phy: leds: Fix truncated LED trigger names
  net: phy: leds: Break dependency of phy.h on phy_led_triggers.h
  net: phy: leds: Clear phy_num_led_triggers on failure to avoid crash
  net-next: ethernet: mediatek: change the compatible string
  Documentation: devicetree: change the mediatek ethernet compatible string
  bnxt_en: Fix RTNL lock usage on bnxt_get_port_module_status().
  ...

7 years agoMerge tag 'xfs-for-linus-4.10-rc6-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Fri, 27 Jan 2017 20:44:32 +0000 (12:44 -0800)]
Merge tag 'xfs-for-linus-4.10-rc6-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs uodates from Darrick Wong:
 "I have some more fixes this week: better input validation, corruption
  avoidance, build fixes, memory leak fixes, and a couple from Christoph
  to avoid an ENOSPC failure.

  Summary:
   - Fix race conditions in the CoW code
   - Fix some incorrect input validation checks
   - Avoid crashing fs by running out of space when freeing inodes
   - Fix toctou race wrt whether or not an inode has an attr
   - Fix build error on arm
   - Fix page refcount corruption when readahead fails
   - Don't corrupt userspace in the bmap ioctl"

* tag 'xfs-for-linus-4.10-rc6-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: prevent quotacheck from overloading inode lru
  xfs: fix bmv_count confusion w/ shared extents
  xfs: clear _XBF_PAGES from buffers when readahead page
  xfs: extsize hints are not unlikely in xfs_bmap_btalloc
  xfs: remove racy hasattr check from attr ops
  xfs: use per-AG reservations for the finobt
  xfs: only update mount/resv fields on success in __xfs_ag_resv_init
  xfs: verify dirblocklog correctly
  xfs: fix COW writeback race

7 years agoMerge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
Linus Torvalds [Fri, 27 Jan 2017 20:41:46 +0000 (12:41 -0800)]
Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs updates from Chris Mason:
 "Some fixes that we've collected from the list.

  We still have one more pending to nail down a regression in lzo
  compression, but I wanted to get this batch out the door"

* 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: remove ->{get, set}_acl() from btrfs_dir_ro_inode_operations
  Btrfs: disable xattr operations on subvolume directories
  Btrfs: remove old tree_root case in btrfs_read_locked_inode()
  Btrfs: fix truncate down when no_holes feature is enabled
  Btrfs: Fix deadlock between direct IO and fast fsync
  btrfs: fix false enospc error when truncating heavily reflinked file

7 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 27 Jan 2017 20:36:39 +0000 (12:36 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A set of fixes for this series. This contains:

   - Set of fixes for the nvme target code

   - A revert of patch from this merge window, causing a regression with
     WRITE_SAME on iSCSI targets at least.

   - A fix for a use-after-free in the new O_DIRECT bdev code.

   - Two fixes for the xen-blkfront driver"

* 'for-linus' of git://git.kernel.dk/linux-block:
  Revert "sd: remove __data_len hack for WRITE SAME"
  nvme-fc: use blk_rq_nr_phys_segments
  nvmet-rdma: Fix missing dma sync to nvme data structures
  nvmet: Call fatal_error from keep-alive timout expiration
  nvmet: cancel fatal error and flush async work before free controller
  nvmet: delete controllers deletion upon subsystem release
  nvmet_fc: correct logic in disconnect queue LS handling
  block: fix use after free in __blkdev_direct_IO
  xen-blkfront: correct maximum segment accounting
  xen-blkfront: feature flags handling adjustments

7 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Linus Torvalds [Fri, 27 Jan 2017 20:29:30 +0000 (12:29 -0800)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull rdma fixes from Doug Ledford:
 "Second round of -rc fixes for 4.10.

  This -rc cycle has been slow for the rdma subsystem. I had already
  sent you the first batch before the Holiday break. After that, we kept
  only getting a few here or there. Up until this week, when I got a
  drop of 13 to one driver (qedr). So, here's the -rc patches I have. I
  currently have none held in reserve, so unless something new comes in,
  this is it until the next merge window opens.

  Summary:

   - series of iw_cxgb4 fixes to make it work with the drain cq API

   - one or two patches each to: srp, iser, cxgb3, vmw_pvrdma, umem,
     rxe, and ipoib

   - one big series (13 patches) for the new qedr driver"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (27 commits)
  RDMA/cma: Fix unknown symbol when CONFIG_IPV6 is not enabled
  IB/rxe: Prevent from completer to operate on non valid QP
  IB/rxe: Fix rxe dev insertion to rxe_dev_list
  IB/umem: Release pid in error and ODP flow
  RDMA/qedr: Dispatch port active event from qedr_add
  RDMA/qedr: Fix and simplify memory leak in PD alloc
  RDMA/qedr: Fix RDMA CM loopback
  RDMA/qedr: Fix formatting
  RDMA/qedr: Mark three functions as static
  RDMA/qedr: Don't reset QP when queues aren't flushed
  RDMA/qedr: Don't spam dmesg if QP is in error state
  RDMA/qedr: Remove CQ spinlock from CM completion handlers
  RDMA/qedr: Return max inline data in QP query result
  RDMA/qedr: Return success when not changing QP state
  RDMA/qedr: Add uapi header qedr-abi.h
  RDMA/qedr: Fix MTU returned from QP query
  RDMA/core: Add the function ib_mtu_int_to_enum
  IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path
  IB/vmw_pvrdma: Don't leak info from alloc_ucontext
  IB/cxgb3: fix misspelling in header guard
  ...