From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jason-JH Lin <jason-jh.lin@mediatek.com>
Cc: igt-dev@lists.freedesktop.org,
Karthik B S <karthik.b.s@intel.com>,
Swati Sharma <swati2.sharma@intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Fei Shao <fshao@chromium.org>, Jani <jani.nikula@intel.com>,
Paul-PL Chen <paul-pl.chen@mediatek.com>,
Nancy Lin <nancy.lin@mediatek.com>,
Singo Chang <singo.chang@mediatek.com>,
Manasi Navare <navaremanasi@google.com>,
Gil Dekel <gildekel@google.com>, Yacoub <markyacoub@chromium.org>,
Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH i-g-t 2/2] tests/kms_setmode: Disable CPU deep sleep for accurate vblank timestamps
Date: Wed, 20 May 2026 16:50:13 +0300 [thread overview]
Message-ID: <ag28FVTooBC6Yly3@intel.com> (raw)
In-Reply-To: <20260520064651.3266598-3-jason-jh.lin@mediatek.com>
On Wed, May 20, 2026 at 02:46:26PM +0800, Jason-JH Lin wrote:
> Use igt_disable_cpu_deep_sleep() to prevent CPU wakeup latency that
> affects vblank timestamp acquisition.
>
> This addresses vblank timing stability issues on MediaTek platforms
> where CPU entering idle states can cause ~200us timestamp jitter and
> test failures.
Can't you fix the kernel to generate accurate timestamps?
>
> Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
> ---
> tests/kms_setmode.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
> index 1f2849bc26cf..40e79ab95ae7 100644
> --- a/tests/kms_setmode.c
> +++ b/tests/kms_setmode.c
> @@ -1060,6 +1060,9 @@ int igt_main_args("det:", NULL, help_str, opt_handler, NULL)
> igt_require(drm_resources);
>
> max_dotclock = igt_get_max_dotclock(drm_fd);
> +
> + /* Disable CPU deep sleep to ensure stable vblank timing */
> + igt_disable_cpu_deep_sleep(drm_fd, true);
> }
>
> for (i = 0; i < ARRAY_SIZE(tests); i++) {
> @@ -1075,6 +1078,9 @@ int igt_main_args("det:", NULL, help_str, opt_handler, NULL)
> }
>
> igt_fixture() {
> + /* Restore CPU idle states */
> + igt_disable_cpu_deep_sleep(drm_fd, false);
> +
> drmModeFreeResources(drm_resources);
> drm_close_driver(drm_fd);
> }
> --
> 2.43.0
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-05-20 13:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
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ä [this message]
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
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=ag28FVTooBC6Yly3@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=fshao@chromium.org \
--cc=gildekel@google.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jason-jh.lin@mediatek.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=karthik.b.s@intel.com \
--cc=markyacoub@chromium.org \
--cc=nancy.lin@mediatek.com \
--cc=navaremanasi@google.com \
--cc=paul-pl.chen@mediatek.com \
--cc=singo.chang@mediatek.com \
--cc=swati2.sharma@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