Skip to contentSkip to conversation

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

PATCH New Sagar Arun Kamble 2 participants 3 messages Jan 31, 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]>
Cc Michal Winiarski <[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

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#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/37401/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
3f820260ce660cdff7fb803237c57554a29498c0 tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

with latest DRM-Tip kernel build CI_DRM_3706
a2fbc8000254 drm-tip: 2018y-01m-31d-10h-50m-08s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-fail -> PASS       (fi-elk-e7500) fdo#103989 +1
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
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:422s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:487s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:282s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:484s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:468s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:454s
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:562s
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:280s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:514s
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:400s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:417s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:461s
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:456s
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:453s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:500s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:581s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:433s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:509s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:532s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:488s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:474s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:416s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:430s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:397s
Blacklisted hosts:
fi-cnl-y2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:512s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:470s

== Logs ==

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

#2 lore raw

[igt-dev] ✓ Fi.CI.IGT: 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/37401/
State : success

== Summary ==

Test kms_flip:

        Subgroup modeset-vs-vblank-race-interruptible:
                fail       -> PASS       (shard-snb) fdo#103060
        Subgroup plain-flip-fb-recreate:
                fail       -> PASS       (shard-hsw) fdo#100368
Test kms_vblank:
        Subgroup pipe-a-ts-continuation-suspend:
                pass       -> FAIL       (shard-snb) fdo#104783
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                skip       -> PASS       (shard-snb) fdo#103375
Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104783 https://bugs.freedesktop.org/show_bug.cgi?id=104783
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

shard-apl        total:1277 pass:771  dwarn:0   dfail:0   fail:9   skip:497 time:5691s
shard-hsw        total:2838 pass:1737 dwarn:1   dfail:0   fail:9   skip:1090 time:11767s
shard-snb        total:2838 pass:1329 dwarn:1   dfail:0   fail:11  skip:1497 time:6557s

Blacklisted hosts:
shard-kbl total:2838 pass:1872 dwarn:4 dfail:0 fail:22 skip:940 time:9577s

== Logs ==

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