Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, mitulkumar.ajitkumar.golani@intel.com
Subject: [i-g-t V7 1/8] tests/kms_vrr: Use lib helper to print connector modes
Date: Mon, 11 Dec 2023 17:06:43 +0530	[thread overview]
Message-ID: <20231211113650.3520399-2-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20231211113650.3520399-1-bhanuprakash.modem@intel.com>

Instead of writing a new logic at test level, use library helper
to print connector modes.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
---
 tests/kms_vrr.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 5c190cd8c..bbdb54682 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -65,13 +65,6 @@
  */
 #define TEST_DURATION_NS (5000000000ull)
 
-#define DRM_MODE_FMT    "\"%s\": %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
-#define DRM_MODE_ARG(m) \
-	(m)->name, (m)->vrefresh, (m)->clock, \
-	(m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
-	(m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
-	(m)->type, (m)->flags
-
 enum {
 	TEST_BASIC = 1 << 0,
 	TEST_DPMS = 1 << 1,
@@ -162,14 +155,16 @@ output_mode_with_maxrate(igt_output_t *output, unsigned int vrr_max)
 	drmModeConnectorPtr connector = output->config.connector;
 	drmModeModeInfo mode = *igt_output_get_mode(output);
 
-	igt_debug("Default Mode " DRM_MODE_FMT "\n", DRM_MODE_ARG(&mode));
+	igt_info("Default Mode: ");
+	kmstest_dump_mode(&mode);
 
 	for (i = 0; i < connector->count_modes; i++)
 		if (connector->modes[i].vrefresh > mode.vrefresh &&
 		    connector->modes[i].vrefresh <= vrr_max)
 			mode = connector->modes[i];
 
-	igt_debug("Override Mode " DRM_MODE_FMT "\n", DRM_MODE_ARG(&mode));
+	igt_info("Override Mode: ");
+	kmstest_dump_mode(&mode);
 
 	return mode;
 }
-- 
2.40.0

  reply	other threads:[~2023-12-11 11:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 11:36 [i-g-t V7 0/8] tests/kms_vrr: Add new subtest to switch RR without modeset Bhanuprakash Modem
2023-12-11 11:36 ` Bhanuprakash Modem [this message]
2023-12-11 11:36 ` [i-g-t V7 2/8] tests/kms_vrr: Clear VRR before exit Bhanuprakash Modem
2023-12-11 11:36 ` [i-g-t V7 3/8] tests/kms_vrr: Move all config constaints to new function Bhanuprakash Modem
2023-12-11 11:36 ` [i-g-t V7 4/8] tests/kms_vrr: Fix pipe/output combo validity constraint Bhanuprakash Modem
2023-12-13  3:16   ` Golani, Mitulkumar Ajitkumar
2023-12-11 11:36 ` [i-g-t V7 5/8] tests/kms_vrr: Add new subtest to switch RR without modeset Bhanuprakash Modem
2023-12-13  3:03   ` Golani, Mitulkumar Ajitkumar
2023-12-11 11:36 ` [i-g-t V7 6/8] tests/kms_vrr: Add new subtest for DRRS " Bhanuprakash Modem
2023-12-12  6:45   ` Golani, Mitulkumar Ajitkumar
2023-12-11 11:36 ` [i-g-t V7 7/8] tests/kms_vrr: New subtest for toggle VRR during fastsets Bhanuprakash Modem
2023-12-11 11:36 ` [i-g-t V7 8/8] HAX: DO_NOT_MERGE: test only vrr tests Bhanuprakash Modem
2023-12-11 19:37 ` ✗ Fi.CI.BAT: failure for tests/kms_vrr: Add new subtest to switch RR without modeset (rev8) Patchwork
2023-12-11 20:15 ` ✓ CI.xeBAT: 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=20231211113650.3520399-2-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mitulkumar.ajitkumar.golani@intel.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