aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_ioctl.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-03-04 14:50:28 +1000
committerDave Airlie <airlied@redhat.com>2011-03-04 15:56:22 +1000
commite73f88af66fcc50083fae4b7e1c39b469179a97a (patch)
tree5c4a7a9a9c7223d017f3ab17708d6f57cebdb8d7 /drivers/gpu/drm/drm_ioctl.c
parent9f35421e09c494c36079d7cf5724ae9f832431d7 (diff)
drm: add cap bit to denote if dumb ioctl is available or not.
This allows libkms to make an easier decision. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r--drivers/gpu/drm/drm_ioctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index d6de9d042b7..7f6912a1676 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -275,6 +275,14 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
struct drm_get_cap *req = data;
req->value = 0;
+ switch (req->capability) {
+ case DRM_CAP_DUMB_BUFFER:
+ if (dev->driver->dumb_create)
+ req->value = 1;
+ break;
+ default:
+ return -EINVAL;
+ }
return 0;
}