diff options
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r-- | include/drm/i915_drm.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 8e1e92583fbc..7e0cb1da92e6 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -185,6 +185,7 @@ typedef struct _drm_i915_sarea { | |||
185 | #define DRM_I915_GEM_GET_APERTURE 0x23 | 185 | #define DRM_I915_GEM_GET_APERTURE 0x23 |
186 | #define DRM_I915_GEM_MMAP_GTT 0x24 | 186 | #define DRM_I915_GEM_MMAP_GTT 0x24 |
187 | #define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 | 187 | #define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 |
188 | #define DRM_I915_GEM_MADVISE 0x26 | ||
188 | 189 | ||
189 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 190 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
190 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 191 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
@@ -221,6 +222,7 @@ typedef struct _drm_i915_sarea { | |||
221 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) | 222 | #define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) |
222 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) | 223 | #define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) |
223 | #define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id) | 224 | #define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id) |
225 | #define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) | ||
224 | 226 | ||
225 | /* Allow drivers to submit batchbuffers directly to hardware, relying | 227 | /* Allow drivers to submit batchbuffers directly to hardware, relying |
226 | * on the security mechanisms provided by hardware. | 228 | * on the security mechanisms provided by hardware. |
@@ -667,4 +669,21 @@ struct drm_i915_get_pipe_from_crtc_id { | |||
667 | __u32 pipe; | 669 | __u32 pipe; |
668 | }; | 670 | }; |
669 | 671 | ||
672 | #define I915_MADV_WILLNEED 0 | ||
673 | #define I915_MADV_DONTNEED 1 | ||
674 | #define __I915_MADV_PURGED 2 /* internal state */ | ||
675 | |||
676 | struct drm_i915_gem_madvise { | ||
677 | /** Handle of the buffer to change the backing store advice */ | ||
678 | __u32 handle; | ||
679 | |||
680 | /* Advice: either the buffer will be needed again in the near future, | ||
681 | * or wont be and could be discarded under memory pressure. | ||
682 | */ | ||
683 | __u32 madv; | ||
684 | |||
685 | /** Whether the backing store still exists. */ | ||
686 | __u32 retained; | ||
687 | }; | ||
688 | |||
670 | #endif /* _I915_DRM_H_ */ | 689 | #endif /* _I915_DRM_H_ */ |