* updated maddy (0.7.1 -> 0.8.1), untested
[t2sde.git] / package / xorg / xf86-video-impact / xorg-server-compat.patch
blob1a70bd20e738c75ae6f2606d21db697384cc81a7
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/xf86-video-impact/xorg-server-compat.patch
3 # Copyright (C) 2024 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- xf86-video-impact/src/impact.h.vanilla 2024-04-09 20:40:14.141840681 +0200
15 +++ xf86-video-impact/src/impact.h 2024-04-09 21:00:02.234835467 +0200
16 @@ -23,9 +23,13 @@
17 #include "xf86cmap.h"
19 /* xaa & hardware cursor */
20 +#ifdef USE_XAA
21 #include "xaa.h"
22 +#endif
23 #include "xf86Cursor.h"
25 +#include "compat-api.h"
27 /* register definitions of the Impact card */
28 #include "impact_regs.h"
30 --- xf86-video-impact/src/impact_driver.c.vanilla 2024-04-09 20:42:19.674840130 +0200
31 +++ xf86-video-impact/src/impact_driver.c 2024-04-09 21:10:10.218832799 +0200
32 @@ -46,8 +46,6 @@
34 /* Drivers using the mi SW cursor need: */
35 #include "mipointer.h"
36 -/* Drivers using the mi implementation of backing store need: */
37 -#include "mibstore.h"
38 /* Drivers using the mi colourmap code need: */
39 #include "micmap.h"
41 @@ -89,10 +87,10 @@
42 static const OptionInfoRec * ImpactAvailableOptions(int chipid, int busid);
43 static Bool ImpactProbe(DriverPtr drv, int flags);
44 static Bool ImpactPreInit(ScrnInfoPtr pScrn, int flags);
45 -static Bool ImpactScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
46 -static Bool ImpactEnterVT(int scrnIndex, int flags);
47 -static void ImpactLeaveVT(int scrnIndex, int flags);
48 -static Bool ImpactCloseScreen(int scrnIndex, ScreenPtr pScreen);
49 +static Bool ImpactScreenInit(SCREEN_INIT_ARGS_DECL);
50 +static Bool ImpactEnterVT(VT_FUNC_ARGS_DECL);
51 +static void ImpactLeaveVT(VT_FUNC_ARGS_DECL);
52 +static Bool ImpactCloseScreen(CLOSE_SCREEN_ARGS_DECL);
53 static Bool ImpactSaveScreen(ScreenPtr pScreen, int mode);
54 static unsigned ImpactHWProbe(struct probed_id probedIDs[],int lim); /* return number of found boards */
55 static Bool ImpactModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
56 @@ -134,7 +132,7 @@
57 MODULEVENDORSTRING,
58 MODINFOSTRING1,
59 MODINFOSTRING2,
60 - XF86_VERSION_CURRENT,
61 + XORG_VERSION_CURRENT,
62 IMPACT_MAJOR_VERSION, IMPACT_MINOR_VERSION, IMPACT_PATCHLEVEL,
63 ABI_CLASS_VIDEODRV,
64 ABI_VIDEODRV_VERSION,
65 @@ -495,7 +493,7 @@
68 static Bool
69 -ImpactScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
70 +ImpactScreenInit(SCREEN_INIT_ARGS_DECL)
72 ScrnInfoPtr pScrn;
73 ImpactPtr pImpact;
74 @@ -504,7 +502,7 @@
75 int i;
77 /* First get a pointer to our private info */
78 - pScrn = xf86Screens[pScreen->myNum];
79 + pScrn = xf86ScreenToScrn(pScreen);
80 pImpact = IMPACTPTR(pScrn);
82 /* map the Impactregs until the server dies */
83 @@ -561,7 +559,6 @@
84 /* must be after RGB ordering fixed */
85 fbPictureInit (pScreen, 0, 0);
87 - miInitializeBackingStore(pScreen);
88 xf86SetBackingStore(pScreen);
90 xf86SetBlackWhitePixels(pScreen);
91 @@ -610,25 +607,25 @@
93 /* called when switching away from a VT */
94 static Bool
95 -ImpactEnterVT(int scrnIndex, int flags)
96 +ImpactEnterVT(VT_FUNC_ARGS_DECL)
98 - ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
99 + ScrnInfoPtr pScrn = arg;
100 return ImpactModeInit(pScrn, pScrn->currentMode);
103 /* called when switching to a VT */
104 static void
105 -ImpactLeaveVT(int scrnIndex, int flags)
106 +ImpactLeaveVT(VT_FUNC_ARGS_DECL)
108 - ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
109 + ScrnInfoPtr pScrn = arg;
110 ImpactRestore(pScrn, FALSE);
113 /* called at the end of each server generation */
114 static Bool
115 -ImpactCloseScreen(int scrnIndex, ScreenPtr pScreen)
116 +ImpactCloseScreen(CLOSE_SCREEN_ARGS_DECL)
118 - ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
119 + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
120 ImpactPtr pImpact = IMPACTPTR(pScrn);
122 ImpactRestore(pScrn, TRUE);
123 @@ -640,18 +637,15 @@
125 if (pScreen->CloseScreen == ImpactCloseScreen)
126 pScreen->CloseScreen = pImpact->CloseScreen;
127 - return (*pScreen->CloseScreen)(scrnIndex, pScreen);
128 + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
131 /* Blank or unblank the screen */
132 static Bool
133 ImpactSaveScreen(ScreenPtr pScreen, int mode)
135 - ScrnInfoPtr pScrn;
136 - ImpactPtr pImpact;
138 - pScrn = xf86Screens[pScreen->myNum];
139 - pImpact = IMPACTPTR(pScrn);
140 + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
141 + ImpactPtr pImpact = IMPACTPTR(pScrn);
143 ImpactVc3BlankScreen(pScrn, !xf86IsUnblank(mode));
144 return TRUE;
145 --- xf86-video-impact/src/impact_cursor.c.vanilla 2024-04-09 20:50:02.444838099 +0200
146 +++ xf86-video-impact/src/impact_cursor.c 2024-04-09 20:53:22.819837220 +0200
147 @@ -30,7 +30,7 @@
148 Bool
149 ImpactHWCursorInit(ScreenPtr pScreen)
151 - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
152 + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
153 ImpactPtr pImpact = IMPACTPTR(pScrn);
154 ImpactRegsPtr pImpactRegs = IMPACTREGSPTR(pScrn);
155 xf86CursorInfoPtr infoPtr;