summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_drv.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-01-18 09:33:17 +1300
committerEric Anholt <eric@anholt.net>2015-12-07 20:04:57 -0800
commitd5bc60f6ad05b3c676b057bec662cfafc3ee24dd (patch)
tree5604e8a60ed54b6557152769796d09a5f7d3f3df /drivers/gpu/drm/vc4/vc4_drv.c
parentc826a6e1064419f78855463cf29ce9e8b9d25bf4 (diff)
downloadlwn-d5bc60f6ad05b3c676b057bec662cfafc3ee24dd.tar.gz
lwn-d5bc60f6ad05b3c676b057bec662cfafc3ee24dd.zip
drm/vc4: Add create and map BO ioctls.
While there exist dumb APIs for creating and mapping BOs, one of the rules is that drivers doing 3D acceleration have to provide their own APIs for buffer allocation (besides, the pitch/height parameters of the dumb alloc don't really make sense for a lot of 3D allocations). v2: Use __u32-style types, use "drm.h" instead of <drm/drm.h>. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index da041fac0731..5fa468864ec8 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include "drm_fb_cma_helper.h"
+#include "uapi/drm/vc4_drm.h"
#include "vc4_drv.h"
#include "vc4_regs.h"
@@ -73,6 +74,8 @@ static const struct file_operations vc4_drm_fops = {
};
static const struct drm_ioctl_desc vc4_drm_ioctls[] = {
+ DRM_IOCTL_DEF_DRV(VC4_CREATE_BO, vc4_create_bo_ioctl, 0),
+ DRM_IOCTL_DEF_DRV(VC4_MMAP_BO, vc4_mmap_bo_ioctl, 0),
};
static struct drm_driver vc4_drm_driver = {