diff options
| author | Dave Airlie <airlied@redhat.com> | 2007-10-12 10:54:38 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2007-10-12 10:54:38 +1000 | 
| commit | 74001c34e5ad768feec8b2fbe9a617bc598a0a4b (patch) | |
| tree | 111c8f0b0346223ae608882cf221381754d8cf96 /shared-core/i915_drm.h | |
| parent | 604f02ff619d87d1372bcb7969c826d981fefc60 (diff) | |
i915: add superioctl support to i915
This adds the initial i915 superioctl interface. The interface should be
sufficent even if the implementation may needs fixes/optimisations internally
in the drm wrt caching etc.
Diffstat (limited to 'shared-core/i915_drm.h')
| -rw-r--r-- | shared-core/i915_drm.h | 39 | 
1 files changed, 38 insertions, 1 deletions
| diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h index 9976804e..a6c3cf30 100644 --- a/shared-core/i915_drm.h +++ b/shared-core/i915_drm.h @@ -160,6 +160,7 @@ typedef struct _drm_i915_sarea {  #define DRM_I915_VBLANK_SWAP	0x0f  #define DRM_I915_MMIO		0x10  #define DRM_I915_HWS_ADDR	0x11 +#define DRM_I915_EXECBUFFER	0x12  #define DRM_IOCTL_I915_INIT		DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)  #define DRM_IOCTL_I915_FLUSH		DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) @@ -177,7 +178,7 @@ typedef struct _drm_i915_sarea {  #define DRM_IOCTL_I915_SET_VBLANK_PIPE	DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t)  #define DRM_IOCTL_I915_GET_VBLANK_PIPE	DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t)  #define DRM_IOCTL_I915_VBLANK_SWAP	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) - +#define DRM_IOCTL_I915_EXECBUFFER	DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_EXECBUFFER, struct drm_i915_execbuffer)  /* Asynchronous page flipping:   */ @@ -325,4 +326,40 @@ typedef struct drm_i915_hws_addr {  	uint64_t addr;  } drm_i915_hws_addr_t; +/* + * Relocation header is 4 uint32_ts + * 0 - (16-bit relocation type << 16)| 16 bit reloc count + * 1 - buffer handle for another list of relocs + * 2-3 - spare. + */ +#define I915_RELOC_HEADER 4 + +/* + * type 0 relocation has 4-uint32_t stride + * 0 - offset into buffer + * 1 - delta to add in + * 2 - index into buffer list + * 3 - reserved (for optimisations later). + */ +#define I915_RELOC_TYPE_0 0 +#define I915_RELOC0_STRIDE 4 + +struct drm_i915_op_arg { +	uint64_t next; +	uint32_t reloc_handle; +	int handled; +	union { +		struct drm_bo_op_req req; +		struct drm_bo_arg_rep rep; +	} d; + +}; + +struct drm_i915_execbuffer { +	uint64_t ops_list; +	uint32_t num_buffers; +	struct _drm_i915_batchbuffer batch; +	struct drm_fence_arg fence_arg; +}; +  #endif				/* _I915_DRM_H_ */ | 
