summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2011-05-01 15:42:24 +0000
committeroga <oga@openbsd.org>2011-05-01 15:42:24 +0000
commit2b5c3086974dcd99d01279e6b615bc1e21d3170d (patch)
treea38e9277d7b2aee5ba55f446defbcaa90288ecde
parentFix a NULL dereference if drm fails to attach. (diff)
downloadwireguard-openbsd-2b5c3086974dcd99d01279e6b615bc1e21d3170d.tar.xz
wireguard-openbsd-2b5c3086974dcd99d01279e6b615bc1e21d3170d.zip
Add some PARAM and flags defines needed for later version of the intel
DDX, libdrm and mesa. So far the kernel doesn't support them (and will return an error if inquired) but userland knows how to cope.
-rw-r--r--sys/dev/pci/drm/i915_drm.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915_drm.h b/sys/dev/pci/drm/i915_drm.h
index b282464c432..697d63503a8 100644
--- a/sys/dev/pci/drm/i915_drm.h
+++ b/sys/dev/pci/drm/i915_drm.h
@@ -257,7 +257,15 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_CHIPSET_ID 4
#define I915_PARAM_HAS_GEM 5
#define I915_PARAM_NUM_FENCES_AVAIL 6
+#define I915_PARAM_HAS_OVERLAY 7
+#define I915_PARAM_HAS_PAGEFLIPPING 8
#define I915_PARAM_HAS_EXECBUF2 9
+#define I915_PARAM_HAS_BSD 10
+#define I915_PARAM_HAS_BLT 11
+#define I915_PARAM_HAS_RELAXED_FENCING 12
+#define I915_PARAM_HAS_COHERENT_RINGS 13
+#define I915_PARAM_HAS_EXEC_CONSTANTS 14
+#define I915_PARAM_HAS_RELAXED_DELTA 15
typedef struct drm_i915_getparam {
int param;
@@ -532,7 +540,23 @@ struct drm_i915_gem_execbuffer2 {
u_int32_t batch_start_offset;
/** Bytes used in batchbuffer from batch_start_offset */
u_int32_t batch_len;
- u_int64_t flags; /* currently unused */
+#define I915_EXEC_RING_MASK (7<<0)
+#define I915_EXEC_DEFAULT (0<<0)
+#define I915_EXEC_RENDER (1<<0)
+#define I915_EXEC_BSD (2<<0)
+#define I915_EXEC_BLT (3<<0)
+
+/* Used for switching the constants addressing mode on gen4+ RENDER ring.
+ * Gen6+ only supports relative addressing to dynamic state (default) and
+ * absolute addressing.
+ *
+ * These flags are ignored for the BSD and BLT rings.
+ */
+#define I915_EXEC_CONSTANTS_MASK (3<<6)
+#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 */
+ u_int64_t flags;
u_int64_t rsvd1;
u_int64_t rsvd2;
};