Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] igt/pm_rpm: Ignore modesets for basic tests with no KMS
@ 2018-10-05  8:05 Chris Wilson
  2018-10-15 21:45 ` Souza, Jose
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2018-10-05  8:05 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx

If KMS is not available, we cannot simply turn on an output and expect
that to wake the device up. As such we have to ignore that part of the
basic subtest and simply proclaim victory if the device is able to
sleep!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rpm.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 7488efd7..731c9cf6 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -777,7 +777,8 @@ static void basic_subtest(void)
 {
 	disable_all_screens_and_wait(&ms_data);
 
-	enable_one_screen_and_wait(&ms_data);
+	if (ms_data.res)
+		enable_one_screen_and_wait(&ms_data);
 }
 
 static void pc8_residency_subtest(void)
@@ -1405,8 +1406,10 @@ static void pci_d3_state_subtest(void)
 	disable_all_screens_and_wait(&ms_data);
 	igt_assert(igt_wait(device_in_pci_d3(), 2000, 100));
 
-	enable_one_screen_and_wait(&ms_data);
-	igt_assert(!device_in_pci_d3());
+	if (ms_data.res) {
+		enable_one_screen_and_wait(&ms_data);
+		igt_assert(!device_in_pci_d3());
+	}
 }
 
 static void __attribute__((noreturn)) stay_subtest(void)
-- 
2.19.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH i-g-t] igt/pm_rpm: Ignore modesets for basic tests with no KMS
  2018-10-05  8:05 [PATCH i-g-t] igt/pm_rpm: Ignore modesets for basic tests with no KMS Chris Wilson
@ 2018-10-15 21:45 ` Souza, Jose
  0 siblings, 0 replies; 2+ messages in thread
From: Souza, Jose @ 2018-10-15 21:45 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org, chris@chris-wilson.co.uk
  Cc: intel-gfx@lists.freedesktop.org

On Fri, 2018-10-05 at 09:05 +0100, Chris Wilson wrote:
> If KMS is not available, we cannot simply turn on an output and
> expect
> that to wake the device up. As such we have to ignore that part of
> the
> basic subtest and simply proclaim victory if the device is able to
> sleep!

We could replace the 'turn on a screen' to submit some job batch to one
of the engines, this way we could test the waking path too when KMS is
disabled but for now it is better than skip the tests at all as you
said.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/pm_rpm.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 7488efd7..731c9cf6 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -777,7 +777,8 @@ static void basic_subtest(void)
>  {
>  	disable_all_screens_and_wait(&ms_data);
>  
> -	enable_one_screen_and_wait(&ms_data);
> +	if (ms_data.res)
> +		enable_one_screen_and_wait(&ms_data);
>  }
>  
>  static void pc8_residency_subtest(void)
> @@ -1405,8 +1406,10 @@ static void pci_d3_state_subtest(void)
>  	disable_all_screens_and_wait(&ms_data);
>  	igt_assert(igt_wait(device_in_pci_d3(), 2000, 100));
>  
> -	enable_one_screen_and_wait(&ms_data);
> -	igt_assert(!device_in_pci_d3());
> +	if (ms_data.res) {
> +		enable_one_screen_and_wait(&ms_data);
> +		igt_assert(!device_in_pci_d3());
> +	}
>  }
>  
>  static void __attribute__((noreturn)) stay_subtest(void)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-15 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-05  8:05 [PATCH i-g-t] igt/pm_rpm: Ignore modesets for basic tests with no KMS Chris Wilson
2018-10-15 21:45 ` Souza, Jose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox