Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <harry.wentland@amd.com>, <rodrigo.siqueira@amd.com>,
	<mark.broadworth@amd.com>, <sunpeng.li@amd.com>,
	<alex.hung@amd.com>
Subject: [PATCH 2/3][V2] tools/amd_hdmi_compliance: Fix atomic commit failure
Date: Tue, 29 Oct 2024 11:03:48 -0600	[thread overview]
Message-ID: <20241029170349.1388428-2-alex.hung@amd.com> (raw)
In-Reply-To: <20241029170349.1388428-1-alex.hung@amd.com>

From: Stylon Wang <stylon.wang@amd.com>

[WHY]
Atomic commits without active planes are now invalid commits.

[HOW]
Activate primary plane while setting 'max bpc' property.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
---
 tools/amd_hdmi_compliance.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/amd_hdmi_compliance.c b/tools/amd_hdmi_compliance.c
index d80ebeba7..9d2a820af 100644
--- a/tools/amd_hdmi_compliance.c
+++ b/tools/amd_hdmi_compliance.c
@@ -440,11 +440,14 @@ static void set_force_yuv420(data_t *data, int force, int conn_id)
 static void set_max_bpc(data_t *data, int max_bpc, int conn_id)
 {
 	igt_display_t *display = &data->display;
+	igt_fb_t afb;
 
 	test_init(data, conn_id);
 
 	igt_info("Setting max bpc to %d on connector id %d\n",
 		 max_bpc, data->output->config.connector->connector_id);
+	igt_create_fb(data->fd, 128, 128, DRM_FORMAT_XRGB8888, 0, &afb);
+	igt_plane_set_fb(data->primary, &afb);
 	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, max_bpc);
 	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
-- 
2.43.0


  reply	other threads:[~2024-10-29 17:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 17:03 [PATCH 1/3][V2] tools/amd_hdmi_compliance: Additional functionalities Alex Hung
2024-10-29 17:03 ` Alex Hung [this message]
2024-10-29 17:03 ` [PATCH 3/3][V2] tools/amd_hdmi_compliance: Add timeout option Alex Hung
2024-10-29 22:17 ` [PATCH 1/3][V2] tools/amd_hdmi_compliance: Additional functionalities Rodrigo Siqueira Jordao

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=20241029170349.1388428-2-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mark.broadworth@amd.com \
    --cc=rodrigo.siqueira@amd.com \
    --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