public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Thasleem, Mohammed" <mohammed.thasleem@intel.com>
To: "Michał Grzelak" <michal.grzelak@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v8 6/6] tests/kms_flip: test suspend at most twice on SNB && BMG
Date: Thu, 26 Mar 2026 20:46:03 +0530	[thread overview]
Message-ID: <dc6e1af4-35dd-4a01-be7d-6dfe4b5d0af5@intel.com> (raw)
In-Reply-To: <17afd2fc-7994-2e40-02da-f7725c58ccc5@intel.com>


On 26-03-2026 02:58 pm, Michał Grzelak wrote:
> On Wed, 25 Mar 2026, Thasleem, Mohammed wrote:
>> On 09-03-2026 02:55 pm, Michał Grzelak wrote:
>>
>> gettime_us() on SNB and BMG does not return proper time after starting
>> suspend tests. This results in too many suspends issued before we hit
>> the duration_ms. Break the loop on second execution.
>>
>> Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
>> ---
>>  tests/kms_flip.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
>> index f17d027cc..3c5428ff0 100755
>> --- a/tests/kms_flip.c
>> +++ b/tests/kms_flip.c
>> @@ -1322,6 +1322,12 @@ static bool event_loop(struct test_output *o, 
>> unsigned duration_ms,
>>  {
>>      unsigned long start, end;
>>      int count = 0;
>> +    int devid;
-->Use "uint32_t" instead "int" as" intel_get_drm_devid" returns 
"uint32_t".
>> +    bool wa;
>> +
>> +    devid = intel_get_drm_devid(drm_fd);
>> +
>> +    wa = IS_SANDYBRIDGE(devid) || IS_BATTLEMAGE(devid);
>>
>> Why only two specific platforms?
>
> That I would also like to know. :)
> As it is described in the first sentence of the commit message, these
> two platforms have been reported by CI to encounter such issue. If it is
> not clear, I can update the commit message.
>
>> I think, platform specific wa not needed here, instead we can have 
>> generic execution for all,
>> which can work on all platforms. plz check.
>
> Since we are observing the issue only on those two platforms, I don't
> see how to work around it without specifying those two platforms,
> without changing the already present functionality.

I mean to say, use the below suggested code belwo instead using wa.

>
>>
>>
>>      start = gettime_us();
>>
>> @@ -1342,6 +1348,9 @@ static bool event_loop(struct test_output *o, 
>> unsigned duration_ms,
>>          if (count && (gettime_us() - start) / 1000 >= duration_ms)
>>              break;
>>
>> +        if (count && wa && o->flags & TEST_SUSPEND)
>>
>> if (count && wa && o->flags & TEST_SUSPEND) --> if (count && o->flags 
>> & TEST_SUSPEND)
>>
>> +            break;
>> +
>
> I am unsure of this approach. This will break the loop on second run on
> every suspend test, on every platform. While commit c75dcbdac51d
> ("tests/kms_flip: various improvements") says explicitly to do at least
> two rounds of tests, so it would change functionality on every platform.
> I can refactor the patch, but I would retain the WA. Can you provide
> some rationale for changing the functionality on non-affected platforms?

Thanks for exploring this. My suggestion was based on fact that 
clock_monotonic freezes during suspend,
which casue the duration check to never fire correctly  after 
suspend/resume cycle.
Instead adding pltform-specific WA for each new effected platform, I 
suggested a generic solution.

However, as per Daniel  vetter's commit c75dcbdac51d points intent is 
"at lease 2 rounds
always complite, as suspend tests were bailing after just 1 round and 
testing nothing".

I am okey with current WA approach and provided minor comment,
plz check  befrore next version.

>
> BR,
> Michał
>
>>          count++;
>>      }
>>
>>
>>
>>

  reply	other threads:[~2026-03-26 15:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09  9:25 [PATCH i-g-t v8 0/6] kms_flip: limit number of subtests run Michał Grzelak
2026-03-09  9:25 ` [PATCH i-g-t v8 1/6] tests/kms_flip: test suspend on one pair of pipes Michał Grzelak
2026-03-17  7:44   ` Thasleem, Mohammed
2026-03-09  9:25 ` [PATCH i-g-t v8 2/6] tests/kms_flip: run suspend tests on one pipe per output Michał Grzelak
2026-03-09  9:25 ` [PATCH i-g-t v8 3/6] tests/kms_flip: limit output pairs when testing suspend Michał Grzelak
2026-03-14 14:51   ` Thasleem, Mohammed
2026-03-09  9:25 ` [PATCH i-g-t v8 4/6] tests/kms_flip: limit number of outputs wrt suspend Michał Grzelak
2026-03-14 11:56   ` Thasleem, Mohammed
2026-03-25 23:39     ` Michał Grzelak
2026-03-09  9:25 ` [PATCH i-g-t v8 5/6] tests/kms_flip: staticize & remove unused global vars Michał Grzelak
2026-03-14 11:30   ` Thasleem, Mohammed
2026-03-09  9:25 ` [PATCH i-g-t v8 6/6] tests/kms_flip: test suspend at most twice on SNB && BMG Michał Grzelak
2026-03-25 10:30   ` Thasleem, Mohammed
2026-03-26  9:28     ` Michał Grzelak
2026-03-26 15:16       ` Thasleem, Mohammed [this message]
2026-03-09 14:14 ` ✓ Xe.CI.BAT: success for kms_flip: limit number of subtests run (rev10) Patchwork
2026-03-09 14:29 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-09 17:04 ` ✗ Xe.CI.FULL: " Patchwork
2026-03-10 20:53 ` ✓ Xe.CI.BAT: success for kms_flip: limit number of subtests run (rev11) Patchwork
2026-03-10 21:35 ` ✓ i915.CI.BAT: " Patchwork
2026-03-11 10:22 ` ✓ i915.CI.Full: " Patchwork
2026-03-11 15:06 ` ✓ Xe.CI.FULL: " 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=dc6e1af4-35dd-4a01-be7d-6dfe4b5d0af5@intel.com \
    --to=mohammed.thasleem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=michal.grzelak@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