diff mbox

[1/3] drm-uapi:i915 define set/get (per-context) scratch page ioctl interface

Message ID 1512720159-6843-2-git-send-email-kevin.rogovin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

kevin.rogovin@intel.com Dec. 8, 2017, 8:02 a.m. UTC
From: Kevin Rogovin <kevin.rogovin@intel.com>

---
 include/drm-uapi/i915_drm.h | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox

Patch

diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index 7f28eea403..e75eea058b 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -1412,6 +1412,15 @@  struct drm_i915_gem_context_param {
 #define   I915_CONTEXT_MAX_USER_PRIORITY	1023 /* inclusive */
 #define   I915_CONTEXT_DEFAULT_PRIORITY		0
 #define   I915_CONTEXT_MIN_USER_PRIORITY	-1023 /* inclusive */
+/* Notes for set/get of I915_CONTEXT_PARAM_SCRATCH_PAGE_CONTENTS:
+ *  1) for the duration of set/get, the caller must guarantee
+ *     that nothing can read/write the scratch page
+ *  2) on set and get, ioctl will write to drm_i915_gem_context_param::set
+ *     the size of the scratch page
+ *  3) on get, first drm_i915_gem_context_param::size of the scratch
+ *     page contents will be written to.
+ */
+#define I915_CONTEXT_PARAM_SCRATCH_PAGE_CONTENTS 0x7
 	__u64 value;
 };