Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Wu <ray.wu@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <alex.hung@amd.com>, <sunpeng.li@amd.com>,
	<chiahsuan.chung@amd.com>, <ray.wu@amd.com>
Subject: [PATCH i-g-t, v2 0/2] tests/amdgpu/amd_replay: Add Replay Rate Control test
Date: Wed, 13 May 2026 15:03:20 +0800	[thread overview]
Message-ID: <20260513070631.3723466-1-ray.wu@amd.com> (raw)

This series adds an IGT subtest for Panel Replay's rate control feature on AMD eDP panels,
and fixes a few pre-existing logic bugs in amd_replay that were uncovered while reviewing the new test.

Panel Replay rate control extends the panel's coasting vtotal while the screen is static 
(lowering refresh rate for power savings) and restores it once live updates resume. 
The behaviour is observable through the per-connector replay_coasting_vtotal debugfs node, 
but is currently not exercised by IGT, so silent regressions in either the driver state machine
or the panel firmware are possible.

Patch 1 is a pure bug fix for existing replay subtests:
  - The `test_mode == (A || B)` and `test_mode == A || B` conditionals
    in page_flip_test() / run_check_replay() always evaluated truthy,
    so the guarded state checks ran regardless of test_mode.
  - Three igt_fail_on_f() range checks combined `state < N` with
    `state >= N+1` using `&&`, which can never be true; those
    assertions effectively never fired.
  - Two "mdoe" -> "mode" typos in igt_describe() strings.

Patch 2 adds the new test on top:
  - Two helpers in lib/igt_amd:
      * igt_amd_replay_support_rate_control() returns true when the
        connector's replay_capability advertises
        "Rate control support: yes".
      * igt_amd_read_replay_coasting_vtotal() reads
        replay_coasting_vtotal; returns 0 on success or -errno on
        failure.
  - A new "replay_rate_control" subtest:
      1. Drive page flips so Panel Replay engages.
      2. Wait for the screen to settle, sample static coasting vtotal.
      3. Drive page flips to put replay back into live mode, sample
         live coasting vtotal.
      4. Assert static > live (lower refresh rate while static).



Ray Wu (2):
  tests/amdgpu/amd_replay: fix operator precedence and typos
  tests/amdgpu/amd_replay: add Replay Rate Control IGT test

 lib/igt_amd.c             |  94 ++++++++++++++++++++++++++++++
 lib/igt_amd.h             |   3 +
 tests/amdgpu/amd_replay.c | 116 ++++++++++++++++++++++++++++++++++----
 3 files changed, 202 insertions(+), 11 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-05-13  7:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  7:03 Ray Wu [this message]
2026-05-13  7:03 ` [PATCH i-g-t, v2 1/2] tests/amdgpu/amd_replay: fix operator precedence and typos Ray Wu
2026-05-13  7:03 ` [PATCH i-g-t, v2 2/2] tests/amdgpu/amd_replay: add Replay Rate Control IGT test Ray Wu
2026-05-13 16:43 ` ✓ i915.CI.BAT: success for tests/amdgpu/amd_replay: Add Replay Rate Control test (rev2) Patchwork
2026-05-13 17:50 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-14 15:45 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-14 17:13 ` ✗ 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=20260513070631.3723466-1-ray.wu@amd.com \
    --to=ray.wu@amd.com \
    --cc=alex.hung@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sunpeng.li@amd.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