summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDavid Airlie <airlied@asimov.stargames.com.au>2007-04-11 17:13:45 +1000
committerDavid Airlie <airlied@asimov.stargames.com.au>2007-04-11 17:13:45 +1000
commita6cc6a778f8b2f86300a8ce87441d044fd67f930 (patch)
tree22bec4c9765ac635e363a072e2587c7fd8b3ce80 /libdrm
parentc582eaac194411f52a2c0527ffa093b5a422d7b9 (diff)
add support for setting a framebuffer depth
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c3
-rw-r--r--libdrm/xf86drmMode.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 7f0252ce..04fb07dc 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -190,7 +190,7 @@ err_allocs:
return r;
}
-int drmModeAddFB(int fd, uint32_t width, uint32_t height,
+int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
uint8_t bpp, uint32_t pitch, drmBO *bo, uint32_t *buf_id)
{
struct drm_mode_fb_cmd f;
@@ -200,6 +200,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height,
f.height = height;
f.pitch = pitch;
f.bpp = bpp;
+ f.depth = depth;
f.handle = bo->handle;
if (ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index 4ca9e407..cdc82f7d 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -215,7 +215,7 @@ extern drmModeFrameBufferPtr drmModeGetFB(int fd,
/**
* Creates a new framebuffer with an buffer object as its scanout buffer.
*/
-extern int drmModeAddFB(int fd, uint32_t width, uint32_t height,
+extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
uint8_t bpp, uint32_t pitch, drmBO *bo, uint32_t *buf_id);
/**
* Destroies the given framebuffer.