From: Imre Deak <imre.deak@intel.com>
To: "Sharma, Swati2" <swati2.sharma@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 3/3] tests/i915/kms_flip_tiling: Fix pageflip timeout for low vrefresh modes
Date: Mon, 18 Nov 2024 13:31:19 +0200 [thread overview]
Message-ID: <Zzslh97tC5c-OS5N@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <edc62da3-6ef7-4c45-ab88-a23bfe1b0896@intel.com>
On Mon, Nov 18, 2024 at 01:31:34PM +0530, Sharma, Swati2 wrote:
> Imre, Can you check if your patch is fixing following gitlab issue
>
> https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1491
>
> This is MST config re-lnl-4 with 4K@30 mode
>
> https://intel-gfx-ci.01.org/tree/intel-xe/xe-2244-5b1f614ccf1008e7aee531bf76bb639802e0df88/re-lnl-4/igt@kms_flip_tiling@flip-change-tiling.html
>
> If so, add closes tag.
Yes, it looks like the same issue.
> Anyways, patch LGTM
>
> Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Thanks for thet review, patchset is pushed now adding the above closes
tag. The CI failures are unrelated, since all of those happen in a
different test than igt/kms_flip_tiling (in which these changes have no
effect).
>
> On 15-11-2024 10:41 pm, Imre Deak wrote:
>
> > On Fri, Nov 15, 2024 at 05:14:22PM +0530, Sharma, Swati2 wrote:
> > > Hi Imre,
> > >
> > > Do we have some gitlab issue associated with this fix?
> > Not sure if there is, the problem needs a mode with a vrefresh rate <
> > 60Hz (to be added to CI for an MST config at least).
> >
> > > On 22-10-2024 09:23 pm, Imre Deak wrote:
> > > > The current fixed 50 ms timeout for pageflip completion is not long
> > > > enough for low vrefresh modes. In general the timeout should account for
> > > > one frame for the flip itself + one frame for vblank waiting due to FBC
> > > > invalidation + a fixed amount for scheduling overhead delivering the
> > > > completion event to userspace. For the usual 60Hz modes the 50 ms
> > > > timeout worked ok based on the above (2 * 17 ms + 16 ms), but didn't
> > > > work for 30 Hz modes (the minimum timeout for those being ~67 ms).
> > > >
> > > > Based on the above use a timeout length of 2 * mode specific frame
> > > > time + 20 ms fixed scheduling delay.
> > > >
> > > > Testcase: igt@kms_flip_tiling
> > > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > > ---
> > > > tests/intel/kms_flip_tiling.c | 14 +++++++++++++-
> > > > 1 file changed, 13 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/tests/intel/kms_flip_tiling.c b/tests/intel/kms_flip_tiling.c
> > > > index 3bf02564e..e937c2171 100644
> > > > --- a/tests/intel/kms_flip_tiling.c
> > > > +++ b/tests/intel/kms_flip_tiling.c
> > > > @@ -86,6 +86,18 @@ static int try_commit(igt_display_t *display)
> > > > COMMIT_ATOMIC : COMMIT_LEGACY);
> > > > }
> > > > +static uint64_t pageflip_timeout_us(drmModeModeInfo *mode)
> > > > +{
> > > > + uint64_t timeout_ns;
> > > > +
> > > > + /* 1 frame for flip + 1 frame for vblank wait due to FBC. */
> > > > + timeout_ns = igt_kms_frame_time_from_vrefresh(mode->vrefresh) * 2;
> > > > + /* 20 msec scheduling overhead. */
> > > > + timeout_ns += 20000000;
> > > > +
> > > > + return DIV_ROUND_UP(timeout_ns, 1000);
> > > > +}
> > > > +
> > > > static void
> > > > test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t modifier[2])
> > > > {
> > > > @@ -137,7 +149,7 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t mo
> > > > igt_require(ret == 0);
> > > > data->flipevent_in_queue = true;
> > > > - kmstest_wait_for_pageflip(data->drm_fd);
> > > > + kmstest_wait_for_pageflip_timeout(data->drm_fd, pageflip_timeout_us(mode));
> > > > data->flipevent_in_queue = false;
> > > > /* Get a crc and compare with the reference. */
next prev parent reply other threads:[~2024-11-18 11:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 15:53 [PATCH i-g-t 0/3] tests/i915/kms_flip_tiling: Fix timeouts with low vrefresh modes Imre Deak
2024-10-22 15:53 ` [PATCH i-g-t 1/3] lib/igt_kms: Add igt_kms_frame_time_from_vrefresh() Imre Deak
2024-10-24 4:12 ` Srikanth V, NagaVenkata
2024-11-15 11:48 ` Sharma, Swati2
2024-10-22 15:53 ` [PATCH i-g-t 2/3] lib/igt_kms: Add kmstest_wait_for_pageflip_timeout() Imre Deak
2024-10-24 5:45 ` Srikanth V, NagaVenkata
2024-10-24 10:29 ` Imre Deak
2024-11-15 11:55 ` Sharma, Swati2
2024-10-22 15:53 ` [PATCH i-g-t 3/3] tests/i915/kms_flip_tiling: Fix pageflip timeout for low vrefresh modes Imre Deak
2024-11-15 11:44 ` Sharma, Swati2
2024-11-15 17:11 ` Imre Deak
2024-11-18 8:01 ` Sharma, Swati2
2024-11-18 11:31 ` Imre Deak [this message]
2024-10-22 18:56 ` ✓ Fi.CI.BAT: success for tests/i915/kms_flip_tiling: Fix timeouts with " Patchwork
2024-10-22 19:43 ` ✓ CI.xeBAT: " Patchwork
2024-10-23 1:14 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-23 2:49 ` ✗ Fi.CI.IGT: " 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=Zzslh97tC5c-OS5N@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@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.