diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2011-10-23 15:12:19 -0700 |
---|---|---|
committer | Ben Widawsky <ben@bwidawsk.net> | 2011-10-23 20:15:55 -0700 |
commit | 238252bfbcc3e3844f5d74babc28b97cfed43b86 (patch) | |
tree | 3d163b87c3ec253aa0bd72cc497bccb381402b63 | |
parent | c757c5c10cf5fba7d5b6dca398832b8938f41394 (diff) |
batch params
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 13 | ||||
-rw-r--r-- | include/drm/i915_drm.h | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 8de0570a9039..7b23d94e8d56 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -878,7 +878,18 @@ i915_gem_execbuffer_move_to_gpu(struct intel_ring_buffer *ring, static bool i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec) { - return ((exec->batch_start_offset | exec->batch_len) & 0x7) == 0; + if (((exec->batch_start_offset | exec->batch_len) & 0x7) != 0) + return false; + + switch (exec->flags & I915_EXEC_PRIORITY_CLASS_MASK) { + case I915_EXEC_PRIO_CLASS_NORMAL: + case I915_EXEC_PRIO_CLASS_REALTIME: + break; + default: + return false; + } + + return true; } static int diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 28c0d114cb52..8376af01bead 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -648,6 +648,9 @@ struct drm_i915_gem_execbuffer2 { #define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */ #define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6) #define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */ +#define I915_EXEC_PRIORITY_CLASS_MASK (3<<8) +#define I915_EXEC_PRIO_CLASS_NORMAL (0<<8) +#define I915_EXEC_PRIO_CLASS_REALTIME (1<<8) __u64 flags; __u64 rsvd1; __u64 rsvd2; |