From 25fbae15262cf570e207e62f50e7c5233e06bc67 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 21 Mar 2017 17:57:04 +0100 Subject: Revert "lib: Open debugfs files for the given DRM device" 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 --- tools/intel_guc_logger.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tools/intel_guc_logger.c') diff --git a/tools/intel_guc_logger.c b/tools/intel_guc_logger.c index 3079878e..c9ea60d0 100644 --- a/tools/intel_guc_logger.c +++ b/tools/intel_guc_logger.c @@ -47,7 +47,7 @@ int verbosity_level = 3; /* by default capture logs at max verbosity */ uint32_t produced, consumed; uint64_t total_bytes_written; int num_buffers = NUM_SUBBUFS; -int relay_fd, drm_fd, outfile_fd = -1; +int relay_fd, outfile_fd = -1; uint32_t test_duration, max_filesize; pthread_cond_t underflow_cond, overflow_cond; bool stop_logging, discard_oldlogs, capturing_stopped; @@ -59,7 +59,7 @@ static void guc_log_control(bool enable_logging) uint64_t val; int ret; - control_fd = igt_debugfs_open(drm_fd, CONTROL_FILE_NAME, O_WRONLY); + control_fd = igt_debugfs_open(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; @@ -228,7 +228,7 @@ static void init_flusher_thread(void) static void open_relay_file(void) { - relay_fd = igt_debugfs_open(drm_fd, RELAY_FILE_NAME, O_RDONLY); + relay_fd = igt_debugfs_open(RELAY_FILE_NAME, O_RDONLY); igt_assert_f(relay_fd >= 0, "couldn't open the guc log file\n"); /* Purge the old/boot-time logs from the relay buffer. @@ -374,9 +374,6 @@ int main(int argc, char **argv) process_command_line(argc, argv); - /* Just to make sure we open the right debugfs files */ - drm_fd = drm_open_driver_master(DRIVER_INTEL); - init_main_thread(); /* Use a separate thread for flushing the logs to a file on disk. @@ -437,6 +434,5 @@ int main(int argc, char **argv) free(read_buffer); close(relay_fd); close(outfile_fd); - close(drm_fd); igt_exit(); } -- cgit v1.2.3