All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Saarinen, Jani" <jani.saarinen@intel.com>
To: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>,
	Manasi Navare <navaremanasi@chromium.org>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Drew Davenport" <ddavenport@chromium.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Sean Paul" <seanpaul@chromium.org>
Subject: RE: [PATCH v3 1/2] tests/kms_vrr: Add a subtest for seamless modeset to a virtual LRR mode
Date: Fri, 26 Apr 2024 07:48:36 +0000	[thread overview]
Message-ID: <DM8PR11MB565517E06CDBA9B389BA86BCE0162@DM8PR11MB5655.namprd11.prod.outlook.com> (raw)
In-Reply-To: <682dccc4-c788-4bfd-b8ef-b24d60b488d6@intel.com>

Hi, 
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Modem,
> Bhanuprakash
> Sent: Friday, 26 April 2024 6.44
> To: Manasi Navare <navaremanasi@chromium.org>
> Cc: igt-dev@lists.freedesktop.org; Drew Davenport
> <ddavenport@chromium.org>; Ville Syrjälä <ville.syrjala@linux.intel.com>;
> Sean Paul <seanpaul@chromium.org>
> Subject: Re: [PATCH v3 1/2] tests/kms_vrr: Add a subtest for seamless
> modeset to a virtual LRR mode
> 
> Hi Manasi,
> 
> On 25-04-2024 08:50 pm, Manasi Navare wrote:
> > Hi Bhanu,
> >
> > Thanks for the review.
> > This is not specific to edp, it applies to all connectors.
> >
> > If the BAT results look okay and I have your r-b, could we get this merged?
Did you look those. 

> 
> Looks, BAT results are not OK to me.
Right. To me looks so too. 

