Skip to content

Commit

Permalink
drm: add cap bit to denote if dumb ioctl is available or not.
Browse files Browse the repository at this point in the history
This allows libkms to make an easier decision.

Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
airlied committed Mar 4, 2011
1 parent 9f35421 commit e73f88a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/drm_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions include/drm/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e73f88a

Please sign in to comment.