# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/xf86-video-impact/xorg-server-compat.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- xf86-video-impact/src/impact.h.vanilla 2024-04-09 20:40:14.141840681 +0200 +++ xf86-video-impact/src/impact.h 2024-04-09 21:00:02.234835467 +0200 @@ -23,9 +23,13 @@ #include "xf86cmap.h" /* xaa & hardware cursor */ +#ifdef USE_XAA #include "xaa.h" +#endif #include "xf86Cursor.h" +#include "compat-api.h" + /* register definitions of the Impact card */ #include "impact_regs.h" --- xf86-video-impact/src/impact_driver.c.vanilla 2024-04-09 20:42:19.674840130 +0200 +++ xf86-video-impact/src/impact_driver.c 2024-04-09 21:10:10.218832799 +0200 @@ -46,8 +46,6 @@ /* Drivers using the mi SW cursor need: */ #include "mipointer.h" -/* Drivers using the mi implementation of backing store need: */ -#include "mibstore.h" /* Drivers using the mi colourmap code need: */ #include "micmap.h" @@ -89,10 +87,10 @@ static const OptionInfoRec * ImpactAvailableOptions(int chipid, int busid); static Bool ImpactProbe(DriverPtr drv, int flags); static Bool ImpactPreInit(ScrnInfoPtr pScrn, int flags); -static Bool ImpactScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv); -static Bool ImpactEnterVT(int scrnIndex, int flags); -static void ImpactLeaveVT(int scrnIndex, int flags); -static Bool ImpactCloseScreen(int scrnIndex, ScreenPtr pScreen); +static Bool ImpactScreenInit(SCREEN_INIT_ARGS_DECL); +static Bool ImpactEnterVT(VT_FUNC_ARGS_DECL); +static void ImpactLeaveVT(VT_FUNC_ARGS_DECL); +static Bool ImpactCloseScreen(CLOSE_SCREEN_ARGS_DECL); static Bool ImpactSaveScreen(ScreenPtr pScreen, int mode); static unsigned ImpactHWProbe(struct probed_id probedIDs[],int lim); /* return number of found boards */ static Bool ImpactModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); @@ -134,7 +132,7 @@ MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, - XF86_VERSION_CURRENT, + XORG_VERSION_CURRENT, IMPACT_MAJOR_VERSION, IMPACT_MINOR_VERSION, IMPACT_PATCHLEVEL, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, @@ -495,7 +493,7 @@ } static Bool -ImpactScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) +ImpactScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScrn; ImpactPtr pImpact; @@ -504,7 +502,7 @@ int i; /* First get a pointer to our private info */ - pScrn = xf86Screens[pScreen->myNum]; + pScrn = xf86ScreenToScrn(pScreen); pImpact = IMPACTPTR(pScrn); /* map the Impactregs until the server dies */ @@ -561,7 +559,6 @@ /* must be after RGB ordering fixed */ fbPictureInit (pScreen, 0, 0); - miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); xf86SetBlackWhitePixels(pScreen); @@ -610,25 +607,25 @@ /* called when switching away from a VT */ static Bool -ImpactEnterVT(int scrnIndex, int flags) +ImpactEnterVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = arg; return ImpactModeInit(pScrn, pScrn->currentMode); } /* called when switching to a VT */ static void -ImpactLeaveVT(int scrnIndex, int flags) +ImpactLeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = arg; ImpactRestore(pScrn, FALSE); } /* called at the end of each server generation */ static Bool -ImpactCloseScreen(int scrnIndex, ScreenPtr pScreen) +ImpactCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ImpactPtr pImpact = IMPACTPTR(pScrn); ImpactRestore(pScrn, TRUE); @@ -640,18 +637,15 @@ if (pScreen->CloseScreen == ImpactCloseScreen) pScreen->CloseScreen = pImpact->CloseScreen; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } /* Blank or unblank the screen */ static Bool ImpactSaveScreen(ScreenPtr pScreen, int mode) { - ScrnInfoPtr pScrn; - ImpactPtr pImpact; - - pScrn = xf86Screens[pScreen->myNum]; - pImpact = IMPACTPTR(pScrn); + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImpactPtr pImpact = IMPACTPTR(pScrn); ImpactVc3BlankScreen(pScrn, !xf86IsUnblank(mode)); return TRUE; --- xf86-video-impact/src/impact_cursor.c.vanilla 2024-04-09 20:50:02.444838099 +0200 +++ xf86-video-impact/src/impact_cursor.c 2024-04-09 20:53:22.819837220 +0200 @@ -30,7 +30,7 @@ Bool ImpactHWCursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ImpactPtr pImpact = IMPACTPTR(pScrn); ImpactRegsPtr pImpactRegs = IMPACTREGSPTR(pScrn); xf86CursorInfoPtr infoPtr;