[i-g-t V6 01/10] tests/kms_vrr: Use lib helper to print connector modes
Golani, Mitulkumar Ajitkumar
mitulkumar.ajitkumar.golani at intel.com
Thu Dec 7 14:08:58 UTC 2023
> -----Original Message-----
> From: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Sent: Thursday, December 7, 2023 12:19 PM
> To: igt-dev at lists.freedesktop.org; ville.syrjala at linux.intel.com; Golani,
> Mitulkumar Ajitkumar <mitulkumar.ajitkumar.golani at intel.com>
> Cc: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Subject: [i-g-t V6 01/10] tests/kms_vrr: Use lib helper to print connector
> modes
>
> Instead of writing a new logic at test level, use library helper to print
> connector modes.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at 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);
Change LGTM. Thanks
Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
>
> return mode;
> }
> --
> 2.40.0
More information about the igt-dev
mailing list