[igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Reduce fbc status spam.

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 15 11:06:43 UTC 2018


Quoting Maarten Lankhorst (2018-03-15 11:00:08)
> When FBC cannot be enabled in one of the tests, we get a lot of repeated
> spam at DEBUG level, which overwrites any good debug level data that you
> can hope to get out of the test.
> 
> When running at the debug level, output FBC info only if changed from last
> time, so we don't get the repeated spam.
> 
> This makes the debug info from CI slightly more useful.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  tests/kms_frontbuffer_tracking.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 06b34ddb90b4..aa138d5ea13f 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -758,9 +758,20 @@ static int __debugfs_write(const char *param, char *buf, int len)
>  static bool fbc_is_enabled(int lvl)
>  {
>         char buf[128];
> +       static char last_buf[128];
> +       bool print = true;
>  
>         debugfs_read("i915_fbc_status", buf);
> -       igt_log(IGT_LOG_DOMAIN, lvl, "fbc_is_enabled()?\n%s", buf);
> +       if (lvl != IGT_LOG_DEBUG)
> +               last_buf[0] = '\0';

I think you also want to reset between passes, so that you have a
complete log for one wait.
-Chris


More information about the igt-dev mailing list