From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E04E5C2BA1A for ; Thu, 20 Jun 2024 08:36:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EF0910E84E; Thu, 20 Jun 2024 08:36:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dHLZnKZ9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73CF310E84E for ; Thu, 20 Jun 2024 08:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718872599; x=1750408599; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vqe+qbgGrFyeHdz3+vo/k+sn295VzixT7joIEpQuPLo=; b=dHLZnKZ9jFWBv62m7xji/vfvbua5nLgAAY+jVEDuoqEEvygnW7S7LPCT mFDwp082x6yGpilizleeI7fisBwX5eSxKyDaPkM6FVS5P0vwz21PbLQGV sWdfpd1tTSIYPnGw8BN9tpd1TLf73Kv/lRT7q0t73y6gRILL1NDRKXlU7 Xoc2osO9GfGi4xOFn0/7hH5pajEz09gJDbhh8wuyBmAsWaOG97DcIINiJ atqmZaARqAUMO5utcTKcWEU33I7amjKxiKsIOHatciwguRaczb70fxI3y QdDlFH3uXyisIlUTADLyA0zWsn1Dbr8DxoqQPYQVlTSDkAzA5Ufwh89ah w==; X-CSE-ConnectionGUID: va54VmFpRwuaNvG26X/k9A== X-CSE-MsgGUID: m6jjIXWzRoCHw3NcAPm7dg== X-IronPort-AV: E=McAfee;i="6700,10204,11108"; a="19611495" X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="19611495" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2024 01:36:38 -0700 X-CSE-ConnectionGUID: pEQMY74MRtm7zLo5T71j4A== X-CSE-MsgGUID: yyFVezM1QbCOYQW0smkSyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,251,1712646000"; d="scan'208";a="42026180" Received: from bhanu-nuclab.iind.intel.com ([10.145.169.172]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2024 01:36:36 -0700 From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org Cc: Bhanuprakash Modem , Manasi Navare , Mitul Golani Subject: [i-g-t 2/2] tests/kms_vrr: Fix hardcoded step size Date: Thu, 20 Jun 2024 13:58:34 +0530 Message-ID: <20240620082834.4169435-2-bhanuprakash.modem@intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240620082834.4169435-1-bhanuprakash.modem@intel.com> References: <20240620082834.4169435-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" In seamless-virtual subtest we are trying different Vrefresh values between Vmin & Vmax by incrementing the Vrefresh by by 10 Hz (hardcoded). With this approach: - We'll achieve less no. of refresh rates if VRR range is low Ex: We can achieve only 1 step between 40 to 60 Hz. - Execution time will increase in case of high VRR range. Ex: We need 30 steps to reach 60 Hz to 360 Hz. Instead of hardcoding the step size (10 Hz), allow test to execute fixed number of steps (say 5 steps to reach Vmin to Vmax) will guarantee to test (5) different refresh rates between Vmin & Vmax irrespective of the VRR range. Cc: Manasi Navare Cc: Mitul Golani Signed-off-by: Bhanuprakash Modem --- tests/kms_vrr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c index 6fd04505e..2ea90cd8e 100644 --- a/tests/kms_vrr.c +++ b/tests/kms_vrr.c @@ -740,6 +740,7 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu uint32_t result; unsigned int vrefresh; uint64_t rate[] = {0}; + uint32_t step_size; igt_info("Use HIGH_RR Mode as default\n"); kmstest_dump_mode(&data->switch_modes[HIGH_RR_MODE]); @@ -759,8 +760,14 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu "Refresh rate (%u Hz) %"PRIu64"ns: Target threshold not reached, result was %u%%\n", data->switch_modes[HIGH_RR_MODE].vrefresh, rate[0], result); + /* + * Calculate step size by considering the no. of steps required to + * reach Vmin to Vmax as 5. + */ + step_size = (data->range.max - data->range.min) / 5; + /* Switch to Virtual RR */ - for (vrefresh = data->range.min + 10; vrefresh < data->range.max; vrefresh += 10) { + for (vrefresh = data->range.min + step_size; vrefresh < data->range.max; vrefresh += step_size) { drmModeModeInfo virtual_mode = virtual_rr_vrr_range_mode(output, vrefresh); igt_info("Requesting Virtual Mode with Refresh Rate (%u Hz): \n", vrefresh); -- 2.43.2