[Intel-gfx] [PATCH] i915_drm: add exec flag to warn kernel that userspace is using predication
Rodrigo Vivi
rodrigo.vivi at gmail.com
Tue Oct 15 22:50:38 CEST 2013
If Userspace isn't using MI_PREDICATE all slices must be enabled for
backward compatibility.
If I915_EXEC_USE_PREDICATE isn't set and defaul is set to half, kernel will force
all slices on.
v2: include more tests and s/GT_FULL/USE_PREDICATE
on code and on commit message.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
---
include/drm/i915_drm.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index aa983f3..933656c 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -670,6 +670,12 @@ struct drm_i915_gem_execbuffer2 {
/** Resets the SO write offset registers for transform feedback on gen7. */
#define I915_EXEC_GEN7_SOL_RESET (1<<8)
+/* If this flag is set userspace is using predicate and half slices can be
+ * let disabled for power saving. Otherwise use all slices even when disabled
+ * by boot parameter or via sysfs interface
+ */
+#define I915_EXEC_USE_PREDICATE (1<<13)
+
#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
#define i915_execbuffer2_set_context_id(eb2, context) \
(eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
--
1.7.11.7
More information about the Intel-gfx
mailing list