[Intel-gfx] [PATCH] intel: Don't print messages to stderr if context creation fails.

Kenneth Graunke kenneth at whitecape.org
Thu Jul 12 21:45:22 CEST 2012


Since there is no getparam for hardware context support, Mesa always
tries to obtain a context by calling drm_intel_gem_context_create and
NULL-checking the result.  On an older kernel without context support,
this caused libdrm to print an unwanted message to stderr:

DRM_IOCTL_I915_GEM_CONTEXT_CREATE failed: Invalid argument

In fact, this caused every Piglit test to fail with a "warn" status due
to the unrecognized error message.

Simply delete the message.  It's OK for context creation to fail.

Cc: Ben Widawsky <ben at bwidawsk.net>
Cc: Paul Berry <stereotype441 at gmail.com>
Cc: mesa-devel at lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 intel/intel_bufmgr_gem.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index a957c28..1b4ac78 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2850,11 +2850,8 @@ drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
 	int tmp = 0, ret;
 
 	ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CONTEXT_CREATE, &create);
-	if (ret != 0) {
-		fprintf(stderr, "DRM_IOCTL_I915_GEM_CONTEXT_CREATE failed: %s\n",
-			strerror(errno));
+	if (ret != 0)
 		return NULL;
-	}
 
 	context = calloc(1, sizeof(*context));
 	context->ctx_id = create.ctx_id;
-- 
1.7.10.4




More information about the Intel-gfx mailing list