[Intel-gfx] [PATCH igt 13/28] lib/display: Allow to override the display verbosity with an env variale

Damien Lespiau damien.lespiau at intel.com
Fri Feb 7 15:48:57 CET 2014


Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 lib/igt_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index e2413e5..c503ebb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -863,6 +863,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 {
 	drmModeRes *resources;
 	bool verbose;
+	char *env;
 	int i;
 
 	/*
@@ -873,6 +874,11 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 	memset(display, 0, sizeof(igt_display_t));
 	display->verbose = verbose;
 
+	/* allow a verbose override from an env variable */
+	env = getenv("IGT_DISPLAY_VERBOSE");
+	if (env)
+		display->verbose = atoi(env) != 0;
+
 	LOG_INDENT(display, "init");
 
 	display->drm_fd = drm_fd;
-- 
1.8.3.1




More information about the Intel-gfx mailing list