Add debug information

Change-Id: I007066c9760451c161f2ebc944146291a86591f9
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 3891176..5374e50 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3859,6 +3859,7 @@
 	dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL);
 
 	gbm = gbm_create_device(fd);
+	weston_log("Create gbm device %p from fd %d\n", gbm, fd);
 
 	return gbm;
 }
@@ -3905,9 +3906,9 @@
 					gl_renderer->opaque_attribs,
 					format,
 					n_formats) < 0) {
+		weston_log("Failed on create GL renderer\n");
 		return -1;
 	}
-
 	return 0;
 }
 
@@ -3916,8 +3917,10 @@
 {
 	b->gbm = create_gbm_device(b->drm.fd);
 
-	if (!b->gbm)
+	if (!b->gbm) {
+		weston_log("Failed on create gbm device. DRM device: %s\n", b->drm.filename);
 		return -1;
+	}
 
 	if (drm_backend_create_gl_renderer(b) < 0) {
 		gbm_device_destroy(b->gbm);
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index 2c50d2d..189bc7d 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -3423,13 +3423,17 @@
 	if (platform) {
 		supports = gl_renderer_supports(
 			ec, platform_to_extension(platform));
-		if (supports < 0)
+		if (supports < 0) {
+			weston_log("GL renderer does not support platform %d\n", platform);
 			return -1;
+		}
 	}
 
 	gr = zalloc(sizeof *gr);
-	if (gr == NULL)
+	if (gr == NULL) {
+		weston_log("Cannot alloc gl renderer memory\n");
 		return -1;
+	}
 
 	gr->base.read_pixels = gl_renderer_read_pixels;
 	gr->base.repaint_output = gl_renderer_repaint_output;