* [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks
@ 2021-02-02 6:27 Srinivasa Rao Mandadapu
2021-02-02 15:34 ` Mark Brown
2021-02-02 17:13 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Srinivasa Rao Mandadapu @ 2021-02-02 6:27 UTC (permalink / raw)
To: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, plai,
bgoswami, perex, tiwai, srinivas.kandagatla, rohitkr,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd
Cc: Srinivasa Rao Mandadapu
Had a typo in lpass platform driver that resulted in crash
during suspend/resume with an HDMI dongle connected.
The regmap read/write/volatile regesters validation callbacks in lpass-cpu
were using MI2S rdma_channels count instead of hdmi_rdma_channels.
This typo error causing to read registers from the regmap beyond the length
of the mapping created by ioremap().
This fix avoids the need for reducing number hdmi_rdma_channels,
which is done in
commit 7dfe20ee92f6 ("ASoC: qcom: Fix number of HDMI RDMA channels on sc7180").
So reverting the same.
Fixes: 7cb37b7bd0d3c ("ASoC: qcom: Add support for lpass hdmi driver")
Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
---
sound/soc/qcom/lpass-cpu.c | 8 ++++----
sound/soc/qcom/lpass-sc7180.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index a669202e0001..c642e5f8f28c 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -595,7 +595,7 @@ static bool lpass_hdmi_regmap_writeable(struct device *dev, unsigned int reg)
return true;
}
- for (i = 0; i < v->rdma_channels; ++i) {
+ for (i = 0; i < v->hdmi_rdma_channels; ++i) {
if (reg == LPAIF_HDMI_RDMACTL_REG(v, i))
return true;
if (reg == LPAIF_HDMI_RDMABASE_REG(v, i))
@@ -641,7 +641,7 @@ static bool lpass_hdmi_regmap_readable(struct device *dev, unsigned int reg)
if (reg == LPASS_HDMITX_APP_IRQSTAT_REG(v))
return true;
- for (i = 0; i < v->rdma_channels; ++i) {
+ for (i = 0; i < v->hdmi_rdma_channels; ++i) {
if (reg == LPAIF_HDMI_RDMACTL_REG(v, i))
return true;
if (reg == LPAIF_HDMI_RDMABASE_REG(v, i))
@@ -668,7 +668,7 @@ static bool lpass_hdmi_regmap_volatile(struct device *dev, unsigned int reg)
if (reg == LPASS_HDMI_TX_LEGACY_ADDR(v))
return true;
- for (i = 0; i < v->rdma_channels; ++i) {
+ for (i = 0; i < v->hdmi_rdma_channels; ++i) {
if (reg == LPAIF_HDMI_RDMACURR_REG(v, i))
return true;
}
@@ -812,7 +812,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
return PTR_ERR(drvdata->hdmiif);
lpass_hdmi_regmap_config.max_register = LPAIF_HDMI_RDMAPER_REG(variant,
- variant->hdmi_rdma_channels);
+ variant->hdmi_rdma_channels - 1);
drvdata->hdmiif_map = devm_regmap_init_mmio(dev, drvdata->hdmiif,
&lpass_hdmi_regmap_config);
if (IS_ERR(drvdata->hdmiif_map)) {
diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c
index 735c9dac28f2..8c168d3c589e 100644
--- a/sound/soc/qcom/lpass-sc7180.c
+++ b/sound/soc/qcom/lpass-sc7180.c
@@ -171,7 +171,7 @@ static struct lpass_variant sc7180_data = {
.rdma_channels = 5,
.hdmi_rdma_reg_base = 0x64000,
.hdmi_rdma_reg_stride = 0x1000,
- .hdmi_rdma_channels = 3,
+ .hdmi_rdma_channels = 4,
.dmactl_audif_start = 1,
.wrdma_reg_base = 0x18000,
.wrdma_reg_stride = 0x1000,
--
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks
2021-02-02 6:27 [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks Srinivasa Rao Mandadapu
@ 2021-02-02 15:34 ` Mark Brown
2021-02-02 17:13 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-02-02 15:34 UTC (permalink / raw)
To: devicetree, perex, alsa-devel, agross, Srinivasa Rao Mandadapu,
robh+dt, rohitkr, linux-arm-msm, lgirdwood, linux-kernel,
bjorn.andersson, bgoswami, swboyd, plai, srinivas.kandagatla,
tiwai
On Tue, 2 Feb 2021 11:57:27 +0530, Srinivasa Rao Mandadapu wrote:
> Had a typo in lpass platform driver that resulted in crash
> during suspend/resume with an HDMI dongle connected.
>
> The regmap read/write/volatile regesters validation callbacks in lpass-cpu
> were using MI2S rdma_channels count instead of hdmi_rdma_channels.
>
> This typo error causing to read registers from the regmap beyond the length
> of the mapping created by ioremap().
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: qcom: Fix typo error in HDMI regmap config callbacks
commit: 6c9123068815ed0bc1e8fa5a5029eef5ee3866c3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks
2021-02-02 6:27 [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks Srinivasa Rao Mandadapu
2021-02-02 15:34 ` Mark Brown
@ 2021-02-02 17:13 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2021-02-02 17:13 UTC (permalink / raw)
To: Srinivasa Rao Mandadapu, agross, alsa-devel, bgoswami,
bjorn.andersson, broonie, devicetree, lgirdwood, linux-arm-msm,
linux-kernel, perex, plai, robh+dt, rohitkr, srinivas.kandagatla,
tiwai
Cc: Srinivasa Rao Mandadapu
Quoting Srinivasa Rao Mandadapu (2021-02-01 22:27:27)
> Had a typo in lpass platform driver that resulted in crash
> during suspend/resume with an HDMI dongle connected.
>
> The regmap read/write/volatile regesters validation callbacks in lpass-cpu
> were using MI2S rdma_channels count instead of hdmi_rdma_channels.
>
> This typo error causing to read registers from the regmap beyond the length
> of the mapping created by ioremap().
>
> This fix avoids the need for reducing number hdmi_rdma_channels,
> which is done in
> commit 7dfe20ee92f6 ("ASoC: qcom: Fix number of HDMI RDMA channels on sc7180").
> So reverting the same.
>
> Fixes: 7cb37b7bd0d3c ("ASoC: qcom: Add support for lpass hdmi driver")
>
> Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-02 17:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02 6:27 [PATCH] ASoC: qcom: Fix typo error in HDMI regmap config callbacks Srinivasa Rao Mandadapu
2021-02-02 15:34 ` Mark Brown
2021-02-02 17:13 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox