Skip to contentSkip to conversation

tools/intel_guc_logger: Send GuC log level in new i915 expected format

PATCH Superseded Sagar Arun Kamble 2 participants 5 messages Jan 22, 2018 – Feb 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/intel_guc_logger: Send GuC log level in new i915 expected format

i915 expects GuC log level to be specified as:
0: disabled
1: enabled (verbosity level 0 = min)
2: enabled (verbosity level 1)
3: enabled (verbosity level 2)
4: enabled (verbosity level 3 = max)

Remove the earlier internal layout based logging control from guc_log_control and send new expected values.

v2: log_level assert in guc_log_control, cleaner level setup (Michal) added missing copyright header. (Sagar)

Cc Michal Wajdeczko <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Chris Wilson <[email protected]>
---
 tools/intel_guc_logger.c | 41 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 37 insertions(+), 4 deletions(-)
tools/intel_guc_logger.c +37 -4
index 031fd84..5f1de8d 100644
@@ -1,3 +1,26 @@
+/*
+ * Copyright © 2014-2018 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
 
 #include <inttypes.h>
 #include <stdio.h>
@@ -51,17 +74,27 @@ uint32_t test_duration, max_filesize;
 pthread_cond_t underflow_cond, overflow_cond;
 bool stop_logging, discard_oldlogs, capturing_stopped;
 
-static void guc_log_control(bool enable_logging)
+static void guc_log_control(bool enable, uint32_t log_level)
 {
 	int control_fd;
 	char data[19];
 	uint64_t val;
 	int ret;
 
+	igt_assert_lte(log_level, 3);
+
 	control_fd = igt_debugfs_open(-1, CONTROL_FILE_NAME, O_WRONLY);
 	igt_assert_f(control_fd >= 0, "couldn't open the guc log control file\n");
 
-	val = enable_logging ? ((verbosity_level << 4) | 0x1) : 0;
+	/*
+	 * i915 expects GuC log level to be specified as:
+	 * 0: disabled
+	 * 1: enabled (verbosity level 0 = min)
+	 * 2: enabled (verbosity level 1)
+	 * 3: enabled (verbosity level 2)
+	 * 4: enabled (verbosity level 3 = max)
+	 */
+	val = enable ? log_level + 1 : 0;
 
 	ret = snprintf(data, sizeof(data), "0x%" PRIx64, val);
 	igt_assert(ret > 2 && ret < sizeof(data));
@@ -288,7 +321,7 @@ static void init_main_thread(void)
 	/* Enable the logging, it may not have been enabled from boot and so
 	 * the relay file also wouldn't have been created.
 	 */
-	guc_log_control(true);
+	guc_log_control(true, verbosity_level);
 
 	open_relay_file();
 	open_output_file();
@@ -420,7 +453,7 @@ int main(int argc, char **argv)
 	} while (!stop_logging);
 
 	/* Pause logging on the GuC side */
-	guc_log_control(false);
+	guc_log_control(false, 0);
 
 	/* Signal flusher thread to make an exit */
 	capturing_stopped = 1;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format

== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format
URL : https://patchwork.freedesktop.org/series/36876/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 94bd67c5d6184c435c2fed0bfb39d75b3138b7a8 tools/intel_vbt_decode: update vbt defs from kernel

with latest DRM-Tip kernel build CI_DRM_3665
a1f34f9415a4 drm-tip: 2018y-01m-20d-19h-27m-32s UTC integration manifest

Testlist changes:
-igt@vc4_create_bo@create-bo-0 -igt@vc4_create_bo@create-bo-4096 -igt@vc4_create_bo@create-bo-zeroed -igt@vc4_dmabuf_poll@poll-read-waits-until-write-done -igt@vc4_dmabuf_poll@poll-write-waits-until-write-done -igt@vc4_label_bo@set-bad-handle -igt@vc4_label_bo@set-bad-name -igt@vc4_label_bo@set-kernel-name -igt@vc4_label_bo@set-label -igt@vc4_lookup_fail@bad-color-write -igt@vc4_tiling@get-after-free -igt@vc4_tiling@get-bad-flags -igt@vc4_tiling@get-bad-handle -igt@vc4_tiling@get-bad-modifier -igt@vc4_tiling@set-bad-flags -igt@vc4_tiling@set-bad-handle -igt@vc4_tiling@set-bad-modifier -igt@vc4_tiling@set-get -igt@vc4_wait_bo@bad-bo -igt@vc4_wait_bo@bad-pad -igt@vc4_wait_bo@unused-bo-0ns -igt@vc4_wait_bo@unused-bo-1ns -igt@vc4_wait_bo@used-bo -igt@vc4_wait_bo@used-bo-0ns -igt@vc4_wait_bo@used-bo-1ns -igt@vc4_wait_seqno@bad-seqno-0ns -igt@vc4_wait_seqno@bad-seqno-1ns

Test gem_ringfill:

        Subgroup basic-default:
                skip       -> PASS       (fi-bsw-n3050)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:424s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:428s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:491s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:489s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:483s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:459s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:277s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:519s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:393s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:460s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:413s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:462s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:499s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:505s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:587s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:429s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:536s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:492s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:482s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:422s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:434s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:532s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:398s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:570s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:472s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_808/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format

In reply to Sagar Arun Kamble
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format
URL : https://patchwork.freedesktop.org/series/36876/
State : failure

== Summary ==

Test kms_3d:

                fail       -> PASS       (shard-snb) fdo#104723
Test perf:
        Subgroup buffer-fill:
                pass       -> FAIL       (shard-apl) fdo#103755
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252
Test drv_suspend:
        Subgroup forcewake:
                skip       -> PASS       (shard-hsw)
        Subgroup fence-restore-untiled-hibernate:
                fail       -> SKIP       (shard-hsw) fdo#103375
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                pass       -> FAIL       (shard-snb) fdo#101623 +1
        Subgroup fbc-1p-pri-indfb-multidraw:
                fail       -> PASS       (shard-snb) fdo#103167
Test kms_flip:
        Subgroup vblank-vs-modeset-suspend-interruptible:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540
        Subgroup flip-vs-expired-vblank-interruptible:
                fail       -> PASS       (shard-apl) fdo#102887
        Subgroup rcs-wf_vblank-vs-dpms-interruptible:
                dmesg-warn -> PASS       (shard-hsw) fdo#102614
        Subgroup dpms-vs-vblank-race:
                fail       -> PASS       (shard-apl) fdo#103060
        Subgroup vblank-vs-suspend-interruptible:
                incomplete -> PASS       (shard-hsw) fdo#100368
        Subgroup 2x-vblank-vs-dpms-suspend:
                pass       -> FAIL       (shard-hsw)
Test gen7_forcewake_mt:
                fail       -> PASS       (shard-hsw) fdo#104725
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047
Test gem_eio:
        Subgroup in-flight-external:
                pass       -> FAIL       (shard-hsw) fdo#104676 +1
Test kms_plane_lowres:
        Subgroup pipe-b-tiling-x:
                pass       -> FAIL       (shard-apl)
Test gem_tiled_pread_basic:
                pass       -> INCOMPLETE (shard-hsw) fdo#104218

fdo#104723 https://bugs.freedesktop.org/show_bug.cgi?id=104723
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104725 https://bugs.freedesktop.org/show_bug.cgi?id=104725
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218

shard-apl        total:2753 pass:1714 dwarn:1   dfail:0   fail:25  skip:1013 time:13988s
shard-hsw        total:2712 pass:1698 dwarn:1   dfail:0   fail:12  skip:998 time:14225s
shard-snb        total:2753 pass:1318 dwarn:1   dfail:0   fail:11  skip:1423 time:7940s

Blacklisted hosts:
shard-kbl total:2753 pass:1839 dwarn:1 dfail:0 fail:22 skip:891 time:10847s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_808/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format

In reply to Sagar Arun Kamble
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format
URL : https://patchwork.freedesktop.org/series/36876/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 0d47ec161b4eca1b41c5348604aa05b105e5d1cf tests/perf: Fix build warning

with latest DRM-Tip kernel build CI_DRM_3848
446c2101a788 drm-tip: 2018y-02m-28d-13h-18m-03s UTC integration manifest

No testlist changes.

---- Known issues:

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-bdw-5557u) fdo#104162

fdo#104162 https://bugs.freedesktop.org/show_bug.cgi?id=104162

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:415s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:375s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:486s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:287s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:481s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:485s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:469s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:455s
fi-cfl-8700k     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:402s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-cnl-y3        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:574s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:409s
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:285s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:508s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:386s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:408s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:458s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:410s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:451s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:492s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:453s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:493s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:587s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:431s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:519s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:491s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:486s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:408s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:431s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:523s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:395s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1022/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✗ Fi.CI.IGT: warning for series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format

In reply to Sagar Arun Kamble
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] tools/intel_guc_logger: Send GuC log level in new i915 expected format
URL : https://patchwork.freedesktop.org/series/36876/
State : warning

== Summary ==

---- Possible new issues:

Test pm_rc6_residency:

        Subgroup rc6-accuracy:
                pass       -> SKIP       (shard-snb)

---- Known issues:

Test gem_eio:

        Subgroup in-flight:
                incomplete -> PASS       (shard-apl) fdo#104945
Test kms_chv_cursor_fail:
        Subgroup pipe-b-128x128-bottom-edge:
                pass       -> DMESG-WARN (shard-snb) fdo#105185 +1
Test kms_cursor_crc:
        Subgroup cursor-64x64-suspend:
                pass       -> INCOMPLETE (shard-hsw) fdo#103540

fdo#104945 https://bugs.freedesktop.org/show_bug.cgi?id=104945
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540

shard-apl        total:3460 pass:1819 dwarn:1   dfail:0   fail:7   skip:1632 time:12220s
shard-hsw        total:3394 pass:1739 dwarn:1   dfail:0   fail:1   skip:1651 time:11173s
shard-snb        total:3460 pass:1357 dwarn:3   dfail:0   fail:1   skip:2099 time:6702s

Blacklisted hosts:
shard-kbl total:3394 pass:1904 dwarn:1 dfail:0 fail:7 skip:1481 time:9168s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1022/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev