summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_ioctl.c8
-rw-r--r--include/drm/drm.h2
2 files changed, 10 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;
}
diff --git a/include/drm/drm.h b/include/drm/drm.h
index da4efd162d5..9ac43139617 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -752,6 +752,8 @@ struct drm_event_vblank {
__u32 reserved;
};
+#define DRM_CAP_DUMB_BUFFER 0x1
+
/* typedef area */
#ifndef __KERNEL__
typedef struct drm_clip_rect drm_clip_rect_t;