[Intel-gfx] [PATCH i-g-t 5/8] kms_frontbuffer_tracking: Add option to allow running tescases with PSR disabled.

Paulo Zanoni przanoni at gmail.com
Thu Nov 5 12:44:49 PST 2015


2015-11-05 16:53 GMT-02:00 Rodrigo Vivi <rodrigo.vivi at intel.com>:
> We need to be able to identify if the issue is feature related
> or caused by another bug.
>
> Also this feature allow users to have a visual feedback of what to
> expect when running the test case for real.

We currently have --no-status-check that can be used when you don't
want the enable/disable checks.

We also have the "nop" subtests that appear when you use --show-hidden
(I don't want to waste QA's time with these since they're just for
debugging purposes, that's why they are hidden). So if you want to
debug, for example, subtest psr-1p-primscrn-pri-indfb-draw-mmap-cpu,
you can just run:

sudo ./kms_frontbuffer_tracking --show-hidden --run-subtest
nop-1p-primscrn-pri-indfb-draw-mmap-cpu

(notice that there's a patch on the list proposing to replace the
--show-hidden with --all)

Do any of the solutions above solve the problem that made you write
this patch and patch 6? If not, why?

>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  tests/kms_frontbuffer_tracking.c | 18 +++++++++++++++---
>  1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 1cc1c9e..312c08e 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -238,6 +238,7 @@ struct {
>         bool fbc_check_last_action;
>         bool no_edp;
>         bool no_suspend;
> +       bool psr_disabled;
>         bool small_modes;
>         bool show_hidden;
>         int step;
> @@ -252,6 +253,7 @@ struct {
>         .fbc_check_last_action = true,
>         .no_edp = false,
>         .no_suspend = false,
> +       .psr_disabled = false,
>         .small_modes = false,
>         .show_hidden= false,
>         .step = 0,
> @@ -1617,7 +1619,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
>         }                                                               \
>                                                                         \
>         if (flags_ & ASSERT_PSR_ENABLED) {                              \
> -               if (!psr_wait_until_enabled()) {                        \
> +               if (!opt.psr_disabled && !psr_wait_until_enabled()) {   \
>                         psr_print_status();                             \
>                         igt_assert_f(false, "PSR disabled\n");          \
>                 }                                                       \
> @@ -1717,8 +1719,13 @@ static void enable_features_for_test(const struct test_mode *t)
>  {
>         if (t->feature & FEATURE_FBC)
>                 fbc_enable();
> -       if (t->feature & FEATURE_PSR)
> -               psr_enable();
> +       if (t->feature & FEATURE_PSR) {
> +               if (opt.psr_disabled) {
> +                       igt_info("WARNING: Running with PSR disabled\n");
> +                       psr_disable();
> +               } else
> +                       psr_enable();
> +       }
>  }
>
>  static void check_test_requirements(const struct test_mode *t)
> @@ -2957,6 +2964,9 @@ static int opt_handler(int option, int option_index, void *data)
>         case 'r':
>                 opt.no_suspend = true;
>                 break;
> +       case 'R':
> +               opt.psr_disabled = true;
> +               break;
>         case 'm':
>                 opt.small_modes = true;
>                 break;
> @@ -3000,6 +3010,7 @@ const char *help_str =
>  "  --no-fbc-action-check       Don't check for the FBC last action\n"
>  "  --no-edp                    Don't use eDP monitors\n"
>  "  --no-suspend                Don't run Suspend/Resume test cases\n"
> +"  --psr-disabled              Dry-run. Run tests with PSR feature disabled.\n"
>  "  --use-small-modes           Use smaller resolutions for the modes\n"
>  "  --show-hidden               Show hidden subtests\n"
>  "  --step                      Stop on each step so you can check the screen\n"
> @@ -3126,6 +3137,7 @@ int main(int argc, char *argv[])
>                 { "no-fbc-action-check",      0, 0, 'a'},
>                 { "no-edp",                   0, 0, 'e'},
>                 { "no-suspend",               0, 0, 'r'},
> +               { "psr-disabled",             0, 0, 'R'},
>                 { "use-small-modes",          0, 0, 'm'},
>                 { "show-hidden",              0, 0, 'i'},
>                 { "step",                     0, 0, 't'},
> --
> 2.4.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni


More information about the Intel-gfx mailing list