Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/7] Validate PM_PME signalling on display hotplug
@ 2026-10-09  5:26 Pranay Samala
  2026-10-09  5:26 ` [PATCH i-g-t v2 1/7] lib/igt_pci: Add PCI Power Management capability register layout Pranay Samala
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Pranay Samala @ 2026-10-09  5:26 UTC (permalink / raw)
  To: igt-dev; +Cc: kunal1.joshi, sameer.lattannavar, pranay.samala

A display hotplug can be signalled as a PCI PME while the graphics device
is runtime suspended in D3hot. That lets the driver leave the
drm_kms_helper connector poll worker disabled across runtime suspend, so
the device stays parked instead of being resumed every ~10s just to probe
connectors.

The property worth validating is therefore not "does a hotplug still
work" - the polling fallback delivers that too, just slowly and at the
cost of the power saving. It is "does the hotplug work while polling
stays off". A test that only toggles HPD and waits for a uevent passes
either way, and would not notice the feature regressing into the
fallback.

So the new subtest runs two phases against the same suspended device:

  Phase 1: hold the device idle in D3hot for 25s and check from PCI
           config space that it never leaves D3hot. This is the power
           saving.
  Phase 2: toggle HPD from D3hot and check that a uevent arrives, that
           the connector status updated, and that
           power/wakeup_active_count incremented - i.e. that the resume
           was signalled by the device and not initiated by the host.

Patches 1-2 add the PCI Power Management capability register layout and
accessors for PME_Support, PME_En, PME_Status and the PowerState field.
PME_Status distinguishes a device that signalled but was never
acknowledged from one that never signalled at all, which makes a failure
report actionable instead of just "no uevent".

Patches 3-5 add the power/wakeup and power/wakeup_active_count
accessors, with patch 3 factoring out the path construction they share.
active_count is used rather than wakeup_count because the latter never
moves for a runtime resume.

Patch 6 adds igt_pm_kms_poll_save(), _set() and _restore(). The two
tests that already open code this are converted in a separate series
that depends on this one, since one of them also has a pre-existing
restore-without-save bug unrelated to PME.

Patch 7 adds the subtest.

v2:
- Rebase

Pranay Samala (7):
  lib/igt_pci: Add PCI Power Management capability register layout
  lib/igt_pm: Add PCI PME capability and D state accessors
  lib/igt_pm: Factor out power attribute path construction
  lib/igt_pm: Add power/wakeup accessors
  lib/igt_pm: Add power/wakeup_active_count accessor
  lib/igt_pm: Add drm_kms_helper.poll save/restore helpers
  tests/chamelium/kms_chamelium_hpd: Add HPD from runtime suspended
    D3hot

 lib/igt_pci.h                       |  12 +
 lib/igt_pm.c                        | 457 +++++++++++++++++++++++++++-
 lib/igt_pm.h                        |  12 +
 tests/chamelium/kms_chamelium_hpd.c | 344 +++++++++++++++++++++
 4 files changed, 816 insertions(+), 9 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-10-14 10:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  5:26 [PATCH i-g-t v2 0/7] Validate PM_PME signalling on display hotplug Pranay Samala
2026-10-09  5:26 ` [PATCH i-g-t v2 1/7] lib/igt_pci: Add PCI Power Management capability register layout Pranay Samala
2026-10-09  5:28   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 2/7] lib/igt_pm: Add PCI PME capability and D state accessors Pranay Samala
2026-10-09  5:46   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 3/7] lib/igt_pm: Factor out power attribute path construction Pranay Samala
2026-10-09  5:47   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 4/7] lib/igt_pm: Add power/wakeup accessors Pranay Samala
2026-10-09  6:02   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 5/7] lib/igt_pm: Add power/wakeup_active_count accessor Pranay Samala
2026-10-09  6:05   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 6/7] lib/igt_pm: Add drm_kms_helper.poll save/restore helpers Pranay Samala
2026-10-14 10:44   ` Joshi, Kunal1
2026-10-09  5:26 ` [PATCH i-g-t v2 7/7] tests/chamelium/kms_chamelium_hpd: Add HPD from runtime suspended D3hot Pranay Samala
2026-10-09  6:21   ` Joshi, Kunal1
2026-10-09  6:54 ` ✓ Xe.CI.BAT: success for Validate PM_PME signalling on display hotplug (rev3) Patchwork
2026-10-09  7:18 ` ✗ i915.CI.BAT: failure " Patchwork
2026-10-09  8:39 ` ✗ Xe.CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox