Dash:
[t2.git] / package / xorg / xf86-video-gma500 / hotfix.patch
blobb2add1421a6457043cc2e22521b2f23a64e023ef
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../xf86-video-gma500/hotfix.patch
5 # Copyright (C) 2019 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- xf86-video-gma500/src/uxa/uxa-damage.c.vanilla 2019-09-10 13:15:28.389298420 +0000
18 +++ xf86-video-gma500/src/uxa/uxa-damage.c 2019-09-10 13:19:06.985298420 +0000
19 @@ -35,6 +35,9 @@
20 #include "picturestr.h"
21 #include "uxa-damage.h"
23 +extern void QueryGlyphExtents ( FontPtr pFont, CharInfoPtr *charinfo,
24 + unsigned long count, ExtentInfoRec *info );
26 typedef struct _damageGCPriv {
27 GCOps *ops;
28 GCFuncs *funcs;
29 --- xf86-video-gma500/src/libgma.c.vanilla 2019-09-10 13:33:09.769298420 +0000
30 +++ xf86-video-gma500/src/libgma.c 2019-09-10 13:33:38.161298420 +0000
31 @@ -8,7 +8,6 @@
32 #include <sys/mman.h>
33 #include <xf86drm.h>
34 #include <xf86.h>
35 -#include <uapi/drm/gma_drm.h>
36 #include "libgma.h"
38 struct gma_bo *gma_bo_create(int fd, uint32_t size, uint32_t type, uint32_t flags)
39 --- xf86-video-gma500/src/libgma.h.vanilla 2019-09-10 13:33:22.469298420 +0000
40 +++ xf86-video-gma500/src/libgma.h 2019-09-10 13:33:28.613298420 +0000
41 @@ -1,7 +1,7 @@
42 #ifndef _LIBGMA_H
43 #define _LIBGMA_H
45 -#include <uapi/drm/gma_drm.h>
46 +#include <drm/gma_drm.h>
48 #define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
50 --- xf86-video-gma500/src/compat-api.h.vanilla 2019-09-10 13:55:14.777298420 +0000
51 +++ xf86-video-gma500/src/compat-api.h 2019-09-10 14:38:38.097298420 +0000
52 @@ -33,6 +33,8 @@
53 #define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
54 #endif
56 +#undef XF86_HAS_SCRN_CONV
58 #ifndef XF86_HAS_SCRN_CONV
59 #define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
60 #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
61 @@ -55,15 +57,17 @@
62 #define CLOSE_SCREEN_ARGS scrnIndex, pScreen
64 #define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
65 +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
67 #define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
68 +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
70 #define FREE_SCREEN_ARGS_DECL int arg, int flags
72 #define VT_FUNC_ARGS_DECL int arg, int flags
73 #define VT_FUNC_ARGS pScrn->scrnIndex, 0
75 -#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
76 +#define XF86_SCRN_ARG(x) ((x)->scrnIndex)
77 #else
78 #define SCRN_ARG_TYPE ScrnInfoPtr
79 #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
80 @@ -73,21 +77,32 @@
82 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
84 -#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
85 -#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
86 +#if 0 //XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,17,0,0,0)
87 + #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
88 + #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
89 +#elif 0 // XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,19,0,0,0)
90 + #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, void* pTimeout, void* pReadmask
91 + #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
92 +#else
93 + #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, void* pTimeout
94 + #define BLOCKHANDLER_ARGS arg, pTimeout
95 +#endif
97 #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
98 #define CLOSE_SCREEN_ARGS pScreen
100 #define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
101 +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
103 #define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
104 +#define SWITCH_MODE_ARGS(arg, m) arg, m
106 #define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
108 #define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
109 #define VT_FUNC_ARGS pScrn
111 -#define XF86_ENABLEDISABLEFB_ARG(x) (x)
112 +#define XF86_SCRN_ARG(x) (x)
114 #endif
116 --- xf86-video-gma500/src/gma_driver.c.vanilla 2019-09-10 14:05:41.197298420 +0000
117 +++ xf86-video-gma500/src/gma_driver.c 2019-09-10 14:20:29.409298420 +0000
118 @@ -800,7 +800,7 @@
119 gma_set_surface(rootPixmap, gma->drmmode.front_bo);
121 if (gma->drmmode.shadow_enable) {
122 - if (!shadowAdd(pScreen, rootPixmap, shadowUpdatePackedWeak(),
123 + if (!shadowAdd(pScreen, rootPixmap, shadowUpdatePacked,
124 gmaShadowWindow, 0, 0))
125 return FALSE;