Mesa (master): intel: Don' t complain when getparam fails due to a missing param.
Eric Anholt
anholt at kemper.freedesktop.org
Wed Mar 9 20:55:20 UTC 2011
Module: Mesa
Branch: master
Commit: f6ca4a304bf920ea6913b08638fb8eb3e020d446
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6ca4a304bf920ea6913b08638fb8eb3e020d446
Author: Eric Anholt <eric at anholt.net>
Date: Wed Mar 9 12:54:14 2011 -0800
intel: Don't complain when getparam fails due to a missing param.
This is an expected behavior when we're testing for the presence of
new kernel features.
---
src/mesa/drivers/dri/intel/intel_screen.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 5c95c72..64a21a1 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -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;
}
More information about the mesa-commit
mailing list