[PATCH 2/3][V2] tools/amd_hdmi_compliance: Fix atomic commit failure

Alex Hung alex.hung at amd.com
Tue Oct 29 17:03:48 UTC 2024


From: Stylon Wang <stylon.wang at 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 at amd.com>
Signed-off-by: Alex Hung <alex.hung at amd.com>
Signed-off-by: Stylon Wang <stylon.wang at 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



More information about the igt-dev mailing list