public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ashish Mhetre <amhetre@nvidia.com>
To: <krzk@kernel.org>, <thierry.reding@kernel.org>, <jonathanh@nvidia.com>
Cc: <ketanp@nvidia.com>, <linux-kernel@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, Ashish Mhetre <amhetre@nvidia.com>
Subject: [PATCH V2 0/2] memory: tegra: Restore MC state on system resume
Date: Thu, 30 Apr 2026 07:09:52 +0000	[thread overview]
Message-ID: <20260430070954.1005564-1-amhetre@nvidia.com> (raw)

The tegra-mc platform driver does not register any dev_pm_ops, so the
SoC-specific ->resume() is never invoked (e.g. tegra186_mc_resume) on
system wake. On Tegra186 and later this means MC client Stream-ID
override registers are not reprogrammed.

Register a dev_pm_ops on the tegra-mc driver and route the system
resume callback into mc->soc->ops->resume() so the existing SID
restore path runs again on wake.

The MC interrupt mask registers also lose state across SC7, so
re-apply them on resume. Factor the existing intmask programming
out of tegra_mc_probe() into tegra_mc_setup_intmask() and reuse it
from both probe and resume to avoid duplicating the loop.

No suspend callback is needed as the resume path reprograms all MC
state from the static SoC tables, so there is nothing to save.

Changes in V2:
- Split the original single patch into two - register the PM ops and
  reprogram the MC interrupt masks on resume.

Ashish Mhetre (2):
  memory: tegra: Wire up system sleep PM ops
  memory: tegra: Restore MC interrupt masks on resume

 drivers/memory/tegra/mc.c | 41 ++++++++++++++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 7 deletions(-)

-- 
2.50.1


             reply	other threads:[~2026-04-30  7:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30  7:09 Ashish Mhetre [this message]
2026-04-30  7:09 ` [PATCH V2 1/2] memory: tegra: Wire up system sleep PM ops Ashish Mhetre
2026-04-30  8:39   ` Jon Hunter
2026-04-30  9:39     ` Ashish Mhetre
2026-04-30  7:09 ` [PATCH V2 2/2] memory: tegra: Restore MC interrupt masks on resume Ashish Mhetre

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=20260430070954.1005564-1-amhetre@nvidia.com \
    --to=amhetre@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=ketanp@nvidia.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@kernel.org \
    /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