summaryrefslogtreecommitdiff
path: root/x11/xf86-video-intel/patches/patch-src_compat-api_h
blob: 945182fb78d96dd917c79f1b125e3eb8696b18bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$OpenBSD$

Index: src/compat-api.h
--- src/compat-api.h.orig
+++ src/compat-api.h
@@ -30,6 +30,7 @@
 
 #include <xorg-server.h>
 #include <xorgVersion.h>
+#include <xf86Module.h>
 
 #include <picturestr.h>
 #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
@@ -42,6 +43,10 @@
 #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
 #endif
 
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 22
+#define HAVE_NOTIFY_FD 1
+#endif
+
 #ifndef XF86_SCRN_INTERFACE
 
 #define SCRN_ARG_TYPE int
@@ -213,4 +218,28 @@ static inline void FreePixmap(PixmapPtr pixmap)
 
 #endif
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0)
+#include <mi.h>
+#define miHandleExposures(pSrcDrawable, pDstDrawable, \
+                         pGC, srcx, srcy, width, height, \
+                         dstx, dsty, plane) \
+       miHandleExposures(pSrcDrawable, pDstDrawable, \
+                         pGC, srcx, srcy, width, height, \
+                         dstx, dsty)
+#endif
+
+#endif
+
+#if HAS_DIRTYTRACKING_ROTATION
+#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
+#endif
+
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(22, 0)
+#define OsBlockSIGIO()
+#define OsReleaseSIGIO()
+#endif
+
+#if !HAVE_NOTIFY_FD
+#define SetNotifyFd(fd, cb, mode, data) AddGeneralSocket(fd);
+#define RemoveNotifyFd(fd) RemoveGeneralSocket(fd)
 #endif