diff options
author | Dave Airlie <airlied@redhat.com> | 2011-03-03 23:50:28 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-03-04 00:56:22 -0500 |
commit | e73f88af66fcc50083fae4b7e1c39b469179a97a (patch) | |
tree | 5c4a7a9a9c7223d017f3ab17708d6f57cebdb8d7 /drivers | |
parent | 9f35421e09c494c36079d7cf5724ae9f832431d7 (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')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index d6de9d042b76..7f6912a16761 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) | |||
275 | struct drm_get_cap *req = data; | 275 | struct drm_get_cap *req = data; |
276 | 276 | ||
277 | req->value = 0; | 277 | req->value = 0; |
278 | switch (req->capability) { | ||
279 | case DRM_CAP_DUMB_BUFFER: | ||
280 | if (dev->driver->dumb_create) | ||
281 | req->value = 1; | ||
282 | break; | ||
283 | default: | ||
284 | return -EINVAL; | ||
285 | } | ||
278 | return 0; | 286 | return 0; |
279 | } | 287 | } |
280 | 288 | ||