From: sashiko-bot@kernel.org
To: "Vinay Belgaumkar" <vinay.belgaumkar@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v6] drm/xe: Poll GT for C6 before D3
Date: Wed, 16 Sep 2026 19:24:02 +0000 [thread overview]
Message-ID: <20260916192403.50EEE1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916190614.3047807-1-vinay.belgaumkar@intel.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] drm/xe: C6 poll after xe_pm_runtime_suspend() always fails breaking D3
- [Medium] pm: device stuck in RPM_ACTIVE when C6 check fails
--
commit d48ea91e20a44679b212e2b189bddfe7fa5220c9
Author: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
drm/xe: Poll GT for C6 before D3
This commit ensures the GT is in C6 before transitioning to D3 during
runtime suspend, avoiding scenarios where GT is accessed after D3 is
programmed. It aborts the suspend by returning an error if the GT
fails to enter C6.
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 00b2b5dfb8f6c..d66d5a0339ae3 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
[ ... ]
> @@ -1394,6 +1394,17 @@ static int xe_pci_runtime_suspend(struct device *dev)
> if (err)
> return err;
>
> + err = xe_pm_wait_all_c6(xe);
[Severity: High]
Since this check happens after xe_pm_runtime_suspend(), which already
called xe_gt_suspend() and explicitly disabled power gating (RC6), isn't
this guaranteed to fail and cause 200ms timeouts on every suspend attempt?
When the system attempts to enter D3cold runtime suspend, GuC is already
reset and power gating is disabled by the time we reach this check, so
the GT cannot enter C6 autonomously.
> + if (err) {
> + drm_dbg(&xe->drm, "Resuming - GT C6 check failed!");
> + ret = xe_pm_runtime_resume(xe);
> + if (ret) {
> + drm_err(&xe->drm, "Resume failed after suspend was canceled");
> + return ret;
> + }
> + return err;
[Severity: Medium]
When we return -EAGAIN to the PM core here to abort the suspend, shouldn't
we first update the last_busy timestamp by calling
pm_runtime_mark_last_busy(dev)?
Without it, the PM core's rpm_suspend() handles -EAGAIN by aborting suspend
but only re-arms the autosuspend timer if last_busy was updated. This causes
the autosuspend expiration time to evaluate to the past, preventing the timer
from being re-armed and leaving the device awake indefinitely in RPM_ACTIVE
until another explicit PM cycle occurs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916190614.3047807-1-vinay.belgaumkar@intel.com?part=1
next prev parent reply other threads:[~2026-09-16 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 19:06 [PATCH v6] drm/xe: Poll GT for C6 before D3 Vinay Belgaumkar
2026-09-16 19:24 ` sashiko-bot [this message]
2026-09-16 21:03 ` Belgaumkar, Vinay
2026-09-18 15:47 ` Rodrigo Vivi
-- strict thread matches above, loose matches on Subject: below --
2026-09-16 20:59 Vinay Belgaumkar
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=20260916192403.50EEE1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vinay.belgaumkar@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