summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdrm/xf86drmMode.c5
-rw-r--r--libdrm/xf86drmMode.h2
-rw-r--r--tests/mode/modetest.c2
-rw-r--r--tests/modedemo/demo.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 717e1fe2..dd1a6ca9 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -203,7 +203,8 @@ uint32_t drmModeGetHotplug(int fd)
}
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)
+ uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
+ uint32_t *buf_id)
{
struct drm_mode_fb_cmd f;
int ret;
@@ -213,7 +214,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
f.pitch = pitch;
f.bpp = bpp;
f.depth = depth;
- f.handle = bo->handle;
+ f.handle = bo_handle;
if (ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))
return ret;
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index 71e779d4..edf9efee 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -177,7 +177,7 @@ extern drmModeFBPtr drmModeGetFB(int fd, uint32_t bufferId);
* Creates a new framebuffer with an buffer object as its scanout buffer.
*/
extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
- uint8_t bpp, uint32_t pitch, drmBO *bo,
+ uint8_t bpp, uint32_t pitch, uint32_t bo_handle,
uint32_t *buf_id);
/**
* Destroies the given framebuffer.
diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c
index ab0cdc9c..a50b0cc5 100644
--- a/tests/mode/modetest.c
+++ b/tests/mode/modetest.c
@@ -291,7 +291,7 @@ int testFrameBufferAdd(int fd, drmModeResPtr res)
goto err;
printf("\tAdding FB\n");
- ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, &bo, &fb);
+ ret = drmModeAddFB(fd, 800, 600, 32, 8, 0, bo->handle, &fb);
if (ret)
goto err_bo;
diff --git a/tests/modedemo/demo.c b/tests/modedemo/demo.c
index db51cd66..00020bde 100644
--- a/tests/modedemo/demo.c
+++ b/tests/modedemo/demo.c
@@ -483,7 +483,7 @@ drmModeFBPtr createFB(int fd, drmModeResPtr res)
goto err;
}
- ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, &bo, &fb);
+ ret = drmModeAddFB(fd, SIZE_X, SIZE_Y, 32, 32, PITCH * 4, bo->handle, &fb);
if (ret)
goto err_bo;