summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h6
-rw-r--r--linux-core/drm_bo.c32
-rw-r--r--linux-core/drm_ttm.c5
-rw-r--r--linux-core/drm_ttm.h2
4 files changed, 45 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 3dd7e775..9e1e4ba8 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -1347,6 +1347,12 @@ extern int drm_fence_object_wait(drm_device_t * dev, drm_fence_object_t * fence,
extern int drm_fence_ioctl(DRM_IOCTL_ARGS);
+/*
+ * buffer objects (drm_bo.c)
+ */
+
+extern int drm_bo_ioctl(DRM_IOCTL_ARGS);
+
/* Inline replacements for DRM_IOREMAP macros */
static __inline__ void drm_core_ioremap(struct drm_map *map,
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index d87cd2a1..6a677578 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -277,6 +277,38 @@ int drm_bo_alloc_space(drm_device_t *dev, int tt, drm_buffer_object_t *buf)
}
#endif
+static int drm_do_bo_ioctl(drm_file_t *priv, int num_requests, void __user *data)
+{
+ return 0;
+}
+
+int drm_bo_ioctl(DRM_IOCTL_ARGS)
+{
+ DRM_DEVICE;
+ drm_bo_arg_t arg;
+ unsigned long data_ptr;
+ (void) dev;
+
+ DRM_COPY_FROM_USER_IOCTL(arg, (void __user *)data, sizeof(arg));
+ data_ptr = arg.data_lo;
+
+ if (sizeof(data_ptr) > 4) {
+ int shift = 32;
+ data_ptr |= arg.data_hi << shift;
+ }
+
+ switch(arg.op) {
+ case drm_op_bo:
+ return drm_do_bo_ioctl(priv, arg.num_requests,
+ (void __user *) data_ptr);
+ case drm_op_ttm:
+ return drm_ttm_ioctl(priv, arg.num_requests,
+ (drm_ttm_arg_t __user *) data_ptr);
+ }
+
+ return 0;
+}
+
diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c
index 806c109b..46878a7d 100644
--- a/linux-core/drm_ttm.c
+++ b/linux-core/drm_ttm.c
@@ -798,3 +798,8 @@ int drm_add_ttm(drm_device_t * dev, unsigned size, drm_map_list_t ** maplist)
return 0;
}
+
+int drm_ttm_ioctl(drm_file_t *priv, int num_requests, drm_ttm_arg_t __user *data)
+{
+ return 0;
+}
diff --git a/linux-core/drm_ttm.h b/linux-core/drm_ttm.h
index ea9a8372..81006c3c 100644
--- a/linux-core/drm_ttm.h
+++ b/linux-core/drm_ttm.h
@@ -148,6 +148,8 @@ extern int drm_destroy_ttm(drm_ttm_t * ttm);
extern void drm_user_destroy_region(drm_ttm_backend_list_t * entry);
extern int drm_ttm_add_mm_to_list(drm_ttm_t * ttm, struct mm_struct *mm);
extern void drm_ttm_delete_mm(drm_ttm_t * ttm, struct mm_struct *mm);
+extern int drm_ttm_ioctl(drm_file_t *priv, int num_requests,
+ drm_ttm_arg_t __user *data);
#define DRM_MASK_VAL(dest, mask, val) \
(dest) = ((dest) & ~(mask)) | ((val) & (mask));