diff options
author | Dave Airlie <airlied@linux.ie> | 2008-05-08 14:01:24 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-05-08 14:02:05 +1000 |
commit | ed072ed075ec431b0746ac1aa8bad5f687d75d8c (patch) | |
tree | ec69b2280384472f8111f1ca0831390e7ac2df03 /libdrm/xf86drmMode.c | |
parent | df46e0691bdd62da8ccc6b3811f57731dd5a2a4b (diff) |
drm_mode: initial replacefb implemenation
Diffstat (limited to 'libdrm/xf86drmMode.c')
-rw-r--r-- | libdrm/xf86drmMode.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c index 605377dd..ae15fd65 100644 --- a/libdrm/xf86drmMode.c +++ b/libdrm/xf86drmMode.c @@ -608,3 +608,24 @@ int drmCheckModesettingSupported(const char *busid) return -ENOSYS; } + +int drmModeReplaceFB(int fd, uint32_t buffer_id, + uint32_t width, uint32_t height, uint8_t depth, + uint8_t bpp, uint32_t pitch, uint32_t bo_handle) +{ + struct drm_mode_fb_cmd f; + int ret; + + f.width = width; + f.height = height; + f.pitch = pitch; + f.bpp = bpp; + f.depth = depth; + f.handle = bo_handle; + f.buffer_id = buffer_id; + + if ((ret = ioctl(fd, DRM_IOCTL_MODE_REPLACEFB, &f))) + return ret; + + return 0; +} |