diff options
author | Dave Airlie <airlied@redhat.com> | 2012-04-02 09:11:50 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-18 06:12:16 -0400 |
commit | 4271a4090068f9dec3784205391c59540130b132 (patch) | |
tree | 39cf41a082b95eb33a0d352120fec4a49fcc8bbd /drivers/gpu/drm/drm_ioctl.c | |
parent | cfcbd6d3de7f75f7c5a07d3fac8e1949bbbc79e0 (diff) |
drm/prime: expose capability flags for userspace.
This lets the kernel tell userspace if the device supports prime
import/export.
This is useful for -modesetting at least, but would be nice for other
drivers.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index cf85155da2a..64a62c69731 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -283,6 +283,10 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
283 | case DRM_CAP_DUMB_PREFER_SHADOW: | 283 | case DRM_CAP_DUMB_PREFER_SHADOW: |
284 | req->value = dev->mode_config.prefer_shadow; | 284 | req->value = dev->mode_config.prefer_shadow; |
285 | break; | 285 | break; |
286 | case DRM_CAP_PRIME: | ||
287 | req->value |= dev->driver->prime_fd_to_handle ? DRM_PRIME_CAP_IMPORT : 0; | ||
288 | req->value |= dev->driver->prime_handle_to_fd ? DRM_PRIME_CAP_EXPORT : 0; | ||
289 | break; | ||
286 | default: | 290 | default: |
287 | return -EINVAL; | 291 | return -EINVAL; |
288 | } | 292 | } |