diff options
author | Eric Anholt <eric@anholt.net> | 2007-09-21 17:05:21 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-09-21 17:12:19 -0700 |
commit | 24e33627c5dfb92324a9faf1c7d366e7f33e622a (patch) | |
tree | ad03240f73433518b42eeabd4fad14e8ee34184e /shared-core/drm.h | |
parent | 7587e9682c1b70930c015915d588b42ccd00c7c4 (diff) | |
parent | e7bfeb3031374653f7e55d67cc1b5c823849359f (diff) |
Merge branch 'bo-set-pin'
This branch replaces the NO_MOVE/NO_EVICT flags to buffer validation with a
separate privileged ioctl to pin buffers like NO_EVICT meant before. The
functionality that was supposed to be covered by NO_MOVE may be reintroduced
later, possibly in a different way, after the superioctl branch is merged.
Diffstat (limited to 'shared-core/drm.h')
-rw-r--r-- | shared-core/drm.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h index a9882d49..30c7a1a3 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -671,14 +671,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. @@ -795,6 +787,18 @@ 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, requiring that its offset and + * memory area stay constant until unpin. The intended use is for + * scanout buffers. + */ + unsigned int pin; +}; + /* * Reply flags */ @@ -860,6 +864,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 @@ -975,7 +986,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) /*@}*/ |