mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 04:08:02 +02:00
xwayland: switch to drm-uapi headers
Always build DMA_BUF_IOCTL_*_SYNC_FILE code. Fixes:6f85ce4d4e("xwayland: support DRI3 1.4 and Present 1.4") Fixes:3df236a3d5("xwayland: add functions to import and export dma-buf implicit fences")
This commit is contained in:
parent
5f74fa4d5a
commit
20e6ab4133
1 changed files with 2 additions and 13 deletions
|
|
@ -35,11 +35,9 @@
|
|||
#include <sys/stat.h>
|
||||
#include <xf86drm.h>
|
||||
#include <drm_fourcc.h>
|
||||
#if defined(__linux__)
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/sync_file.h>
|
||||
#include "drm-uapi/dma-buf.h"
|
||||
#include "drm-uapi/sync_file.h"
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#define MESA_EGL_NO_X11_HEADERS
|
||||
#define EGL_NO_X11
|
||||
|
|
@ -886,7 +884,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);
|
||||
|
||||
|
|
@ -921,7 +918,6 @@ xwl_glamor_dmabuf_export_sync_file(PixmapPtr pixmap)
|
|||
sync_file = merge_args.fence;
|
||||
}
|
||||
}
|
||||
#endif /* DMA_BUF_IOCTL_EXPORT_SYNC_FILE */
|
||||
return sync_file;
|
||||
}
|
||||
|
||||
|
|
@ -939,7 +935,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);
|
||||
|
||||
|
|
@ -964,7 +959,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);
|
||||
}
|
||||
|
||||
|
|
@ -1207,12 +1201,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 = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue