From: Karthik B S <karthik.b.s@intel.com>
To: Pranay Samala <pranay.samala@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <sameer.lattannavar@intel.com>, Vitaly Prosyak <vitaly.prosyak@amd.com>
Subject: Re: [PATCH i-g-t 3/3] tests/: Handle max bpc read failures explicitly
Date: Wed, 20 May 2026 10:34:13 +0530 [thread overview]
Message-ID: <005eb05d-d1df-4e2c-a034-657f608d3809@intel.com> (raw)
In-Reply-To: <20260518040353.212734-4-pranay.samala@intel.com>
Hi Pranay,
+cc Vitaly Prosyak <vitaly.prosyak@amd.com>
@Vitaly: Please take a look from the amd tests POV.
The patch LGTM in general, other than the fact that this patch needs to
be combined with patch 2 to avoid compilation failure there.
Regards,
Karthik.B.S
On 5/18/2026 9:33 AM, Pranay Samala wrote:
> Update test call sites of igt_get_output_max_bpc() to use the boolean
> return API so each test can decide how to handle max-bpc read failures.
> This separates read/parsing failures from capability checks and allows
> the test to make an explicit skip/continue decision with clearer logging,
> while keeping normal capability validation unchanged when max bpc is
> read successfully.
>
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
> ---
> tests/amdgpu/amd_bypass.c | 6 +++++-
> tests/amdgpu/amd_dp_dsc.c | 10 +++++++++-
> tests/intel/kms_dsc.c | 13 +++++++++++--
> tests/intel/kms_frontbuffer_tracking.c | 10 +++++++++-
> tests/kms_color_helper.c | 5 ++++-
> tests/kms_dither.c | 9 ++++++++-
> tests/kms_hdr.c | 16 ++++++++++++++--
> 7 files changed, 60 insertions(+), 9 deletions(-)
>
> diff --git a/tests/amdgpu/amd_bypass.c b/tests/amdgpu/amd_bypass.c
> index 3c537ea9e..e59691f16 100644
> --- a/tests/amdgpu/amd_bypass.c
> +++ b/tests/amdgpu/amd_bypass.c
> @@ -323,6 +323,7 @@ static void bypass_8bpc_test(data_t *data)
> igt_display_t *display = &data->display;
> igt_fb_t fb;
> enum pattern ptn;
> + unsigned int maximum;
>
> test_init(data);
>
> @@ -345,7 +346,10 @@ static void bypass_8bpc_test(data_t *data)
> * Rx supports only up to 6bpc, Rx-crc will different from crtc-crc
> * with 8bpc.
> */
> - igt_skip_on_f(igt_get_output_max_bpc(data->output) <= 6,
> + igt_skip_on_f(!igt_get_output_max_bpc(data->output, &maximum),
> + "Failed to read max bpc for %s\n", igt_output_name(data->output));
> +
> + igt_skip_on_f(maximum <= 6,
> "check /sys/kernel/debug/dri/0/eDP-1 (connector)/output_bpc\n");
>
> igt_create_fb(data->drm_fd, data->width, data->height,
> diff --git a/tests/amdgpu/amd_dp_dsc.c b/tests/amdgpu/amd_dp_dsc.c
> index 1742c7df4..dc71e903e 100644
> --- a/tests/amdgpu/amd_dp_dsc.c
> +++ b/tests/amdgpu/amd_dp_dsc.c
> @@ -480,11 +480,19 @@ static void test_dsc_bpc(data_t *data)
>
> /* Find max supported bpc */
> for_each_crtc(&data->display, crtc) {
> + unsigned int maximum;
> +
> output = data->output[crtc->crtc_index];
> if (!output || !igt_output_is_connected(output))
> continue;
> igt_info("Checking bpc support of conn %s\n", output->name);
> - max_supported_bpc[crtc->crtc_index] = igt_get_output_max_bpc(output);
> + if (!igt_get_output_max_bpc(output, &maximum)) {
> + igt_info("Failed to read max bpc for conn %s\n", output->name);
> + max_supported_bpc[crtc->crtc_index] = 0;
> + continue;
> + }
> +
> + max_supported_bpc[crtc->crtc_index] = maximum;
> }
>
> /* Setup all outputs */
> diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
> index 605ad2d5c..8008fc045 100644
> --- a/tests/intel/kms_dsc.c
> +++ b/tests/intel/kms_dsc.c
> @@ -265,6 +265,8 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
> igt_require(check_gen11_bpc_constraint(data->drm_fd, data->input_bpc));
>
> for_each_crtc_with_valid_output(display, crtc, output) {
> + unsigned int maximum;
> +
> data->output_format = output_format;
> data->plane_format = plane_format;
> data->input_bpc = bpc;
> @@ -275,8 +277,15 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
> !check_gen11_dp_constraint(data->drm_fd, data->output, data->crtc))
> continue;
>
> - if (igt_get_output_max_bpc(output) < MIN_DSC_BPC) {
> - igt_info("Output %s doesn't support min %d-bpc\n", igt_output_name(data->output), MIN_DSC_BPC);
> + if (!igt_get_output_max_bpc(output, &maximum)) {
> + igt_info("Output %s: Failed to read max bpc\n",
> + igt_output_name(data->output));
> + continue;
> + }
> +
> + if (maximum < MIN_DSC_BPC) {
> + igt_info("Output %s doesn't support min %d-bpc\n",
> + igt_output_name(data->output), MIN_DSC_BPC);
> continue;
> }
>
> diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
> index e7bb3fa18..996a67ee6 100644
> --- a/tests/intel/kms_frontbuffer_tracking.c
> +++ b/tests/intel/kms_frontbuffer_tracking.c
> @@ -2777,6 +2777,8 @@ static void setup_drrs(void)
>
> static void setup_hdr(void)
> {
> + unsigned int maximum;
> +
> if (!igt_output_has_prop(prim_mode_params.output, IGT_CONNECTOR_MAX_BPC) ||
> !igt_output_get_prop(prim_mode_params.output, IGT_CONNECTOR_MAX_BPC) ||
> !igt_output_supports_hdr(prim_mode_params.output)) {
> @@ -2790,7 +2792,13 @@ static void setup_hdr(void)
> return;
> }
>
> - if (igt_get_output_max_bpc(prim_mode_params.output) < 10) {
> + if (!igt_get_output_max_bpc(prim_mode_params.output, &maximum)) {
> + igt_info("Can't test HDR: Failed to read max bpc for %s.\n",
> + igt_output_name(prim_mode_params.output));
> + return;
> + }
> +
> + if (maximum < 10) {
> igt_info("Can't test HDR: %s doesn't support 10 bpc.\n", igt_output_name(prim_mode_params.output));
> return;
> }
> diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
> index 24663444a..a50ac3a37 100644
> --- a/tests/kms_color_helper.c
> +++ b/tests/kms_color_helper.c
> @@ -40,7 +40,10 @@ bool crtc_output_combo_valid(data_t *data, igt_crtc_t *crtc)
> bool
> panel_supports_deep_color(igt_output_t *output)
> {
> - unsigned int maximum = igt_get_output_max_bpc(output);
> + unsigned int maximum;
> +
> + if (!igt_get_output_max_bpc(output, &maximum))
> + return false;
>
> igt_info("Max supported bit depth: %d\n", maximum);
>
> diff --git a/tests/kms_dither.c b/tests/kms_dither.c
> index ca367db61..236e5c7c0 100644
> --- a/tests/kms_dither.c
> +++ b/tests/kms_dither.c
> @@ -206,6 +206,7 @@ run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc)
>
> for_each_connected_output(display, output) {
> igt_crtc_t *crtc;
> + unsigned int maximum;
>
> if (!is_supported(output)) {
> igt_info("Output %s: Doesn't support \"max bpc\" property.\n",
> @@ -213,7 +214,13 @@ run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc)
> continue;
> }
>
> - if (igt_get_output_max_bpc(output) < output_bpc) {
> + if (!igt_get_output_max_bpc(output, &maximum)) {
> + igt_info("Output %s: Failed to read max bpc.\n",
> + igt_output_name(output));
> + continue;
> + }
> +
> + if (maximum < output_bpc) {
> igt_info("Output %s: Doesn't support %d-bpc.\n",
> igt_output_name(output), output_bpc);
> continue;
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> index bcc912d15..2f19b3237 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -254,6 +254,7 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
>
> for_each_connected_output(display, output) {
> igt_crtc_t *crtc;
> + unsigned int maximum;
>
> if (!has_max_bpc(output)) {
> igt_info("%s: Doesn't support IGT_CONNECTOR_MAX_BPC.\n",
> @@ -261,7 +262,12 @@ static void test_bpc_switch(data_t *data, uint32_t flags)
> continue;
> }
>
> - if (igt_get_output_max_bpc(output) < 10) {
> + if (!igt_get_output_max_bpc(output, &maximum)) {
> + igt_info("%s: Failed to read max bpc.\n", igt_output_name(output));
> + continue;
> + }
> +
> + if (maximum < 10) {
> igt_info("%s: Doesn't support 10 bpc.\n", igt_output_name(output));
> continue;
> }
> @@ -532,6 +538,7 @@ static void test_hdr(data_t *data, uint32_t flags)
>
> for_each_connected_output(display, output) {
> igt_crtc_t *crtc;
> + unsigned int maximum;
>
> /* To test HDR, 10 bpc is required, so we need to
> * set MAX_BPC property to 10bpc prior to setting
> @@ -556,7 +563,12 @@ static void test_hdr(data_t *data, uint32_t flags)
> continue;
> }
>
> - if (igt_get_output_max_bpc(output) < 10) {
> + if (!igt_get_output_max_bpc(output, &maximum)) {
> + igt_info("%s: Failed to read max bpc.\n", igt_output_name(output));
> + continue;
> + }
> +
> + if (maximum < 10) {
> igt_info("%s: Doesn't support 10 bpc.\n", igt_output_name(output));
> continue;
> }
next prev parent reply other threads:[~2026-05-20 5:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 4:03 [PATCH i-g-t 0/3] Improve max-bpc query error handling Pranay Samala
2026-05-18 4:03 ` [PATCH i-g-t 1/3] Revert "tests/kms_hdr: Move capability checks inside dynamic subtests" Pranay Samala
2026-05-20 3:04 ` Karthik B S
2026-05-18 4:03 ` [PATCH i-g-t 2/3] lib/igt_kms: make max bpc query return status Pranay Samala
2026-05-20 4:09 ` Karthik B S
2026-05-18 4:03 ` [PATCH i-g-t 3/3] tests/: Handle max bpc read failures explicitly Pranay Samala
2026-05-20 5:04 ` Karthik B S [this message]
2026-05-21 15:54 ` vitaly prosyak
2026-05-21 17:12 ` Alex Hung
2026-05-18 22:42 ` ✓ Xe.CI.BAT: success for Improve max-bpc query error handling Patchwork
2026-05-18 22:55 ` ✓ i915.CI.BAT: " Patchwork
2026-05-19 4:56 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-19 17:55 ` ✓ i915.CI.Full: success " 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=005eb05d-d1df-4e2c-a034-657f608d3809@intel.com \
--to=karthik.b.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=pranay.samala@intel.com \
--cc=sameer.lattannavar@intel.com \
--cc=vitaly.prosyak@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