}
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;
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;
* 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.
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;
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;