From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Stuart Summers <stuart.summers@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <riana.tauro@intel.com>,
<anoop.c.vijay@intel.com>
Subject: Re: [PATCH 3/3] drm/xe/sysctrl: Restore the SoC remapper on every runtime resume
Date: Wed, 11 Nov 2026 14:55:11 -0500 [thread overview]
Message-ID: <avTIHy8y9T3jcMnJ@intel.com> (raw)
In-Reply-To: <20261104215353.234314-8-stuart.summers@intel.com>
On Wed, Nov 04, 2026 at 09:53:56PM +0000, Stuart Summers wrote:
> The SoC remapper configuration is lost whenever the device loses power,
> and @d3cold.allowed only records the state xe asked the PCI core for.
> The platform can still drop power behind our back when the bridge above
> us runtime suspends, which leaves the remapper unprogrammed and any
> later System Controller access pointed at nothing.
>
> Restore it on every runtime resume instead.
>
> Fixes: 02eca6edcb32 ("drm/xe/xe_sysctrl: Add System Controller power management support")
> Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pm.c | 9 +++++++--
> drivers/gpu/drm/xe/xe_sysctrl.c | 6 ++++--
> 2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index f483b565d323..e9bebc2ff29d 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -718,8 +718,13 @@ int xe_pm_runtime_resume(struct xe_device *xe)
>
> xe_i2c_pm_resume(xe, xe->d3cold.allowed);
>
> - if (xe->d3cold.allowed)
> - xe_sysctrl_pm_resume(xe);
> + /*
> + * Done unconditionally: @d3cold.allowed is only the state xe asked the
> + * PCI core for, the platform can still drop power when the bridge
> + * above us runtime suspends, taking the SoC remapper configuration
> + * with it.
> + */
> + xe_sysctrl_pm_resume(xe);
That is really awkward... if we lose power on d3hot we would have a lot
more trouble than this remapper...
You are right that d3cold allowed is we allowing for d3cold, but the
final decision is not ours... but if we don't allow d3cold and go to
runtime suspend, it means we are allowing only d3hot. And the only difference
of d3cold and d3hot is that main vcc is off in d3cold... but always on on
d3hot... So, something is off in here...
>
> xe_display_pm_runtime_resume_early(xe);
>
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl.c b/drivers/gpu/drm/xe/xe_sysctrl.c
> index 27a59e8e4487..a3fff95d16ea 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl.c
> +++ b/drivers/gpu/drm/xe/xe_sysctrl.c
> @@ -129,8 +129,10 @@ void xe_sysctrl_irq_handler(struct xe_device *xe, u32 master_ctl)
> * xe_sysctrl_pm_resume() - System Controller resume handler
> * @xe: xe device instance
> *
> - * Invoked during system resume (S3/S4 to S0) and runtime resume from D3cold.
> - * Restores SoC remapper configuration.
> + * Invoked during system resume (S3/S4 to S0) and on every runtime resume.
> + * Restores SoC remapper configuration, which is lost whenever the device
> + * loses power - including when the platform drops power behind our back
> + * because the bridge above us runtime suspended.
> */
> void xe_sysctrl_pm_resume(struct xe_device *xe)
> {
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-11-11 19:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 21:53 [PATCH 0/3] Add a few sysctrl refactors in preparation for Stuart Summers
2026-11-04 21:53 ` [PATCH 1/3] drm/xe/sysctrl: Use preallocated mailbox staging buffers Stuart Summers
2026-11-11 19:56 ` Rodrigo Vivi
2026-11-04 21:53 ` [PATCH 2/3] drm/xe: Process device OOB workarounds during early info init Stuart Summers
2026-11-11 19:57 ` Rodrigo Vivi
2026-11-04 21:53 ` [PATCH 3/3] drm/xe/sysctrl: Restore the SoC remapper on every runtime resume Stuart Summers
2026-11-11 19:55 ` Rodrigo Vivi [this message]
2026-11-04 21:55 ` [PATCH 0/3] Add a few sysctrl refactors in preparation for Summers, Stuart
2026-11-04 22:40 ` ✓ CI.KUnit: success for " Patchwork
2026-11-04 23:13 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-05 6:30 ` ✓ CI.KUnit: success for Add a few sysctrl refactors in preparation for (rev2) Patchwork
2026-11-05 7:09 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-06 0:38 ` ✓ Xe.CI.FULL: " Patchwork
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=avTIHy8y9T3jcMnJ@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--cc=stuart.summers@intel.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