[igt-dev] [PATCH i-g-t v3 2/2] tests/i915/i915_pm_rpm: modeset-pc8-residency-stress
Ramalingam C
ramalingam.c at intel.com
Wed Mar 27 12:32:36 UTC 2019
On 2019-03-27 at 15:25:23 +0530, Anshuman Gupta wrote:
> Introduced pc8_needs_screen_off flag in order to differentiate
> between HASWELL/BROADWELL and AT_LEAST_GEN9. GEN9 onwards
> PC8+ residency does't require display to be turned on.
>
> v3:Removed pc8_needs_screen_off from mode_set_data structure,
> made it global, aligning to has_pc8 and has_runtime_pm globals. [Ram]
> Made modeset_subtest() to tests PC8+ residency after enabling a screen,
> earlier it expects PC8+ residency to stop on HSW/BDW.
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> tests/i915/i915_pm_rpm.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index 7e0c370..55151e8 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -900,8 +900,12 @@ static void modeset_subtest(enum screen_type type, int rounds, int wait_flags)
> igt_require(enable_one_screen_with_type(&ms_data, type));
> if (wait_flags & WAIT_STATUS)
> igt_assert(wait_for_active());
> - if (wait_flags & WAIT_PC8_RES)
> - igt_assert(!pc8_plus_residency_changed(5));
> + if (wait_flags & WAIT_PC8_RES && pc8_needs_screen_off)
with assertion for pc8_needs_screen_off here, we will never hit below else!!.
-Ram
> + if (pc8_needs_screen_off)
> + igt_assert(!pc8_plus_residency_changed(5));
> + else
> + igt_assert(pc8_plus_residency_changed(5));
> +
> if (wait_flags & WAIT_EXTRA)
> sleep(5);
> }
> --
> 2.7.4
>
More information about the igt-dev
mailing list