Validate PM_PME signalling on display hotplug
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest7 patches 5 repliesIn review
- v27 patches 7 repliesSuperseded
- v17 patches 1 replySuperseded
Changes in v3 from the cover letter
- 2/7: check power_state before touching config space, report D3cold from it, return errors from PME_En/PME_Status reads, generic kerneldoc (Kunal)
- 4/7: drop the xe note, document the counter reset on enable (Kunal)
- 5/7: mention the PME poll route, return -1 when there is no wakeup source (Kunal)
- 6/7: move to igt_kms and rename, document that setting the parameter does not restart a stopped poll worker (Kunal)
- 7/7: decide D3hot once, settle before baselines, watch the idle window once, add the control run, fix the uevent/latency race, check requirements before changing state and restore it on failure, misc cleanups (Kunal)
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | lib/igt_pci: Add PCI Power Management capability register layoutlib/ | +12 | 0 replies | |
| 2/7 | lib/igt_pm: Add PCI PME capability and D state accessorslib/ lib/ | +238 | 1 reply | |
| 3/7 | lib/igt_pm: Factor out power attribute path constructionlib/ | +15 | 0 replies | |
| 4/7 | lib/igt_pm: Add power/wakeup accessorslib/ lib/ | +143 | 1 reply | |
| 5/7 | lib/igt_pm: Add power/wakeup_active_count accessorlib/ lib/ | +54 | 1 reply | |
| 6/7 | lib/igt_kms: Add drm_kms_helper.poll save/restore helperslib/ lib/ | +104 | 1 reply | |
| 7/7 | tests/chamelium/kms_chamelium_hpd: Add HPD from runtime suspended D3hottests/ | +528 | 1 reply |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Kunal Joshi |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | R-b |
| 5/7 | R-b |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH i-g-t v3 0/7] Validate PM_PME signalling on display hotplug
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 against the same suspended device in three steps:
Control: suspend with power/wakeup disabled, so PME is not armed, and
check the device is woken by the poll within two periods. This proves polling is live on the setup and that the test catches a poll wake, and measures what one costs.
Phase 1: arm PME, hold the device idle in D3hot for 25s and check it
never wakes.
Phase 2: plug and then unplug from D3hot and check that each produces
a uevent, 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_kms_poll_save(), _set() and _restore() to igt_kms. Converting the two tests that already open code this is left to a separate series.
Patch 7 adds the subtest.
v2:
- Rebase
v3:
- 2/7: check power_state before touching config space, report D3cold from it, return errors from PME_En/PME_Status reads, generic kerneldoc (Kunal)
- 4/7: drop the xe note, document the counter reset on enable (Kunal)
- 5/7: mention the PME poll route, return -1 when there is no wakeup source (Kunal)
- 6/7: move to igt_kms and rename, document that setting the parameter does not restart a stopped poll worker (Kunal)
- 7/7: decide D3hot once, settle before baselines, watch the idle window once, add the control run, fix the uevent/latency race, check requirements before changing state and restore it on failure, misc cleanups (Kunal)
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_kms: Add drm_kms_helper.poll save/restore helpers tests/chamelium/kms_chamelium_hpd: Add HPD from runtime suspended
D3hot
lib/igt_kms.c | 101 ++++++ lib/igt_kms.h | 3 + lib/igt_pci.h | 12 + lib/igt_pm.c | 450 +++++++++++++++++++++++- lib/igt_pm.h | 9 + tests/chamelium/kms_chamelium_hpd.c | 528 ++++++++++++++++++++++++++++ 6 files changed, 1094 insertions(+), 9 deletions(-)
Signature · 1 line
2.53.0