From patchwork Thu Jul 12 19:45:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 1190451 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 48673DFFFE for ; Thu, 12 Jul 2012 19:45:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36F1CA0FB4 for ; Thu, 12 Jul 2012 12:45:58 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from hapkido.dreamhost.com (hapkido.dreamhost.com [66.33.216.122]) by gabe.freedesktop.org (Postfix) with ESMTP id 4B2FC9E83C for ; Thu, 12 Jul 2012 12:45:31 -0700 (PDT) Received: from homiemail-a61.g.dreamhost.com (caiajhbdccah.dreamhost.com [208.97.132.207]) by hapkido.dreamhost.com (Postfix) with ESMTP id 725C6A6A; Thu, 12 Jul 2012 12:51:19 -0700 (PDT) Received: from homiemail-a61.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a61.g.dreamhost.com (Postfix) with ESMTP id 03D0F57806E; Thu, 12 Jul 2012 12:45:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=whitecape.org; h=from:to:cc :subject:date:message-id; q=dns; s=whitecape.org; b=sN99Qu+n9Env S2alZNcUAOO2JpKIevJQCqHfv3XyJlaTgZXPK0149+0U9H2uF1Yubf9KBMNbSXf4 +LqEveNveyUy9S7vvXzwIT4WhDYt3m47qlfWqiK2hLpl9b51K1LF/qTbjkWiTKQH /MaZTWnVSePTvTxf6luX+0dOjvg6Z18= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=whitecape.org; h=from:to :cc:subject:date:message-id; s=whitecape.org; bh=1o9F2RV9i2h5/MZ APJNROHFxnZI=; b=kQ5i1oVdDHBAEJMXRmnUwUz8GpiI+siKdqRW2UcYYIMncrG R9slmwz/gEaNDi/8jL4HjRYMNFN2WTyhLPN6vww7tL0GWsga4ZiB/V5R3MoRHmrY cPOJ1Z8tyf/pqYCr1ROyRz+YWM0Ww2uIc/wW1KjilO3Q9+lpg0Odglq7pddE= Received: from tali.localdomain (mf12036d0.tmodns.net [208.54.32.241]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kenneth@whitecape.org) by homiemail-a61.g.dreamhost.com (Postfix) with ESMTPSA id ECE47578077; Thu, 12 Jul 2012 12:45:27 -0700 (PDT) From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Thu, 12 Jul 2012 12:45:22 -0700 Message-Id: <1342122322-13938-1-git-send-email-kenneth@whitecape.org> X-Mailer: git-send-email 1.7.10.4 Cc: mesa-devel@lists.freedesktop.org, Ben Widawsky Subject: [Intel-gfx] [PATCH] intel: Don't print messages to stderr if context creation fails. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org 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 Cc: Paul Berry Cc: mesa-devel@lists.freedesktop.org Signed-off-by: Kenneth Graunke Reviewed-by: Ben Widawsky Reviewed-by: Ben Widawsky Reviewed-by: Ben Widawsky --- 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;