intel: Don't complain when getparam fails due to a missing param.
authorEric Anholt <eric@anholt.net>
Wed, 9 Mar 2011 20:54:14 +0000 (12:54 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 9 Mar 2011 20:54:47 +0000 (12:54 -0800)
This is an expected behavior when we're testing for the presence of
new kernel features.

src/mesa/drivers/dri/intel/intel_screen.c

index 5c95c72732ee95ae81e95ac6b3a566a17d378d5c..64a21a147f0d5e1c43047cc619a14ce6b7aa6275 100644 (file)
@@ -25,6 +25,7 @@
  * 
  **************************************************************************/
 
+#include <errno.h>
 #include "main/glheader.h"
 #include "main/context.h"
 #include "main/framebuffer.h"
@@ -302,7 +303,8 @@ intel_get_param(__DRIscreen *psp, int param, int *value)
 
    ret = drmCommandWriteRead(psp->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
    if (ret) {
-      _mesa_warning(NULL, "drm_i915_getparam: %d", ret);
+      if (ret != -EINVAL)
+        _mesa_warning(NULL, "drm_i915_getparam: %d", ret);
       return GL_FALSE;
    }