From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Tauro, Riana" <riana.tauro@intel.com>,
"Vijay, Anoop C" <anoop.c.vijay@intel.com>
Subject: Re: [PATCH 3/3] drm/xe/sysctrl: Restore the SoC remapper on every runtime resume
Date: Wed, 18 Nov 2026 22:05:01 +0000 [thread overview]
Message-ID: <2b32ebc993e57ef80eeb408c87a7aab5eb201468.camel@intel.com> (raw)
In-Reply-To: <avTIHy8y9T3jcMnJ@intel.com>
On Wed, 2026-11-11 at 14:55 -0500, Rodrigo Vivi wrote:
> 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...
Ok yeah in the debug I'm doing, I'm sending something down to the GFSP
to write a register for me. That register write wasn't taking effect
and I was thinking that was related to this not being provisioned
correctly on a d3cold... After debug it seems like there was a missing
forcewake though so I'm not sure this is strictly required. It does
seem safer though if we need that kind of communication.
I guess I'd prefer to keep this in, although maybe the commit message
could be reworded/dropped? From what you're saying it sounds like if we
want to do this we might want to just rework this whole flow to never
make any assumptions about d3hot/d3cold. I'd prefer to keep this a
little isolated if possible though.
Let me know what you think.
Thanks,
Stuart
>
> >
> > 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-18 22:05 UTC|newest]
Thread overview: 15+ 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-18 21:59 ` Summers, Stuart
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
2026-11-18 22:05 ` Summers, Stuart [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=2b32ebc993e57ef80eeb408c87a7aab5eb201468.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=anoop.c.vijay@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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