]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ASoC: rsnd: don't call clk_get_rate() under atomic context
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 6 Aug 2019 03:45:38 +0000 (12:45 +0900)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:22 +0000 (11:55 +0200)
commitfc7887398c05de4c39ed4a659dbf91a95a6d8e6b
tree855040a9bbe487e67d909afc65ef48c75a4a7496
parent689918f627414cfb7fc528f5e7094eac07b2be79
ASoC: rsnd: don't call clk_get_rate() under atomic context

BugLink: https://bugs.launchpad.net/bugs/1847155
[ Upstream commit 06e8f5c842f2dbb232897ba967ea7b422745c271 ]

ADG is using clk_get_rate() under atomic context, thus, we might
have scheduling issue.
To avoid this issue, we need to get/keep clk rate under
non atomic context.

We need to handle ADG as special device at Renesas Sound driver.
From SW point of view, we want to impletent it as
rsnd_mod_ops :: prepare, but it makes code just complicate.

To avoid complicated code/patch, this patch adds new clk_rate[] array,
and keep clk IN rate when rsnd_adg_clk_enable() was called.

Reported-by: Leon Kong <Leon.KONG@cn.bosch.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Leon Kong <Leon.KONG@cn.bosch.com>
Link: https://lore.kernel.org/r/87v9vb0xkp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
sound/soc/sh/rcar/adg.c