From: Alex Hung <alex.hung@amd.com>
To: igt-dev@lists.freedesktop.org
Cc: Mark.Broadworth@amd.com, vitaly.prosyak@amd.com,
swati2.sharma@intel.com, kamil.konieczny@linux.intel.com,
jani.nikula@intel.com, Wayne Lin <wayne.lin@amd.com>
Subject: Re: [PATCH i-g-t][V3] tests/kms_hdr: Add visual HDR verification subtests
Date: Mon, 11 May 2026 18:36:10 -0600 [thread overview]
Message-ID: <a6ed9e4f-96f5-4aaa-8a46-659677ab0deb@amd.com> (raw)
In-Reply-To: <20260507211330.2640022-1-alex.hung@amd.com>
Hi,
Does anyone have any concerns if I merge this patch?
On 5/7/26 15:13, Alex Hung wrote:
> From: Wayne Lin <wayne.lin@amd.com>
>
> The new subtests display an HDR test pattern under a given metadata
> mode and pause for user confirmation, enabling manual inspection of
> HDR output quality on a connected HDR panel.
>
> New subtests:
> kms_hdr --run-subtest static-swap-smpte2084 --interactive-debug=smpte2084
> kms_hdr --run-subtest static-swap-traditional-sdr --interactive-debug=traditional-sdr
>
> Co-developed-by: Alex Hung <alex.hung@amd.com>
> Signed-off-by: Alex Hung <alex.hung@amd.com>
> Signed-off-by: Wayne Lin <wayne.lin@amd.com>
> Assisted-by: Copilot:Claude-Sonnet-4.6
> ---
> tests/kms_hdr.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 89 insertions(+)
>
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> index 876c1c03a..c13e985e1 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -67,6 +67,14 @@
> *
> * @swap: swapping static HDR metadata
> * @toggle: entering and exiting HDR mode
> + *
> + * SUBTEST: static-swap-smpte2084
> + * Description: Show a visual HDR pattern with SMPTE ST 2084 metadata and
> + * require user confirmation.
> + *
> + * SUBTEST: static-swap-traditional-sdr
> + * Description: Show a visual HDR pattern with traditional SDR gamma metadata
> + * and require user confirmation.
> */
>
> IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
> @@ -647,6 +655,79 @@ static void test_hdr(data_t *data, uint32_t flags)
> }
> }
>
> +static void test_hdr_visual(data_t *data,
> + void (*fill_metadata)(struct hdr_output_metadata *),
> + const char *mode_name)
> +{
> + igt_display_t *display = &data->display;
> + igt_output_t *output;
> + igt_fb_t afb;
> + int afb_id;
> + bool found = false;
> + struct hdr_output_metadata hdr;
> +
> + igt_display_reset(display);
> +
> + for_each_connected_output(display, output) {
> + igt_crtc_t *crtc;
> +
> + if (!has_max_bpc(output) || !igt_output_supports_hdr(output)) {
> + igt_info("%s: Doesn't support IGT_CONNECTOR_MAX_BPC or IGT_CONNECTOR_HDR_OUTPUT_METADATA.\n",
> + igt_output_name(output));
> + continue;
> + }
> +
> + if (!igt_is_panel_hdr(data->fd, output)) {
> + igt_info("Panel attached via %s connector is non-HDR\n", igt_output_name(output));
> + continue;
> + }
> +
> + if (igt_get_output_max_bpc(output) < 10) {
> + igt_info("%s: Doesn't support 10 bpc.\n", igt_output_name(output));
> + continue;
> + }
> +
> + for_each_crtc(display, crtc) {
> + igt_output_set_crtc(output, crtc);
> + if (!igt_crtc_connector_valid(crtc, output))
> + continue;
> +
> + prepare_test(data, output, crtc);
> +
> + afb_id = igt_create_fb(data->fd, 512, 512,
> + DRM_FORMAT_XRGB2101010,
> + DRM_FORMAT_MOD_LINEAR, &afb);
> + igt_assert(afb_id);
> +
> + draw_hdr_pattern(&afb);
> +
> + igt_plane_set_fb(data->primary, &afb);
> + igt_plane_set_size(data->primary, data->w, data->h);
> + fill_metadata(&hdr);
> + igt_hdr_set_metadata(data->output, &hdr);
> + igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
> + igt_display_commit_atomic(display,
> + DRM_MODE_ATOMIC_ALLOW_MODESET,
> + NULL);
> +
> + igt_info("Displaying %s HDR pattern. Press a key to continue.\n", mode_name);
> + igt_debug_wait_for_keypress(mode_name);
> +
> + igt_hdr_set_metadata(data->output, NULL);
> + igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> + igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +
> + test_fini(data);
> + igt_remove_fb(data->fd, &afb);
> +
> + found = true;
> + break;
> + }
> + }
> +
> + igt_require_f(found, "No HDR-capable connector found.\n");
> +}
> +
> int igt_main()
> {
> data_t data = {};
> @@ -698,6 +779,14 @@ int igt_main()
> igt_subtest_with_dynamic("invalid-hdr")
> test_hdr(&data, TEST_INVALID_HDR);
>
> + igt_describe("Show HDR pattern with SMPTE ST 2084 metadata and require user confirmation");
> + igt_subtest("static-swap-smpte2084")
> + test_hdr_visual(&data, igt_hdr_fill_st2084, "smpte2084");
> +
> + igt_describe("Show HDR pattern with traditional SDR gamma metadata and require user confirmation");
> + igt_subtest("static-swap-traditional-sdr")
> + test_hdr_visual(&data, igt_hdr_fill_sdr, "traditional-sdr");
> +
> igt_fixture() {
> igt_display_fini(&data.display);
> drm_close_driver(data.fd);
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-05-12 0:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 21:13 [PATCH i-g-t][V3] tests/kms_hdr: Add visual HDR verification subtests Alex Hung
2026-05-07 22:52 ` ✓ i915.CI.BAT: success for " Patchwork
2026-05-07 23:31 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-08 12:00 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-08 16:28 ` ✗ i915.CI.Full: " Patchwork
2026-05-08 22:00 ` Alex Hung
2026-05-12 0:36 ` Alex Hung [this message]
2026-05-12 19:18 ` [PATCH i-g-t][V3] " Sharma, Swati2
2026-05-12 19:36 ` Alex Hung
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=a6ed9e4f-96f5-4aaa-8a46-659677ab0deb@amd.com \
--to=alex.hung@amd.com \
--cc=Mark.Broadworth@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=kamil.konieczny@linux.intel.com \
--cc=swati2.sharma@intel.com \
--cc=vitaly.prosyak@amd.com \
--cc=wayne.lin@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