* [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-22 20:35 [PATCH i-g-t 1/4] tests/kms_pipe_crc_basic: Skip invalid pipe/port combos ville.syrjala
@ 2015-10-22 20:35 ` ville.syrjala
2015-10-22 23:05 ` Daniel Vetter
2015-10-23 19:39 ` Jesse Barnes
2015-10-22 20:35 ` [PATCH i-g-t 3/4] tests/kms_flip: Improve the accuracy of out frame time calculation ville.syrjala
2015-10-22 20:35 ` [PATCH i-g-t 4/4] tests/kms_flip: Dump the timestamps, counters, etc. with higher debug levels ville.syrjala
2 siblings, 2 replies; 11+ messages in thread
From: ville.syrjala @ 2015-10-22 20:35 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Do a dry run with rtcwake first to determine if the system even supports
the intended suspend state. If not, skip the test.
Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_aux.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 04ca25b..f3c76ae 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
* seems to fare better. We need to investigate what's going on. */
igt_skip_on_simulation();
+ /* skip if system doesn't support suspend-to-mem */
+ igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
+
ret = system("rtcwake -s 30 -m mem");
igt_assert_f(ret == 0,
"This failure means that something is wrong with the "
@@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
* seems to fare better. We need to investigate what's going on. */
igt_skip_on_simulation();
+ /* skip if system doesn't support suspend-to-disk */
+ igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
+
/* The timeout might need to be adjusted if hibernation takes too long
* or if we have to wait excessively long before resume
*/
--
2.4.9
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-22 20:35 ` [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them ville.syrjala
@ 2015-10-22 23:05 ` Daniel Vetter
2015-10-23 19:39 ` Jesse Barnes
1 sibling, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2015-10-22 23:05 UTC (permalink / raw)
To: Syrjala, Ville; +Cc: intel-gfx
On Thu, Oct 22, 2015 at 10:35 PM, <ville.syrjala@linux.intel.com> wrote:
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 04ca25b..f3c76ae 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
> * seems to fare better. We need to investigate what's going on. */
> igt_skip_on_simulation();
>
> + /* skip if system doesn't support suspend-to-mem */
> + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
For these systems we should instead test the "freeze" mode at least.
Or add a pile of new testcases for that one specifically, since we
currently have 0 test coverage. Should be a basic/BAT one I guess.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-22 20:35 ` [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them ville.syrjala
2015-10-22 23:05 ` Daniel Vetter
@ 2015-10-23 19:39 ` Jesse Barnes
2015-10-27 6:58 ` David Weinehall
1 sibling, 1 reply; 11+ messages in thread
From: Jesse Barnes @ 2015-10-23 19:39 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
On 10/22/2015 01:35 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Do a dry run with rtcwake first to determine if the system even supports
> the intended suspend state. If not, skip the test.
>
> Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> lib/igt_aux.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 04ca25b..f3c76ae 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
> * seems to fare better. We need to investigate what's going on. */
> igt_skip_on_simulation();
>
> + /* skip if system doesn't support suspend-to-mem */
> + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
> +
> ret = system("rtcwake -s 30 -m mem");
> igt_assert_f(ret == 0,
> "This failure means that something is wrong with the "
> @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
> * seems to fare better. We need to investigate what's going on. */
> igt_skip_on_simulation();
>
> + /* skip if system doesn't support suspend-to-disk */
> + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
> +
> /* The timeout might need to be adjusted if hibernation takes too long
> * or if we have to wait excessively long before resume
> */
>
Are there reliable alternatives to the rtcwake alarm? Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)?
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-23 19:39 ` Jesse Barnes
@ 2015-10-27 6:58 ` David Weinehall
2015-10-27 17:02 ` Jesse Barnes
2015-10-27 17:29 ` Ville Syrjälä
0 siblings, 2 replies; 11+ messages in thread
From: David Weinehall @ 2015-10-27 6:58 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx
On Fri, Oct 23, 2015 at 12:39:31PM -0700, Jesse Barnes wrote:
> On 10/22/2015 01:35 PM, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Do a dry run with rtcwake first to determine if the system even supports
> > the intended suspend state. If not, skip the test.
> >
> > Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > lib/igt_aux.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > index 04ca25b..f3c76ae 100644
> > --- a/lib/igt_aux.c
> > +++ b/lib/igt_aux.c
> > @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
> > * seems to fare better. We need to investigate what's going on. */
> > igt_skip_on_simulation();
> >
> > + /* skip if system doesn't support suspend-to-mem */
> > + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
> > +
> > ret = system("rtcwake -s 30 -m mem");
> > igt_assert_f(ret == 0,
> > "This failure means that something is wrong with the "
> > @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
> > * seems to fare better. We need to investigate what's going on. */
> > igt_skip_on_simulation();
> >
> > + /* skip if system doesn't support suspend-to-disk */
> > + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
> > +
> > /* The timeout might need to be adjusted if hibernation takes too long
> > * or if we have to wait excessively long before resume
> > */
> >
>
> Are there reliable alternatives to the rtcwake alarm?
> Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)?
Depending on what the hardware supports, for hibernate to disk there's ipmi power-on.
ipmi-power -h $hostname --stat will show the status of the machine,
ipmi-power -h $hostname --on will power it on.
Maybe wake-on-lan could be an option too?
Kind regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-27 6:58 ` David Weinehall
@ 2015-10-27 17:02 ` Jesse Barnes
2015-10-28 9:08 ` David Weinehall
2015-10-27 17:29 ` Ville Syrjälä
1 sibling, 1 reply; 11+ messages in thread
From: Jesse Barnes @ 2015-10-27 17:02 UTC (permalink / raw)
To: ville.syrjala, intel-gfx
On 10/26/2015 11:58 PM, David Weinehall wrote:
> On Fri, Oct 23, 2015 at 12:39:31PM -0700, Jesse Barnes wrote:
>> On 10/22/2015 01:35 PM, ville.syrjala@linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> Do a dry run with rtcwake first to determine if the system even supports
>>> the intended suspend state. If not, skip the test.
>>>
>>> Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
>>>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> ---
>>> lib/igt_aux.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
>>> index 04ca25b..f3c76ae 100644
>>> --- a/lib/igt_aux.c
>>> +++ b/lib/igt_aux.c
>>> @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
>>> * seems to fare better. We need to investigate what's going on. */
>>> igt_skip_on_simulation();
>>>
>>> + /* skip if system doesn't support suspend-to-mem */
>>> + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
>>> +
>>> ret = system("rtcwake -s 30 -m mem");
>>> igt_assert_f(ret == 0,
>>> "This failure means that something is wrong with the "
>>> @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
>>> * seems to fare better. We need to investigate what's going on. */
>>> igt_skip_on_simulation();
>>>
>>> + /* skip if system doesn't support suspend-to-disk */
>>> + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
>>> +
>>> /* The timeout might need to be adjusted if hibernation takes too long
>>> * or if we have to wait excessively long before resume
>>> */
>>>
>>
>> Are there reliable alternatives to the rtcwake alarm?
>> Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)?
>
> Depending on what the hardware supports, for hibernate to disk there's ipmi power-on.
>
> ipmi-power -h $hostname --stat will show the status of the machine,
> ipmi-power -h $hostname --on will power it on.
>
> Maybe wake-on-lan could be an option too?
If there's some way to automate these into the tests, that would be
ideal, otherwise including them in the Jenkins setup for platforms that
don't have RTC wake would be good so we can get full test coverage.
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-27 17:02 ` Jesse Barnes
@ 2015-10-28 9:08 ` David Weinehall
0 siblings, 0 replies; 11+ messages in thread
From: David Weinehall @ 2015-10-28 9:08 UTC (permalink / raw)
To: Jesse Barnes; +Cc: intel-gfx
On Tue, Oct 27, 2015 at 10:02:09AM -0700, Jesse Barnes wrote:
> > Depending on what the hardware supports, for hibernate to disk there's ipmi power-on.
> >
> > ipmi-power -h $hostname --stat will show the status of the machine,
> > ipmi-power -h $hostname --on will power it on.
> >
> > Maybe wake-on-lan could be an option too?
>
> If there's some way to automate these into the tests, that would be
> ideal, otherwise including them in the Jenkins setup for platforms that
> don't have RTC wake would be good so we can get full test coverage.
I don't think it can buy us full coverage; there are embedded devices
that lack RTC, and it's rather rare that they have IPMI support
(dunno if they typically have wol support).
Devices that have USB host mode could possibly be wakened by simulating
an USB HID-device, at least for devices that can be configured to wake
on keypress.
Other than that though, guess the options are either to hardwire the
devices to wake on power-on and do hard power-cycle using a fake-battery
(if testing battery powered devices) or a remote controlled power
socket.
Regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-27 6:58 ` David Weinehall
2015-10-27 17:02 ` Jesse Barnes
@ 2015-10-27 17:29 ` Ville Syrjälä
2015-10-28 9:10 ` David Weinehall
1 sibling, 1 reply; 11+ messages in thread
From: Ville Syrjälä @ 2015-10-27 17:29 UTC (permalink / raw)
To: Jesse Barnes, intel-gfx
On Tue, Oct 27, 2015 at 08:58:17AM +0200, David Weinehall wrote:
> On Fri, Oct 23, 2015 at 12:39:31PM -0700, Jesse Barnes wrote:
> > On 10/22/2015 01:35 PM, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Do a dry run with rtcwake first to determine if the system even supports
> > > the intended suspend state. If not, skip the test.
> > >
> > > Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > lib/igt_aux.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > index 04ca25b..f3c76ae 100644
> > > --- a/lib/igt_aux.c
> > > +++ b/lib/igt_aux.c
> > > @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
> > > * seems to fare better. We need to investigate what's going on. */
> > > igt_skip_on_simulation();
> > >
> > > + /* skip if system doesn't support suspend-to-mem */
> > > + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
> > > +
> > > ret = system("rtcwake -s 30 -m mem");
> > > igt_assert_f(ret == 0,
> > > "This failure means that something is wrong with the "
> > > @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
> > > * seems to fare better. We need to investigate what's going on. */
> > > igt_skip_on_simulation();
> > >
> > > + /* skip if system doesn't support suspend-to-disk */
> > > + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
> > > +
> > > /* The timeout might need to be adjusted if hibernation takes too long
> > > * or if we have to wait excessively long before resume
> > > */
> > >
> >
> > Are there reliable alternatives to the rtcwake alarm?
> > Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)?
>
> Depending on what the hardware supports, for hibernate to disk there's ipmi power-on.
>
> ipmi-power -h $hostname --stat will show the status of the machine,
> ipmi-power -h $hostname --on will power it on.
I would have expected to see IPMI only on server platforms. Has it
become more widespread at some point?
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them
2015-10-27 17:29 ` Ville Syrjälä
@ 2015-10-28 9:10 ` David Weinehall
0 siblings, 0 replies; 11+ messages in thread
From: David Weinehall @ 2015-10-28 9:10 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Tue, Oct 27, 2015 at 07:29:39PM +0200, Ville Syrjälä wrote:
> On Tue, Oct 27, 2015 at 08:58:17AM +0200, David Weinehall wrote:
> > On Fri, Oct 23, 2015 at 12:39:31PM -0700, Jesse Barnes wrote:
> > > On 10/22/2015 01:35 PM, ville.syrjala@linux.intel.com wrote:
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > Do a dry run with rtcwake first to determine if the system even supports
> > > > the intended suspend state. If not, skip the test.
> > > >
> > > > Fixes a bunch of stuff on my BYT FFRD8 that doesn't support S3.
> > > >
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > > lib/igt_aux.c | 6 ++++++
> > > > 1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> > > > index 04ca25b..f3c76ae 100644
> > > > --- a/lib/igt_aux.c
> > > > +++ b/lib/igt_aux.c
> > > > @@ -357,6 +357,9 @@ void igt_system_suspend_autoresume(void)
> > > > * seems to fare better. We need to investigate what's going on. */
> > > > igt_skip_on_simulation();
> > > >
> > > > + /* skip if system doesn't support suspend-to-mem */
> > > > + igt_skip_on(system("rtcwake -n -s 30 -m mem") != 0);
> > > > +
> > > > ret = system("rtcwake -s 30 -m mem");
> > > > igt_assert_f(ret == 0,
> > > > "This failure means that something is wrong with the "
> > > > @@ -384,6 +387,9 @@ void igt_system_hibernate_autoresume(void)
> > > > * seems to fare better. We need to investigate what's going on. */
> > > > igt_skip_on_simulation();
> > > >
> > > > + /* skip if system doesn't support suspend-to-disk */
> > > > + igt_skip_on(system("rtcwake -n -s 90 -m disk") != 0);
> > > > +
> > > > /* The timeout might need to be adjusted if hibernation takes too long
> > > > * or if we have to wait excessively long before resume
> > > > */
> > > >
> > >
> > > Are there reliable alternatives to the rtcwake alarm?
> > > Maybe some AMT/MEI wakeup event or some ACPI clock thing (handwaving pretty hard here)?
> >
> > Depending on what the hardware supports, for hibernate to disk there's ipmi power-on.
> >
> > ipmi-power -h $hostname --stat will show the status of the machine,
> > ipmi-power -h $hostname --on will power it on.
>
> I would have expected to see IPMI only on server platforms. Has it
> become more widespread at some point?
I think it's become slightly more common, but you're correct that it's
rare (probably almost non-existent) for things like tablets, phones,
etc.
Regards, David
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t 3/4] tests/kms_flip: Improve the accuracy of out frame time calculation
2015-10-22 20:35 [PATCH i-g-t 1/4] tests/kms_pipe_crc_basic: Skip invalid pipe/port combos ville.syrjala
2015-10-22 20:35 ` [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them ville.syrjala
@ 2015-10-22 20:35 ` ville.syrjala
2015-10-22 20:35 ` [PATCH i-g-t 4/4] tests/kms_flip: Dump the timestamps, counters, etc. with higher debug levels ville.syrjala
2 siblings, 0 replies; 11+ messages in thread
From: ville.syrjala @ 2015-10-22 20:35 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Don't use the rounded vrefresh info to predict the frame duration.
Instead calculate if from the clock.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_flip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index a139d40..48e9062 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -547,7 +547,7 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
static double frame_time(struct test_output *o)
{
- return 1000.0 * 1000.0 / o->kmode[0].vrefresh;
+ return 1000.0 * o->kmode[0].htotal * o->kmode[0].vtotal / o->kmode[0].clock;
}
static void *vblank_wait_thread_func(void *data)
@@ -1209,7 +1209,7 @@ static void check_final_state(struct test_output *o, struct event_state *es,
int count = es->count;
count *= o->seq_step;
- expected = elapsed * o->kmode[0].vrefresh / (1000 * 1000);
+ expected = elapsed / frame_time(o);
igt_assert_f(count >= expected * 99/100 && count <= expected * 101/100,
"dropped frames, expected %d, counted %d, encoder type %d\n",
expected, count, o->kencoder[0]->encoder_type);
--
2.4.9
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH i-g-t 4/4] tests/kms_flip: Dump the timestamps, counters, etc. with higher debug levels
2015-10-22 20:35 [PATCH i-g-t 1/4] tests/kms_pipe_crc_basic: Skip invalid pipe/port combos ville.syrjala
2015-10-22 20:35 ` [PATCH i-g-t 2/4] lib: Skip suspend/hibernate tests if the system doesn't support them ville.syrjala
2015-10-22 20:35 ` [PATCH i-g-t 3/4] tests/kms_flip: Improve the accuracy of out frame time calculation ville.syrjala
@ 2015-10-22 20:35 ` ville.syrjala
2 siblings, 0 replies; 11+ messages in thread
From: ville.syrjala @ 2015-10-22 20:35 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_flip.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 48e9062..e1b5856 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -129,6 +129,28 @@ struct event_state {
int seq_step;
};
+static void dump_event_state(const struct event_state *es)
+{
+ igt_debug("name = %s\n"
+ "last_ts = %lu.%lu usec\n"
+ "last_received_ts = %lu.%lu usec\n"
+ "last_seq = %u\n"
+ "current_ts = %lu.%lu usec\n"
+ "current_received_ts = %lu.%lu usec\n"
+ "current_seq = %u\n"
+ "count = %u\n"
+ "seq_step = %d\n",
+ es->name,
+ es->last_ts.tv_sec, es->last_ts.tv_usec,
+ es->last_received_ts.tv_sec, es->last_received_ts.tv_usec,
+ es->last_seq,
+ es->current_ts.tv_sec, es->current_ts.tv_usec,
+ es->current_received_ts.tv_sec, es->current_received_ts.tv_usec,
+ es->current_seq,
+ es->count,
+ es->seq_step);
+}
+
struct test_output {
int mode_valid;
drmModeModeInfo kmode[4];
@@ -616,6 +638,8 @@ static void check_state(struct test_output *o, struct event_state *es)
struct timeval diff;
double usec_interflip;
+ dump_event_state(es);
+
timersub(&es->current_ts, &es->current_received_ts, &diff);
if (!analog_tv_connector(o)) {
igt_assert_f(diff.tv_sec < 0 || (diff.tv_sec == 0 && diff.tv_usec <= 2000),
--
2.4.9
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread