diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-06-21 09:01:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-06-21 10:32:37 +0100 |
commit | d20ac620f0010f9cdcbbe8408e5f22aae3c49faa (patch) | |
tree | efedbf115f87bbc18d6db711e808c8cc92d6e9c1 /drivers/gpu/drm/i915/i915_gem_execbuffer.c | |
parent | 827db9d8bb4a01314f214065e3f18c8345c5fc9f (diff) |
drm/i915: Redefine EINVAL for debugging
To aide debugging spurious EINVALs, include a debug message every time
we emit one from execbuf.
References: https://bugs.freedesktop.org/show_bug.cgi?id=106744
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180621080150.8110-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 437441f4af41..c2dd9b4cdace 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -66,6 +66,15 @@ enum { #define __I915_EXEC_ILLEGAL_FLAGS \ (__I915_EXEC_UNKNOWN_FLAGS | I915_EXEC_CONSTANTS_MASK) +/* Catch emission of unexpected errors for CI! */ +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) +#undef EINVAL +#define EINVAL ({ \ + DRM_DEBUG_DRIVER("EINVAL at %s:%d\n", __func__, __LINE__); \ + 22; \ +}) +#endif + /** * DOC: User command execution * |