Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/2] Add CPU idle state control for accurate vblank timing
@ 2026-05-20  6:46 Jason-JH Lin
  2026-05-20  6:46 ` [PATCH i-g-t 1/2] lib/igt_kms: Add igt_disable_cpu_deep_sleep() to control CPU C-states Jason-JH Lin
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Jason-JH Lin @ 2026-05-20  6:46 UTC (permalink / raw)
  To: igt-dev, Karthik B S, Swati Sharma, Kamil Konieczny,
	Ville Syrjala, Fei Shao
  Cc: Jani, Jason-JH Lin, Paul-PL Chen, Nancy Lin, Singo Chang,
	Manasi Navare, Gil Dekel, Yacoub,
	Project_Global_Chrome_Upstream_Group

This series adds IGT API to control CPU idle states to prevent timing
issues in vblank-sensitive tests.

Problem:
Deep CPU idle states (C2+) cause CPU wakeup latency ~150us that affects
vblank timestamp acquisition in DRM framework after vblank IRQ.
This latency causes timing inaccuracies in tests like kms_setmode that
depend on precise vblank timestamps.

Solution:
Add igt_disable_cpu_deep_sleep() API that directly controls CPU idle
states via sysfs (/sys/devices/system/cpu/cpu*/cpuidle/state*/disable).
The API disables state1+ (C2+) while keeping state0 (WFI/C1) enabled.

---

Jason-JH Lin (2):
  lib/igt_kms: Add igt_disable_cpu_deep_sleep() to control CPU C-states
  tests/kms_setmode: Disable CPU deep sleep for accurate vblank
    timestamps

 lib/igt_kms.c       | 66 +++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_kms.h       |  1 +
 tests/kms_setmode.c |  6 +++++
 3 files changed, 73 insertions(+)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-29  3:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-20  6:46 [PATCH i-g-t 0/2] Add CPU idle state control for accurate vblank timing Jason-JH Lin
2026-05-20  6:46 ` [PATCH i-g-t 1/2] lib/igt_kms: Add igt_disable_cpu_deep_sleep() to control CPU C-states Jason-JH Lin
2026-05-20  9:48   ` Kamil Konieczny
2026-05-20 10:17     ` Jason-JH Lin (林睿祥)
2026-05-20 16:55       ` Kamil Konieczny
2026-05-21  3:04         ` Jason-JH Lin (林睿祥)
2026-05-20  6:46 ` [PATCH i-g-t 2/2] tests/kms_setmode: Disable CPU deep sleep for accurate vblank timestamps Jason-JH Lin
2026-05-20  9:45   ` Kamil Konieczny
2026-05-20 10:05     ` Jason-JH Lin (林睿祥)
2026-05-20 13:50   ` Ville Syrjälä
2026-05-21  3:01     ` Jason-JH Lin (林睿祥)
2026-05-21 10:39       ` Ville Syrjälä
2026-05-22  2:59         ` Jason-JH Lin (林睿祥)
2026-05-22  5:27           ` Jason-JH Lin (林睿祥)
2026-05-22 18:14           ` Ville Syrjälä
2026-05-23  6:01             ` Jason-JH Lin (林睿祥)
2026-05-25 13:07               ` Mark Yacoub
2026-05-27 15:49                 ` Jason-JH Lin (林睿祥)
2026-05-27 17:58                   ` Ville Syrjälä
2026-05-29  3:03                     ` Jason-JH Lin (林睿祥)
2026-05-20  7:17 ` ✓ Xe.CI.BAT: success for Add CPU idle state control for accurate vblank timing Patchwork
2026-05-20  7:35 ` ✓ i915.CI.BAT: " Patchwork
2026-05-20 14:38 ` ✓ Xe.CI.FULL: " Patchwork
2026-05-21  9:26 ` ✓ i915.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