> 
> The newly added test is getting skip on VRR configs:
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_11065/bat-
> all.html?testfilter=kms_vrr&hosts=bat-adlp-6%7Cbat-adlp-9%7Cbat-rpls-
> 4%7Cbat-adls-6
> 
> - Bhanu
> 
> >
> > Regards
> > Manasi
> >
> > On Thu, Apr 25, 2024 at 12:39 AM Modem, Bhanuprakash
> > <bhanuprakash.modem@intel.com> wrote:
> >>
> >> Hi Manasi,
> >>
> >> On 25-04-2024 01:43 am, Manasi Navare wrote:
> >>> This subtest validates LRR fastset functionality by testing seamless
> >>> switching without full modeset to any of the virtual LRR mode within VRR
> range.
> >>> Here we start from highest refresh rate mode and then switch to
> >>> virtual LRR modes in the steps of 10Hz within the VRR range.
> >>>
> >>> This is used to test the LRR fastset functionality of the driver.
> >>>
> >>> v5:
> >>> - Pass a reference to flip_and_measure (bhanu)
> >>> - Add a new line between between declaration and code logic
> >>>
> >>> v4:
> >>> - Change the test name to align with drrs/vrr tests (Bhanu)
> >>> - Fix some build warnings due to rebase
> >>> - Use a local virtual_mode variable
> >>>
> >>> v3:
> >>> - Fix build error due to rebase (Manasi)
> >>>
> >>> Cc: Drew Davenport <ddavenport@chromium.org>
> >>> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> >>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>> Cc: Sean Paul <seanpaul@chromium.org>
> >>> Signed-off-by: Manasi Navare <navaremanasi@chromium.org>
> >>> ---
> >>>    tests/kms_vrr.c | 73
> ++++++++++++++++++++++++++++++++++++++++++++++---
> >>>    1 file changed, 69 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c index
> >>> 15c62b34b..7f64d6806 100644
> >>> --- a/tests/kms_vrr.c
> >>> +++ b/tests/kms_vrr.c
> >>> @@ -66,6 +66,11 @@
> >>>     * Description: Test to switch RR seamlessly without modeset.
> >>>     * Functionality: adaptive_sync, drrs
> >>>     *
> >>> + * SUBTEST: seamless-rr-switch-virtual
> >>> + * Description: Test to create a Virtual Mode in VRR range and switch to
> it
> >>> + *           without a full modeset.
> >>> + * Functionality: LRR
> >>> + *
> >>>     * SUBTEST: max-min
> >>>     * Description: Oscillates between highest and lowest refresh each
> frame for
> >>>     *              manual flicker profiling
> >>> @@ -89,9 +94,10 @@ enum {
> >>>        TEST_FLIPLINE = 1 << 3,
> >>>        TEST_SEAMLESS_VRR = 1 << 4,
> >>>        TEST_SEAMLESS_DRRS = 1 << 5,
> >>> -     TEST_FASTSET = 1 << 6,
> >>> -     TEST_MAXMIN = 1 << 7,
> >>> -     TEST_NEGATIVE = 1 << 8,
> >>> +     TEST_SEAMLESS_VIRTUAL_RR = 1 << 6,
> >>> +     TEST_FASTSET = 1 << 7,
> >>> +     TEST_MAXMIN = 1 << 8,
> >>> +     TEST_NEGATIVE = 1 << 9,
> >>>    };
> >>>
> >>>    enum {
> >>> @@ -214,6 +220,18 @@ low_rr_mode_with_same_res(igt_output_t
> *output, unsigned int vrr_min)
> >>>        return mode;
> >>>    }
> >>>
> >>> +static drmModeModeInfo
> >>> +virtual_rr_vrr_range_mode(igt_output_t *output, unsigned int
> >>> +virtual_refresh_rate) {
> >>> +     drmModeModeInfo mode = *igt_output_get_mode(output);
> >>> +     uint64_t clock_hz = mode.clock * 1000;
> >>> +
> >>> +     mode.vtotal = clock_hz / (mode.htotal * virtual_refresh_rate);
> >>> +     mode.vrefresh = virtual_refresh_rate;
> >>> +
> >>> +     return mode;
> >>> +}
> >>> +
> >>>    /* Read min and max vrr range from the connector debugfs. */
> >>>    static range_t
> >>>    get_vrr_range(data_t *data, igt_output_t *output) @@ -641,6
> >>> +659,49 @@ test_seamless_rr_basic(data_t *data, enum pipe pipe,
> igt_output_t *output, uint3
> >>>                     vrr ? "on" : "off", vrr ? "not reached" : "exceeded", result);
> >>>    }
> >>>
> >>> +static void
> >>> +test_seamless_virtual_rr_basic(data_t *data, enum pipe pipe,
> >>> +igt_output_t *output, uint32_t flags) {
> >>> +     uint32_t result;
> >>> +     unsigned int vrefresh;
> >>> +     uint64_t rate[] = {0};
> >>> +
> >>> +     igt_info("Use HIGH_RR Mode as default\n");
> >>> +     kmstest_dump_mode(&data->switch_modes[HIGH_RR_MODE]);
> >>> +
> >>> +     prepare_test(data, output, pipe);
> >>> +     rate[0] =
> >>> + rate_from_refresh(data->switch_modes[HIGH_RR_MODE].vrefresh);
> >>> +
> >>> +     /*
> >>> +      * Sink with DRR and VRR can be in downclock mode so
> >>> +      * switch to highest refresh rate mode.
> >>> +      */
> >>> +     igt_output_override_mode(output, &data-
> >switch_modes[HIGH_RR_MODE]);
> >>> +     igt_assert(igt_display_try_commit_atomic(&data->display,
> >>> + DRM_MODE_PAGE_FLIP_EVENT, NULL) == 0);
> >>> +
> >>> +     result = flip_and_measure(data, output, pipe, rate, 1,
> TEST_DURATION_NS);
> >>> +     igt_assert_f(result > 75,
> >>> +                  "Refresh rate (%u Hz) %"PRIu64"ns: Target threshold not
> reached, result was %u%%\n",
> >>> +                  data->switch_modes[HIGH_RR_MODE].vrefresh,
> >>> + rate[0], result);
> >>> +
> >>> +     /* Switch to Virtual RR */
> >>> +     for (vrefresh = data->range.min + 10; vrefresh < data->range.max;
> vrefresh += 10) {
> >>> +             drmModeModeInfo virtual_mode =
> >>> + virtual_rr_vrr_range_mode(output, vrefresh);
> >>> +
> >>> +             igt_info("Requesting Virtual Mode with Refresh Rate (%u Hz): \n",
> vrefresh);
> >>> +             kmstest_dump_mode(&virtual_mode);
> >>> +
> >>> +             igt_output_override_mode(output, &virtual_mode);
> >>> +
> >>> + igt_assert(igt_display_try_commit_atomic(&data->display, 0, NULL)
> >>> + == 0);
> >>> +
> >>> +             rate[0] = rate_from_refresh(vrefresh);
> >>> +             result = flip_and_measure(data, output, pipe, rate, 1,
> TEST_DURATION_NS);
> >>> +             igt_assert_f(result > 75,
> >>> +                          "Refresh rate (%u Hz) %"PRIu64"ns: Target threshold not
> reached, result was %u%%\n",
> >>> +                          vrefresh, rate[0], result);
> >>> +     }
> >>> +}
> >>> +
> >>>    static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t
> *output)
> >>>    {
> >>>        if (vrr_capable(output))
> >>> @@ -686,7 +747,7 @@ static bool output_constraint(data_t *data,
> igt_output_t *output, uint32_t flags
> >>>        igt_output_override_mode(output,
> >>> &data->switch_modes[HIGH_RR_MODE]);
> >>>
> >>>        /* Search for a low refresh rate mode. */
> >>> -     if (!(flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS)))
> >>> +     if (!(flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS |
> >>> + TEST_SEAMLESS_VIRTUAL_RR)))
> >>
> >> Does this virtual RR applicable to eDP only or supports other
> >> connector types too? If it is eDP specific [*], then we must add a check for
> that.
> >>
> >> [*]:
> >> https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/kms_vrr.c#n
> >> 660
> >>
> >> With above comment addressed, this patch is
> >> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> >>
> >> - Bhanu
> >>
> >>>                return true;
> >>>
> >>>        data->switch_modes[LOW_RR_MODE] =
> >>> low_rr_mode_with_same_res(output, data->range.min); @@ -841,6
> +902,10 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data)
> >>>                             "between flip timestamps converges to the requested
> rate");
> >>>                igt_subtest_with_dynamic("flip-basic-fastset")
> >>>                        run_vrr_test(&data, test_basic,
> >>> TEST_FASTSET);
> >>> +
> >>> +             igt_describe("Test to switch to any custom virtual mode in VRR
> range without modeset.");
> >>> +             igt_subtest_with_dynamic("seamless-rr-switch-virtual")
> >>> +                     run_vrr_test(&data,
> >>> + test_seamless_virtual_rr_basic, TEST_SEAMLESS_VIRTUAL_RR);
> >>>        }
> >>>
> >>>        igt_fixture {

  reply	other threads:[~2024-04-26  7:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24 20:13 [PATCH v3 1/2] tests/kms_vrr: Add a subtest for seamless modeset to a virtual LRR mode Manasi Navare
2024-04-24 20:13 ` [PATCH v3 2/2] HAX: run kms_vrr tests in BAT Manasi Navare
2024-04-24 21:14 ` ✓ CI.xeBAT: success for series starting with [v3,1/2] tests/kms_vrr: Add a subtest for seamless modeset to a virtual LRR mode Patchwork
2024-04-24 21:20 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-04-25  7:39 ` [PATCH v3 1/2] " Modem, Bhanuprakash
2024-04-25  7:42   ` Saarinen, Jani
2024-04-25 15:20   ` Manasi Navare
2024-04-26  3:44     ` Modem, Bhanuprakash
2024-04-26  7:48       ` Saarinen, Jani [this message]
2024-04-26 19:24         ` Manasi Navare
2024-04-26 19:42           ` Saarinen, Jani
2024-04-26 19:46             ` Manasi Navare
2024-04-26 20:03               ` Saarinen, Jani
2024-04-30 17:03                 ` Manasi Navare
2024-05-01  7:32                   ` Manasi Navare
2024-05-01  9:27                     ` Saarinen, Jani
2024-05-06 19:00                       ` Manasi Navare
2024-05-07 13:10                         ` Illipilli, TejasreeX
2024-05-07 13:12                           ` Saarinen, Jani
2024-05-07 16:51                             ` Manasi Navare
2024-04-25 13:55 ` ✗ CI.xeFULL: failure for series starting with [v3,1/2] " Patchwork
2024-04-26 20:57 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] tests/kms_vrr: Add a subtest for seamless modeset to a virtual LRR mode (rev2) Patchwork
2024-04-26 20:59 ` ✓ CI.xeBAT: success " Patchwork
2024-04-27  0:23 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-07 19:51 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/2] tests/kms_vrr: Add a subtest for seamless modeset to a virtual LRR mode (rev3) Patchwork
2024-05-08  6:33   ` Saarinen, Jani
2024-05-09 16:23     ` Manasi Navare
2024-05-10  7:35       ` Saarinen, Jani
2024-05-10  9:11         ` Saarinen, Jani
2024-05-10 10:59       ` Golani, Mitulkumar Ajitkumar
2024-05-10 12:32         ` Saarinen, Jani
2024-05-13 19:05           ` Manasi Navare
2024-05-17 13:09             ` Juha-Pekka Heikkila
2024-05-07 20:31 ` ✓ CI.xeBAT: success " Patchwork
2024-05-08  4:54 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-10 10:48 ` ✗ Fi.CI.BAT: " Patchwork
2024-05-10 11:03 ` Patchwork
2024-05-10 11:45 ` ✓ Fi.CI.BAT: success " Patchwork
2024-05-11  1:11 ` ✗ Fi.CI.IGT: failure " 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=DM8PR11MB565517E06CDBA9B389BA86BCE0162@DM8PR11MB5655.namprd11.prod.outlook.com \
    --to=jani.saarinen@intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=ddavenport@chromium.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=navaremanasi@chromium.org \
    --cc=seanpaul@chromium.org \
    --cc=ville.syrjala@linux.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 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.