aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Widawsky2012-06-27 11:52:42 -0500
committerBen Widawsky2012-06-27 11:57:16 -0500
commita5b2946889471f6075852949f90f660e43b68532 (patch)
tree8f83b93dd0065ad00591a02cc0bc350e44464627 /include
parent7d0a1d5ebbe2c6aecd96eef94b0af038858a0178 (diff)
downloadexternal-libgbm-a5b2946889471f6075852949f90f660e43b68532.tar.gz
external-libgbm-a5b2946889471f6075852949f90f660e43b68532.tar.xz
external-libgbm-a5b2946889471f6075852949f90f660e43b68532.zip
intel: updated header for contexts
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-By: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'include')
-rw-r--r--include/drm/i915_drm.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 4931107c..5c8fabe0 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -193,6 +193,8 @@ typedef struct _drm_i915_sarea {
193#define DRM_I915_GET_SPRITE_COLORKEY 0x2a 193#define DRM_I915_GET_SPRITE_COLORKEY 0x2a
194#define DRM_I915_SET_SPRITE_COLORKEY 0x2b 194#define DRM_I915_SET_SPRITE_COLORKEY 0x2b
195#define DRM_I915_GEM_WAIT 0x2c 195#define DRM_I915_GEM_WAIT 0x2c
196#define DRM_I915_GEM_CONTEXT_CREATE 0x2d
197#define DRM_I915_GEM_CONTEXT_DESTROY 0x2e
196 198
197#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 199#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
198#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 200#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -237,6 +239,8 @@ typedef struct _drm_i915_sarea {
237#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) 239#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
238#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) 240#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey)
239#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) 241#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait)
242#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create)
243#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy)
240 244
241/* Allow drivers to submit batchbuffers directly to hardware, relying 245/* Allow drivers to submit batchbuffers directly to hardware, relying
242 * on the security mechanisms provided by hardware. 246 * on the security mechanisms provided by hardware.
@@ -651,13 +655,19 @@ struct drm_i915_gem_execbuffer2 {
651#define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6) 655#define I915_EXEC_CONSTANTS_ABSOLUTE (1<<6)
652#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */ 656#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
653 __u64 flags; 657 __u64 flags;
654 __u64 rsvd1; 658 __u64 rsvd1; /* now used for context info */
655 __u64 rsvd2; 659 __u64 rsvd2;
656}; 660};
657 661
658/** Resets the SO write offset registers for transform feedback on gen7. */ 662/** Resets the SO write offset registers for transform feedback on gen7. */
659#define I915_EXEC_GEN7_SOL_RESET (1<<8) 663#define I915_EXEC_GEN7_SOL_RESET (1<<8)
660 664
665#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
666#define i915_execbuffer2_set_context_id(eb2, context) \
667 (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK
668#define i915_execbuffer2_get_context_id(eb2) \
669 ((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK)
670
661struct drm_i915_gem_pin { 671struct drm_i915_gem_pin {
662 /** Handle of the buffer to be pinned. */ 672 /** Handle of the buffer to be pinned. */
663 __u32 handle; 673 __u32 handle;
@@ -889,4 +899,15 @@ struct drm_i915_gem_wait {
889 __s64 timeout_ns; 899 __s64 timeout_ns;
890}; 900};
891 901
902struct drm_i915_gem_context_create {
903 /* output: id of new context*/
904 __u32 ctx_id;
905 __u32 pad;
906};
907
908struct drm_i915_gem_context_destroy {
909 __u32 ctx_id;
910 __u32 pad;
911};
912
892#endif /* _I915_DRM_H_ */ 913#endif /* _I915_DRM_H_ */