From: Sumit Gupta <sumitg@nvidia.com>
To: <treding@nvidia.com>, <jonathanh@nvidia.com>,
<krzysztof.kozlowski@linaro.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <bbasu@nvidia.com>, <sumitg@nvidia.com>
Subject: [Patch v2 0/2] Fix hang due to CPU BW request as BPMP suspended
Date: Mon, 9 Oct 2023 15:35:55 +0530 [thread overview]
Message-ID: <20231009100557.18224-1-sumitg@nvidia.com> (raw)
This patch set fixes hang during system resume which started coming
after adding Memory Interconnect and OPP support to the Tegra194 CPUFREQ
in below change:
f41e1442ac5b ("cpufreq: tegra194: add OPP support and set bandwidth").
Tegra194 CPUFREQ driver uses 'CPUFREQ_NEED_INITIAL_FREQ_CHECK' flag
which causes a CPU frequency set request from the 'cpuhp_cpufreq_online'
hotplug notifier during resume. The CPU frequency set call also triggers
a DRAM bandwidth set request but the BPMP driver hasn't resumed yet
which results in hang during resume.
Fix this by resetting the BPMP IPC channels inside tegra_bpmp_transfer*()
API if the bandwidth request came from CPU clusters and the BPMP driver
is still suspended.
---
v[1] -> v2:
- add suspend hook instead of reset hook based approach.
- add suspended instead of needs_reset flag in 'struct tegra_bpmp'.
- add flags field to 'struct tegra_bpmp_message'.
- set TEGRA_BPMP_MESSAGE_RESET flag from MC driver for CPU BW request.
- use suspended and flags to reset BPMP IPC early on resume.
Sumit Gupta (1):
firmware: tegra: add suspend hook and reset BPMP IPC early on resume
Thierry Reding (1):
memory: tegra: set BPMP msg flags to reset IPC channels
drivers/firmware/tegra/bpmp.c | 30 ++++++++++++++++++++++++++++++
drivers/memory/tegra/tegra234.c | 4 ++++
include/soc/tegra/bpmp.h | 6 ++++++
3 files changed, 40 insertions(+)
[1] https://lore.kernel.org/linux-tegra/20230830115829.23977-1-sumitg@nvidia.com/
--
2.17.1
next reply other threads:[~2023-10-09 10:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 10:05 Sumit Gupta [this message]
2023-10-09 10:05 ` [Patch v2 1/2] firmware: tegra: add suspend hook and reset BPMP IPC early on resume Sumit Gupta
2023-10-12 11:01 ` Thierry Reding
2023-10-09 10:05 ` [Patch v2 2/2] memory: tegra: set BPMP msg flags to reset IPC channels Sumit Gupta
2023-10-12 11:00 ` Thierry Reding
2023-10-12 13:32 ` Krzysztof Kozlowski
2023-10-12 13:28 ` Krzysztof Kozlowski
2023-10-13 12:25 ` (subset) [Patch v2 0/2] Fix hang due to CPU BW request as BPMP suspended Thierry Reding
2023-10-13 12:36 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231009100557.18224-1-sumitg@nvidia.com \
--to=sumitg@nvidia.com \
--cc=bbasu@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox