summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2012-11-16 10:21:40 +0000
committerJonathan Gray <jsg@jsg.id.au>2013-01-10 12:20:54 +1100
commitcb88de794be30d60989e7721afbe48c8deca58a5 (patch)
tree52a9a13afdefbf6c963750b6157a79d398c2ee3e /sys/dev
parent42256b3269a00c46e66f40ea6b7335cb54be0f8b (diff)
expose dumb fb ioctls
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drmP.h7
-rw-r--r--sys/dev/pci/drm/drm_crtc.c2
-rw-r--r--sys/dev/pci/drm/drm_drv.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h
index ca253cf4a7c..43877c1443f 100644
--- a/sys/dev/pci/drm/drmP.h
+++ b/sys/dev/pci/drm/drmP.h
@@ -484,6 +484,13 @@ struct drm_driver_info {
int (*gem_fault)(struct drm_obj *, struct uvm_faultinfo *, off_t,
vaddr_t, vm_page_t *, int, int, vm_prot_t, int);
+ int (*dumb_create)(struct drm_file *file_priv,
+ struct drm_device *dev, struct drm_mode_create_dumb *args);
+ int (*dumb_map_offset)(struct drm_file *file_priv,
+ struct drm_device *dev, uint32_t handle, uint64_t *offset);
+ int (*dumb_destroy)(struct drm_file *file_priv,
+ struct drm_device *dev, uint32_t handle);
+
size_t gem_size;
size_t buf_priv_size;
size_t file_priv_size;
diff --git a/sys/dev/pci/drm/drm_crtc.c b/sys/dev/pci/drm/drm_crtc.c
index 829c5401935..d8488cf45ed 100644
--- a/sys/dev/pci/drm/drm_crtc.c
+++ b/sys/dev/pci/drm/drm_crtc.c
@@ -2844,7 +2844,6 @@ void drm_mode_config_reset(struct drm_device *dev)
connector->funcs->reset(connector);
}
-#ifdef notyet
int drm_mode_create_dumb_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv)
{
@@ -2877,7 +2876,6 @@ int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
return dev->driver->dumb_destroy(file_priv, dev, args->handle);
}
-#endif
int drm_mode_handle_cmp(struct drm_mode_handle *a, struct drm_mode_handle *b)
{
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c
index f0d08f794c0..ab097dcd9b5 100644
--- a/sys/dev/pci/drm/drm_drv.c
+++ b/sys/dev/pci/drm/drm_drv.c
@@ -745,15 +745,15 @@ drmioctl(dev_t kdev, u_long cmd, caddr_t data, int flags,
return drm_mode_page_flip_ioctl(dev, data, file_priv);
case DRM_IOCTL_MODE_DIRTYFB:
return drm_mode_dirtyfb_ioctl(dev, data, file_priv);
+#endif
case DRM_IOCTL_MODE_CREATE_DUMB:
return drm_mode_create_dumb_ioctl(dev, data,
file_priv);
case DRM_IOCTL_MODE_MAP_DUMB:
- return drm_mode_mmap_dump_ioctl(dev, data, file_priv);
+ return drm_mode_mmap_dumb_ioctl(dev, data, file_priv);
case DRM_IOCTL_MODE_DESTROY_DUMB:
return drm_mode_destroy_dumb_ioctl(dev, data,
file_priv);
-#endif
}
}
if (dev->driver->ioctl != NULL)