From 0e72819629741339af46d0e303f33482acdf0972 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 29 Feb 2008 14:07:29 +1000 Subject: drm: change fb api to take a bo handle not the bo pointer. --- libdrm/xf86drmMode.c | 5 +++-- libdrm/xf86drmMode.h | 2 +- tests/mode/modetest.c | 2 +- tests/modedemo/demo.c | 2 +- 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; -- cgit v1.2.3