[PATCH i-g-t v4 2/7] benchmarks/kms_fb_stress: Log the KMS structure
Arthur Grillo
arthurgrillo at riseup.net
Thu Apr 11 18:51:12 UTC 2024
In the future, the KMS structure could be dynamically changed. So, log
the KMS structure to the user.
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Signed-off-by: Arthur Grillo <arthurgrillo at riseup.net>
---
benchmarks/kms_fb_stress.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/benchmarks/kms_fb_stress.c b/benchmarks/kms_fb_stress.c
index e9c051318ed6..8d4707f5a8c0 100644
--- a/benchmarks/kms_fb_stress.c
+++ b/benchmarks/kms_fb_stress.c
@@ -8,6 +8,9 @@
#define FRAME_COUNT 100
#define NUM_FBS 2
+#define RECT_FMT "%dx%d%+d%+d"
+#define RECT_ARG(r) (r)->width, (r)->height, (r)->x, (r)->y
+
struct rect_t {
int x, y;
int width, height;
@@ -187,6 +190,22 @@ igt_simple_main
gen_fbs(&data);
+ igt_info("KMS structure:\n");
+ igt_info("\tCRTC:\n");
+ igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data.kms.crtc));
+ igt_info("\tprimary:\n");
+ igt_info("\t\tformat: %s\n", igt_format_str(data.kms.primary.format));
+ igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data.kms.primary.rect));
+ igt_info("\toverlay A:\n");
+ igt_info("\t\tformat: %s\n", igt_format_str(data.kms.overlay_a.format));
+ igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data.kms.overlay_a.rect));
+ igt_info("\toverlay B:\n");
+ igt_info("\t\tformat: %s\n", igt_format_str(data.kms.overlay_b.format));
+ igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data.kms.overlay_b.rect));
+ igt_info("\twriteback:\n");
+ igt_info("\t\tformat: %s\n", igt_format_str(data.kms.writeback.format));
+ igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data.kms.writeback.rect));
+
data.kms.primary.base = igt_output_get_plane_type(data.wb_output, DRM_PLANE_TYPE_PRIMARY);
igt_assert(data.kms.primary.base != NULL);
--
2.44.0
More information about the igt-dev
mailing list