diff options
author | Eric Anholt <eric@anholt.net> | 2008-10-23 00:40:13 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-02 19:56:49 -0500 |
commit | 5a125c3c79167e78ba44efef03af7090ef28eeaf (patch) | |
tree | b8c3a9e44ea44b7afc821c0422a7ea6360814f03 /include/drm/i915_drm.h | |
parent | 4e270e9b8a9d246290f3901f1fb6c5efdb734ddf (diff) |
i915: Add GEM ioctl to get available aperture size.
This will let userland know when to submit its batchbuffers, before they get
too big to fit in the aperture.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r-- | include/drm/i915_drm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index eb4b35031a55..152b34da927c 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -159,6 +159,7 @@ typedef struct _drm_i915_sarea { | |||
159 | #define DRM_I915_GEM_SW_FINISH 0x20 | 159 | #define DRM_I915_GEM_SW_FINISH 0x20 |
160 | #define DRM_I915_GEM_SET_TILING 0x21 | 160 | #define DRM_I915_GEM_SET_TILING 0x21 |
161 | #define DRM_I915_GEM_GET_TILING 0x22 | 161 | #define DRM_I915_GEM_GET_TILING 0x22 |
162 | #define DRM_I915_GEM_GET_APERTURE 0x23 | ||
162 | 163 | ||
163 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 164 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
164 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 165 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
@@ -190,6 +191,7 @@ typedef struct _drm_i915_sarea { | |||
190 | #define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish) | 191 | #define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW (DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish) |
191 | #define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) | 192 | #define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) |
192 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) | 193 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) |
194 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) | ||
193 | 195 | ||
194 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 196 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
195 | * on the security mechanisms provided by hardware. | 197 | * on the security mechanisms provided by hardware. |
@@ -600,4 +602,15 @@ struct drm_i915_gem_get_tiling { | |||
600 | uint32_t swizzle_mode; | 602 | uint32_t swizzle_mode; |
601 | }; | 603 | }; |
602 | 604 | ||
605 | struct drm_i915_gem_get_aperture { | ||
606 | /** Total size of the aperture used by i915_gem_execbuffer, in bytes */ | ||
607 | uint64_t aper_size; | ||
608 | |||
609 | /** | ||
610 | * Available space in the aperture used by i915_gem_execbuffer, in | ||
611 | * bytes | ||
612 | */ | ||
613 | uint64_t aper_available_size; | ||
614 | }; | ||
615 | |||
603 | #endif /* _I915_DRM_H_ */ | 616 | #endif /* _I915_DRM_H_ */ |