Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] intel: Fix error check for I915_PARAM_HAS_LLC.
Date: Mon, 27 Feb 2012 23:35:16 -0800	[thread overview]
Message-ID: <1330414518-13984-1-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1330142003-570-1-git-send-email-eric@anholt.net>

drmIoctl returns -1 on error with errno set to the error value.  Other
users of it in this file just check for != 0, and only use errno when
they need to send an error value on to the caller of the API.
---
 intel/intel_bufmgr_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 0f33b71..b2b9951 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -2410,7 +2410,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 
 	gp.param = I915_PARAM_HAS_LLC;
 	ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp);
-	if (ret == -EINVAL) {
+	if (ret != 0) {
 		/* Kernel does not supports HAS_LLC query, fallback to GPU
 		 * generation detection and assume that we have LLC on GEN6/7
 		 */
-- 
1.7.9.1

  parent reply	other threads:[~2012-02-28  7:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25  3:53 [PATCH] intel: Add support for (possibly) unsynchronized maps Eric Anholt
2012-02-25  3:53 ` [PATCH] intel: Make use of the new GPU-unsynchronized map functionality in libdrm Eric Anholt
2012-02-25  8:55 ` [PATCH] intel: Add support for (possibly) unsynchronized maps Chris Wilson
2012-02-25  9:03 ` Paul Menzel
2012-02-25 11:00 ` Daniel Vetter
2012-02-25 11:16   ` Chris Wilson
2012-02-26 20:28   ` Kenneth Graunke
2012-02-27 11:15     ` Ben Widawsky
2012-02-27 19:05   ` Eric Anholt
2012-02-28  7:35 ` Eric Anholt [this message]
2012-02-28  7:35   ` [PATCH 2/2] " Eric Anholt

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=1330414518-13984-1-git-send-email-eric@anholt.net \
    --to=eric@anholt.net \
    --cc=intel-gfx@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