summaryrefslogtreecommitdiff
path: root/tools/intel_guc_logger.c
AgeCommit message (Collapse)Author
2018-03-01tools/intel_guc_logger: Send GuC log level in new i915 expected formatSagar Arun Kamble
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) Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michal Winiarski <michal.winiarski@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
2017-11-21tools: Stop opening the driver just to find the debugfsChris Wilson
Since the tools want to work without the module loaded, remove the assumption that we want to load the driver to find debugfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-19tools/intel_guc_logger: Fix the assert for the verbosity levelOscar Mateo
I guess no one has needed to change the verbosity level of the GuC logs. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2016-10-25This patch provides a test utility which helps capture GuC firmware logs andAkash Goel
then dump them to file. The logs are pulled from a debugfs file '/sys/kernel/debug/dri/guc_log' and by default stored into a file 'guc_log_dump.dat'. The name, including the location, of the output file can be changed through a command line argument. The utility goes into an infinite loop where it waits for the arrival of new logs and as soon as new set of logs are produced it captures them in its local buffer which is then flushed out to the file on disk. Any time when logging needs to be ended, User can stop this utility (CTRL+C). Before entering into a loop, it first discards whatever logs are present in the debugfs file. This way User can first launch this utility and then start a workload/activity for which GuC firmware logs are to be actually captured and keep running the utility for as long as its needed, like once the workload is over this utility can be forcefully stopped. If the logging wasn't enabled on GuC side by the Driver at boot time, utility will first enable the logging and later on when it is stopped (CTRL+C) it will also pause the logging on GuC side. v2: - Use combination of alarm system call & SIGALRM signal to run the utility for required duration. (Tvrtko) - Fix inconsistencies, do minor cleanup and refactoring. (Tvrtko) v3: - Fix discrepancy for the output file command line option and update the Usage/help string. v4: - Update the exit condition for flusher thread, now will exit only after the capture loop is over and not when the flag to stop logging is set. This handles a corner case, due to which the dump of last captured buffer was getting missed. - Add a newline character at the end of assert messages. - Avoid the assert for the case, which occurs very rarely, when there are no bytes read from the relay file. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Akash Goel <akash.goel@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v3)