linux-stable/sound/soc/qcom
Stephen Boyd a22b213139 ASoC: qcom: Actually clear DMA interrupt register for HDMI
commit c8d251f51e upstream.

In commit da0363f7bf ("ASoC: qcom: Fix for DMA interrupt clear reg
overwriting") we changed regmap_write() to regmap_update_bits() so that
we can avoid overwriting bits that we didn't intend to modify.
Unfortunately this change breaks the case where a register is writable
but not readable, which is exactly how the HDMI irq clear register is
designed (grep around LPASS_HDMITX_APP_IRQCLEAR_REG to see how it's
write only). That's because regmap_update_bits() tries to read the
register from the hardware and if it isn't readable it looks in the
regmap cache to see what was written there last time to compare against
what we want to write there. Eventually, we're unable to modify this
register at all because the bits that we're trying to set are already
set in the cache.

This is doubly bad for the irq clear register because you have to write
the bit to clear an interrupt. Given the irq is level triggered, we see
an interrupt storm upon plugging in an HDMI cable and starting audio
playback. The irq storm is so great that performance degrades
significantly, leading to CPU soft lockups.

Fix it by using regmap_write_bits() so that we really do write the bits
in the clear register that we want to. This brings the number of irqs
handled by lpass_dma_interrupt_handler() down from ~150k/sec to ~10/sec.

Fixes: da0363f7bf ("ASoC: qcom: Fix for DMA interrupt clear reg overwriting")
Cc: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20220209232520.4017634-1-swboyd@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-23 12:03:15 +01:00
..
qdsp6 ASoC: qdsp6: q6routing: Fix return value from msm_routing_put_audio_mixer 2021-12-14 10:57:16 +01:00
apq8016_sbc.c ASoC: qcom: apq8016_sbc: Add SEC_MI2S support 2021-08-09 12:39:26 +01:00
apq8096.c ASoC: qcom: Set card->owner to avoid warnings 2020-08-21 16:12:10 +01:00
common.c ASoC: qcom: common: Fix refcounting in qcom_snd_parse_of() 2020-11-10 17:28:25 +00:00
common.h ASoC: qcom: remove unused header files from common.h 2018-08-06 12:50:07 +01:00
Kconfig ASoC: qcom: fix QDSP6 dependencies, attempt #3 2020-12-04 23:26:37 +00:00
lpass-apq8016.c ASoC: qcom: lpass: Fix i2s ctl register bit map 2021-02-05 17:16:40 +00:00
lpass-cpu.c ASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable 2021-06-24 19:29:53 +01:00
lpass-hdmi.c ASoC: qcom: lpass-hdmi: remove useless return 2021-03-10 13:01:49 +00:00
lpass-hdmi.h ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-ipq806x.c ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field 2021-01-20 16:46:47 +00:00
lpass-lpaif-reg.h ASoC: qcom: lpass-cpu: Remove bit clock state check 2021-01-28 17:11:30 +00:00
lpass-platform.c ASoC: qcom: Actually clear DMA interrupt register for HDMI 2022-02-23 12:03:15 +01:00
lpass-sc7180.c ASoC: qcom: Add four speaker support on MI2S secondary 2021-06-14 15:01:05 +01:00
lpass.h Merge series "ASoC: tlv320aic32x4: Add support for TAS2505" from Claudius Heine <ch@denx.de>: 2021-06-23 16:31:14 +01:00
Makefile ASoC: qcom: sc7180: Add machine driver for sound card registration 2020-10-27 14:05:46 +00:00
sc7180.c ASoC: qcom: sc7180: fix 32 bit format for adau7002 2020-11-27 14:50:17 +00:00
sdm845.c ASoC: qcom: sdm845: add jack support for WCD934x 2021-06-04 15:29:02 +01:00
sm8250.c ASoC: qcom: sm8250: fix HDMI audio playback 2020-11-20 16:08:38 +00:00
storm.c ASoC: qcom: Set card->owner to avoid warnings 2020-08-21 16:12:10 +01:00