All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t] tests/kms_vrr: Fix the usage of VRR max refresh rate
@ 2022-11-28 10:52 Bhanuprakash Modem
  2022-11-28 11:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2022-11-28 13:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Bhanuprakash Modem @ 2022-11-28 10:52 UTC (permalink / raw)
  To: igt-dev

The max refresh rate of VRR is likely to be lower than the Vrefresh
of the selected mode. So, to test the VRR choose vrr_max as max
refresh rate if Vrefresh is greater than vrr_max, otherwise Vrefresh.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_vrr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 68c4f264..41e88818 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -215,11 +215,13 @@ static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
 
 	/* Override mode with max vrefresh.
 	 *   - vrr_min range should be less than the override mode vrefresh.
-	 *   - Limit the vrr_max range with the override mode vrefresh.
+	 *   - Limit the vrr_max range with the override mode vrefresh if
+	 *     vrr_max is greater than vrefresh else vrefresh.
 	 */
 	mode = output_mode_with_maxrate(output, data->range.max);
 	igt_require(mode.vrefresh > data->range.min);
-	data->range.max = mode.vrefresh;
+	data->range.max = (mode.vrefresh > data->range.max) ?
+				data->range.max : mode.vrefresh;
 	igt_output_override_mode(output, &mode);
 
 	/* Prepare resources */
-- 
2.38.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-28 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 10:52 [igt-dev] [i-g-t] tests/kms_vrr: Fix the usage of VRR max refresh rate Bhanuprakash Modem
2022-11-28 11:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-11-28 13:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.