[igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload
Imre Deak
imre.deak at intel.com
Tue Aug 14 14:11:49 UTC 2018
On Fri, Aug 10, 2018 at 08:01:16AM +0100, Chris Wilson wrote:
> It doesn't work right now and desperately needs to be fixed...
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
On both patches:
Reviewed-by: Imre Deak <imre.deak at intel.com>
> ---
> tests/intel-ci/fast-feedback.testlist | 1 +
> tests/pm_rpm.c | 28 ++++++++++++++++++++++++---
> 2 files changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
> index 1f3b95357..c625904d5 100644
> --- a/tests/intel-ci/fast-feedback.testlist
> +++ b/tests/intel-ci/fast-feedback.testlist
> @@ -272,3 +272,4 @@ igt at vgem_basic@unload
> igt at drv_module_reload@basic-reload
> igt at drv_module_reload@basic-no-display
> igt at drv_module_reload@basic-reload-inject
> +igt at pm_rpm@module-reload
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 1fbdda4ed..79cdf969a 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -692,7 +692,7 @@ static void setup_pc8(void)
> has_pc8 = true;
> }
>
> -static void setup_environment(void)
> +static bool setup_environment(void)
> {
> drm_fd = drm_open_driver_master(DRIVER_INTEL);
> debugfs = igt_debugfs_dir(drm_fd);
> @@ -710,7 +710,7 @@ static void setup_environment(void)
> igt_require(has_runtime_pm);
>
> disable_all_screens(&ms_data);
> - igt_require(wait_for_suspended());
> + return wait_for_suspended();
> }
>
> static void restore_environment(void)
> @@ -1905,7 +1905,7 @@ int main(int argc, char *argv[])
> * PC8+. We don't want bug reports from cases where the machine is just
> * not properly configured. */
> igt_fixture
> - setup_environment();
> + igt_require(setup_environment());
>
> if (stay)
> igt_subtest("stay")
> @@ -2026,5 +2026,27 @@ int main(int argc, char *argv[])
> igt_fixture
> teardown_environment();
>
> + igt_subtest("module-reload") {
> + igt_debug("Reload w/o display\n");
> + igt_i915_driver_unload();
> + igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
> +
> + igt_assert(setup_environment());
> + basic_subtest();
> + drm_resources_equal_subtest();
> + pci_d3_state_subtest();
> + teardown_environment();
> +
> + igt_debug("Reload as normal\n");
> + igt_i915_driver_unload();
> + igt_assert_eq(igt_i915_driver_load(NULL), 0);
> +
> + igt_assert(setup_environment());
> + basic_subtest();
> + drm_resources_equal_subtest();
> + pci_d3_state_subtest();
> + teardown_environment();
> + }
> +
> igt_exit();
> }
> --
> 2.18.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list