From: "Joshi, Kunal1" <kunal1.joshi@intel.com>
To: Jeevan B <jeevan.b@intel.com>, igt-dev@lists.freedesktop.org
Cc: animesh.manna@intel.com
Subject: Re: [i-g-t,2/2] tests/kms_vrr: Add new test to validate LOBF
Date: Thu, 25 Jul 2024 14:41:56 +0530 [thread overview]
Message-ID: <194ccdf6-001f-4e98-8518-aefe70c92510@intel.com> (raw)
In-Reply-To: <20240723042850.2651902-3-jeevan.b@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4743 bytes --]
Hello Jeevan,
On 7/23/2024 9:58 AM, Jeevan B wrote:
> Validate pseudo static refresh rate changes in the VRR with
> fixed refresh rate framework for non-psr scenarios.
>
> v2: Add PR check.
>
> Signed-off-by: Jeevan B<jeevan.b@intel.com>
> ---
> tests/kms_vrr.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 56 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
> index 7e8885f16..d45d38657 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -31,12 +31,18 @@
> */
>
> #include "igt.h"
> +#include "igt_psr.h"
> #include "i915/intel_drrs.h"
> #include "sw_sync.h"
> #include <fcntl.h>
> #include <signal.h>
>
> /**
> + * SUBTEST: lobf
> + * Description: Test to validate link-off between active frames in non-psr
> + * operation
> + * Functionality: LOBF
> + *
> * SUBTEST: cmrr
> * Description: Test to validate the content rate to exactly match with the
> * requested rate without any frame drops.
> @@ -106,7 +112,8 @@ enum {
> TEST_FASTSET = 1 << 7,
> TEST_MAXMIN = 1 << 8,
> TEST_CMRR = 1 << 9,
> - TEST_NEGATIVE = 1 << 10,
> + TEST_LINK_OFF = 1 << 10,
> + TEST_NEGATIVE = 1 << 11,
> };
>
> enum {
> @@ -129,6 +136,7 @@ typedef struct vtest_ns {
> typedef struct data {
> igt_display_t display;
> int drm_fd;
> + int debugfs_fd;
> igt_plane_t *primary;
> igt_fb_t fb[2];
> range_t range;
> @@ -784,6 +792,44 @@ test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe, igt_output_t *outpu
> }
> }
>
> +static void
> +test_lobf(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
> +{
> + bool change_mode = false;
> + time_t startTime = time(NULL);
> + time_t secs = 4, change_time = 3;
> + igt_plane_t *primary;
> + drmModeModeInfo mode = *igt_output_get_mode(output);
> +
> + igt_info("LOBF test execution on %s, PIPE %s with VRR range: (%u-%u) Hz\n",
> + output->name, kmstest_pipe_name(pipe), data->range.min, data->range.max);
> +
> + igt_require(output->config.connector->connector_type == DRM_MODE_CONNECTOR_eDP);
> + igt_require(!igt_get_i915_edp_lobf_status(data->drm_fd, output->name));
> + if (psr_sink_support(data->drm_fd, data->debugfs_fd, PSR_MODE_1, NULL) ||
> + psr_sink_support(data->drm_fd, data->debugfs_fd, PR_MODE, NULL))
> + psr_disable(data->drm_fd, data->debugfs_fd, NULL);
> +
> + primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
> + igt_create_color_fb(data->drm_fd, mode.hdisplay, mode.vdisplay,
> + DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
> + 1, 1, 1, &data->fb[0]);
> +
> + igt_output_override_mode(output, &data->switch_modes[HIGH_RR_MODE]);
> +
> + while (time(NULL) - startTime < secs) {
> + igt_plane_set_fb(primary, &data->fb[0]);
> + igt_display_commit(&data->display);
> + if (!change_mode && time(NULL) - startTime >= change_time) {
> + igt_output_override_mode(output, &data->switch_modes[LOW_RR_MODE]);
> + change_time = true;
> + }
> + }
>
> Consider we have very less difference between LOW_RR and HIGH_RR,
> Will we still get sufficienct extended vblank to always turn the link off?
>
> @Animesh can you also clarify here if we somehow can know exact time required to do link off?
>
> +
> + igt_assert_f(igt_get_i915_edp_lobf_status(data->drm_fd, output->name),
> + "LOBF not enabled\n");
> +}
> +
> static void
> test_cmrr(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
> {
> @@ -973,6 +1019,7 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data)
> {
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> + data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
>
> kmstest_set_vt_graphics_mode();
>
> @@ -1030,13 +1077,20 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data)
> igt_subtest_with_dynamic("seamless-rr-switch-virtual")
> run_vrr_test(&data, test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR);
>
> - igt_describe("Test to validate the the content rate exactly match with the "
> + igt_describe("Test to validate the content rate exactly match with the "
> "requested rate without any frame drops.");
> igt_subtest_with_dynamic("cmrr") {
> igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20);
>
> run_vrr_test(&data, test_cmrr, TEST_CMRR);
> }
> + igt_describe("Test to validate the link-off between active frames in "
> + "non-PSR operation.");
> + igt_subtest_with_dynamic("lobf") {
> + igt_require(intel_display_ver(intel_get_drm_devid(data.drm_fd)) >= 20);
> +
> + run_vrr_test(&data, test_lobf, TEST_LINK_OFF);
> + }
> }
>
> igt_fixture {
Thanks and Regards
Kunal Joshi
[-- Attachment #2: Type: text/html, Size: 5042 bytes --]
next prev parent reply other threads:[~2024-07-25 9:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 4:28 [PATCH i-g-t 0/2] New test to validate link-off between active regions (LOBF) Jeevan B
2024-07-23 4:28 ` [PATCH i-g-t 1/2] lib/igt_kms: Added library functions for LOBF status Jeevan B
2024-07-23 4:28 ` [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Jeevan B
2024-07-23 11:47 ` Modem, Bhanuprakash
2024-07-25 9:11 ` Joshi, Kunal1 [this message]
2024-07-29 8:49 ` [i-g-t,2/2] " Manna, Animesh
2024-07-23 6:27 ` ✓ CI.xeBAT: success for New test to validate link-off between active regions (LOBF) (rev3) Patchwork
2024-07-23 6:37 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-23 7:38 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-23 16:30 ` ✓ Fi.CI.IGT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-07-22 7:50 [PATCH i-g-t 2/2] tests/kms_vrr: Add new test to validate LOBF Jeevan B
2024-07-22 9:17 ` [i-g-t,2/2] " Joshi, Kunal1
2024-07-23 3:58 ` B, Jeevan
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=194ccdf6-001f-4e98-8518-aefe70c92510@intel.com \
--to=kunal1.joshi@intel.com \
--cc=animesh.manna@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@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