From: Ben Widawsky <ben@bwidawsk.net>
To: Kenneth Graunke <kenneth@whitecape.org>
Cc: intel-gfx@lists.freedesktop.org, mesa-devel@lists.freedesktop.org
Subject: Re: [PATCH] intel: Don't print messages to stderr if context creation fails.
Date: Tue, 17 Jul 2012 16:03:07 -0700 [thread overview]
Message-ID: <20120717160307.16f0f633@bwidawsk.net> (raw)
In-Reply-To: <1342122322-13938-1-git-send-email-kenneth@whitecape.org>
On Thu, 12 Jul 2012 12:45:22 -0700
Kenneth Graunke <kenneth@whitecape.org> wrote:
> 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.
Change it to DBG() and you have my:
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
>
> Cc: Ben Widawsky <ben@bwidawsk.net>
> Cc: Paul Berry <stereotype441@gmail.com>
> Cc: mesa-devel@lists.freedesktop.org
> Signed-off-by: Kenneth Graunke <kenneth@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;
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2012-07-17 23:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 19:45 [PATCH] intel: Don't print messages to stderr if context creation fails Kenneth Graunke
2012-07-12 20:11 ` Ben Widawsky
2012-07-17 23:03 ` Ben Widawsky [this message]
2012-07-17 23:06 ` Ben Widawsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120717160307.16f0f633@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kenneth@whitecape.org \
--cc=mesa-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox