public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Alex Hung <alex.hung@amd.com>, igt-dev@lists.freedesktop.org
Cc: wayne.lin@amd.com, Mark.Broadworth@amd.com,
	Alex Hung <alex.hung@amd.com>
Subject: Re: [PATCH 2/3] tools: Add amd_hdr_visual for manual HDR verification
Date: Thu, 19 Mar 2026 10:54:36 +0200	[thread overview]
Message-ID: <7f02ddf383a74633529a642954377ed908e8ddac@intel.com> (raw)
In-Reply-To: <20260317175136.3754576-2-alex.hung@amd.com>

On Tue, 17 Mar 2026, Alex Hung <alex.hung@amd.com> wrote:
> From: Wayne Lin <wayne.lin@amd.com>
>
> Add a visual verification tool for AMD HDR display output. This tool
> displays HDR test patterns with different metadata types and waits for
> user confirmation, enabling manual inspection of HDR output quality.
>
> Subtests:
> - static-swap-smpte2084: Display with SMPTE ST2084 (PQ) HDR metadata
> - static-swap-traditional-sdr: Display with traditional SDR gamma metadata
>
> 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>
> ---
>  tools/amd_hdr_visual.c | 372 +++++++++++++++++++++++++++++++++++++++++
>  tools/meson.build      |   5 +
>  2 files changed, 377 insertions(+)
>  create mode 100644 tools/amd_hdr_visual.c
>
> diff --git a/tools/amd_hdr_visual.c b/tools/amd_hdr_visual.c
> new file mode 100644
> index 000000000..58decb356
> --- /dev/null
> +++ b/tools/amd_hdr_visual.c
> @@ -0,0 +1,372 @@
> +/*
> + * Copyright 2026 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#include "igt.h"
> +#include <fcntl.h>
> +#include <termios.h>
> +#include <unistd.h>
> +#include "igt_edid.h"
> +#include "igt_hdr.h"
> +
> +IGT_TEST_DESCRIPTION("Test HDR metadata interfaces and bpc switch");
> +
> +/* Test flags. */
> +enum {
> +	TEST_NONE = 1 << 0,
> +	TEST_DPMS = 1 << 1,
> +	TEST_SUSPEND = 1 << 2,
> +	TEST_SWAP = 1 << 3,
> +};
> +
> +/* BPC connector state. */
> +typedef struct output_bpc {
> +	unsigned int current;
> +	unsigned int maximum;
> +} output_bpc_t;
> +
> +/* Common test data. */
> +typedef struct data {
> +	igt_display_t display;
> +	igt_plane_t *primary;
> +	igt_output_t *output;
> +	igt_crtc_t *pipe;
> +	igt_pipe_crc_t *pipe_crc;
> +	drmModeModeInfo *mode;
> +	enum pipe pipe_id;

Please avoid using enum pipe and crtc->pipe for anything unless you
actually really *really* need to know the (Intel) hardware pipe.

Further details at [1].

BR,
Jani.



[1] https://lore.kernel.org/r/356099f0d5b2c882460e344869720b92c0da538d@intel.com



> +	int fd;
> +	int w;
> +	int h;
> +} data_t;

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2026-03-19  8:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 17:51 [PATCH 1/3] lib/igt_hdr: Extract HDR helpers into igt_hdr library Alex Hung
2026-03-17 17:51 ` [PATCH 2/3] tools: Add amd_hdr_visual for manual HDR verification Alex Hung
2026-03-18  9:52   ` Kamil Konieczny
2026-03-18 20:13     ` vitaly prosyak
2026-03-18 20:15       ` Alex Hung
2026-03-19  8:54   ` Jani Nikula [this message]
2026-03-17 17:51 ` [PATCH 3/3] lib/igt_hdr: Fix EOTF bit flag checking Alex Hung
2026-03-18  9:55   ` Kamil Konieczny
2026-03-18  0:50 ` ✓ Xe.CI.BAT: success for series starting with [1/3] lib/igt_hdr: Extract HDR helpers into igt_hdr library Patchwork
2026-03-18  1:04 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18  7:34 ` [PATCH 1/3] " Sharma, Swati2
2026-03-18 18:40   ` Alex Hung
2026-03-18  9:30 ` Kamil Konieczny
2026-03-19 13:42 ` ✓ Xe.CI.FULL: success for series starting with [1/3] " 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=7f02ddf383a74633529a642954377ed908e8ddac@intel.com \
    --to=jani.nikula@intel.com \
    --cc=Mark.Broadworth@amd.com \
    --cc=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --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