summaryrefslogtreecommitdiff
path: root/linux-core/drm_objects.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-02-18 10:39:21 +1000
committerDave Airlie <airlied@linux.ie>2008-03-06 05:37:54 +1000
commitd5c0101252e9f48ef1b59f48c05fea7007df97f0 (patch)
tree01535953771262eddc3b18ac1dbd210db608aaa9 /linux-core/drm_objects.h
parent180c9188f4cb7163f1e3e7d5098eaabf29a98540 (diff)
ttm: make sure userspace can't destroy kernel create memory managers
this adds something to say the kernel initialised the memory region not the userspace. and blocks userspace from deallocating kernel areas
Diffstat (limited to 'linux-core/drm_objects.h')
-rw-r--r--linux-core/drm_objects.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h
index ae0725c1..69e3f67f 100644
--- a/linux-core/drm_objects.h
+++ b/linux-core/drm_objects.h
@@ -516,6 +516,7 @@ struct drm_buffer_object {
struct drm_mem_type_manager {
int has_type;
int use_type;
+ int kern_init_type;
struct drm_mm manager;
struct list_head lru;
struct list_head pinned;
@@ -684,9 +685,10 @@ extern int drm_bo_mem_space(struct drm_buffer_object *bo,
extern int drm_bo_move_buffer(struct drm_buffer_object *bo,
uint64_t new_mem_flags,
int no_wait, int move_unfenced);
-extern int drm_bo_clean_mm(struct drm_device *dev, unsigned mem_type);
+extern int drm_bo_clean_mm(struct drm_device *dev, unsigned mem_type, int kern_clean);
extern int drm_bo_init_mm(struct drm_device *dev, unsigned type,
- unsigned long p_offset, unsigned long p_size);
+ unsigned long p_offset, unsigned long p_size,
+ int kern_init);
extern int drm_bo_handle_validate(struct drm_file *file_priv, uint32_t handle,
uint64_t flags, uint64_t mask, uint32_t hint,
uint32_t fence_class, int use_old_fence_class,