diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c index f7f78560c..d21045d4d 100644 --- a/hw/xwayland/xwayland-glamor-gbm.c +++ b/hw/xwayland/xwayland-glamor-gbm.c @@ -39,11 +39,9 @@ #include #include #include -#if defined(__linux__) -#include -#include +#include "drm-uapi/dma-buf.h" +#include "drm-uapi/sync_file.h" #include -#endif #define MESA_EGL_NO_X11_HEADERS #define EGL_NO_X11 @@ -912,7 +910,6 @@ xwl_glamor_dmabuf_export_sync_file(PixmapPtr pixmap) if (!xwl_screen->glamor) return -1; -#ifdef DMA_BUF_IOCTL_EXPORT_SYNC_FILE xwl_pixmap = xwl_pixmap_get(pixmap); num_planes = gbm_bo_get_plane_count(xwl_pixmap->bo); @@ -947,7 +944,6 @@ xwl_glamor_dmabuf_export_sync_file(PixmapPtr pixmap) sync_file = merge_args.fence; } } -#endif /* DMA_BUF_IOCTL_EXPORT_SYNC_FILE */ return sync_file; } @@ -965,7 +961,6 @@ xwl_glamor_dmabuf_import_sync_file(PixmapPtr pixmap, int sync_file) if (!xwl_screen->glamor) return; -#ifdef DMA_BUF_IOCTL_IMPORT_SYNC_FILE xwl_pixmap = xwl_pixmap_get(pixmap); num_planes = gbm_bo_get_plane_count(xwl_pixmap->bo); @@ -990,7 +985,6 @@ xwl_glamor_dmabuf_import_sync_file(PixmapPtr pixmap, int sync_file) drmIoctl(plane_fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &import_args); close(plane_fd); } -#endif /* DMA_BUF_IOCTL_IMPORT_SYNC_FILE */ close(sync_file); } @@ -1234,12 +1228,7 @@ xwl_gbm_supports_syncobjs(struct xwl_screen *xwl_screen) if (errno != ENOENT) return FALSE; -#if !defined(DMA_BUF_IOCTL_EXPORT_SYNC_FILE) || \ - !defined(DMA_BUF_IOCTL_IMPORT_SYNC_FILE) - return FALSE; -#else return TRUE; -#endif } static dri3_screen_info_rec xwl_dri3_info = {