diff options
author | Eric Anholt <eric@anholt.net> | 2007-07-26 10:14:17 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-07-26 10:15:11 -0700 |
commit | cf2d569daca6954d11a796f4d110148ae2e0c827 (patch) | |
tree | a90aa9eed7d107671af12a0c4d3886e4f51c0fc3 /shared-core | |
parent | 03e932e32be6ae3de6994c6893c813a34623ad7d (diff) |
Replace NO_MOVE/NO_EVICT flags to buffer objects with an ioctl to set pinning.
This cleans up the create/validate interfaces for this very uncommon path, and
makes pinned object creation much easier to use for the X Server.
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/drm.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h index db913b1f..57d1dbec 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -689,14 +689,6 @@ struct drm_fence_arg { */ /* - * Mask: Never evict this buffer. Not even with force. This type of buffer is only - * available to root and must be manually removed before buffer manager shutdown - * or lock. - * Flags: Acknowledge - */ -#define DRM_BO_FLAG_NO_EVICT (1ULL << 4) - -/* * Mask: Require that the buffer is placed in mappable memory when validated. * If not set the buffer may or may not be in mappable memory when validated. * Flags: If set, the buffer is in mappable memory. @@ -813,6 +805,16 @@ struct drm_bo_op_req { struct drm_bo_info_req bo_req; }; +struct drm_bo_set_pin_req { + /** Buffer object ID */ + unsigned int handle; + /** + * - 0: Unpin the given buffer object. + * - 1: Pin the given buffer object. + */ + unsigned int pin; +}; + /* * Reply flags */ @@ -878,6 +880,13 @@ struct drm_bo_op_arg { unsigned int pad64; }; +struct drm_bo_set_pin_arg { + union { + struct drm_bo_set_pin_req req; + struct drm_bo_info_rep rep; + } d; +}; + #define DRM_BO_MEM_LOCAL 0 #define DRM_BO_MEM_TT 1 #define DRM_BO_MEM_VRAM 2 @@ -993,7 +1002,7 @@ struct drm_mm_init_arg { #define DRM_IOCTL_BO_OP DRM_IOWR(0xd3, struct drm_bo_op_arg) #define DRM_IOCTL_BO_INFO DRM_IOWR(0xd4, struct drm_bo_reference_info_arg) #define DRM_IOCTL_BO_WAIT_IDLE DRM_IOWR(0xd5, struct drm_bo_map_wait_idle_arg) - +#define DRM_IOCTL_BO_SET_PIN DRM_IOWR(0xd6, struct drm_bo_set_pin_arg) /*@}*/ |