diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index d959837ae..d8d1b4485 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -116,7 +116,7 @@ dumb_bo_unmap(int fd, struct dumb_bo *bo) } #endif -static int +int dumb_bo_destroy(int fd, struct dumb_bo *bo) { struct drm_mode_destroy_dumb arg; @@ -137,8 +137,8 @@ dumb_bo_destroy(int fd, struct dumb_bo *bo) return 0; } -static struct dumb_bo * -dumb_get_bo_from_handle(int fd, int handle, int pitch, int size) +struct dumb_bo * +dumb_get_bo_from_fd(int fd, int handle, int pitch, int size) { struct dumb_bo *bo; int ret; @@ -164,7 +164,7 @@ drmmode_SetSlaveBO(PixmapPtr ppix, msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); ppriv->backing_bo = - dumb_get_bo_from_handle(drmmode->fd, fd_handle, pitch, size); + dumb_get_bo_from_fd(drmmode->fd, fd_handle, pitch, size); if (!ppriv->backing_bo) return FALSE; diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.h b/hw/xfree86/drivers/modesetting/drmmode_display.h index 438743b01..c7e7ef0ca 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.h +++ b/hw/xfree86/drivers/modesetting/drmmode_display.h @@ -121,6 +121,9 @@ Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_free_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmmode, int *depth, int *bpp); +struct dumb_bo *dumb_get_bo_from_fd(int drm_fd, int fd, int pitch, int size); +int dumb_bo_destroy(int fd, struct dumb_bo *bo); + #ifndef DRM_CAP_DUMB_PREFERRED_DEPTH #define DRM_CAP_DUMB_PREFERRED_DEPTH 3