diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml index c33dc360c..dde711724 100644 --- a/hw/xfree86/doc/ddxDesign.xml +++ b/hw/xfree86/doc/ddxDesign.xml @@ -6774,30 +6774,6 @@ programming the standard VGA registers, and for handling VGA colourmaps. -
- - Bool vgaHWSetRegCounts(ScrnInfoPtr pScrn, int numCRTC, - int numSequencer, int numGraphics, int numAttribute); - -
- This function allows the number of CRTC, Sequencer, Graphics and - Attribute registers to be changed. This makes it possible for - extended registers to be saved and restored with - vgaHWSave() and vgaHWRestore(). - This function should be called after a vgaHWRec - has been allocated with vgaHWGetHWRec(). The - default values are defined in vgaHW.h as follows: - - -#define VGA_NUM_CRTC 25 -#define VGA_NUM_SEQ 5 -#define VGA_NUM_GFX 9 -#define VGA_NUM_ATTR 21 - - - -
-
Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); @@ -7021,11 +6997,6 @@ programming the standard VGA registers, and for handling VGA colourmaps. - - The number of registers actually saved may be modified by a prior call - to vgaHWSetRegCounts(). - -
@@ -7105,11 +7076,6 @@ programming the standard VGA registers, and for handling VGA colourmaps. - - The number of registers actually restored may be modified by a prior call - to vgaHWSetRegCounts(). - -
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c index c4f78dedc..cb66a118b 100644 --- a/hw/xfree86/vgahw/vgaHW.c +++ b/hw/xfree86/vgahw/vgaHW.c @@ -1511,75 +1511,6 @@ vgaHWAllocDefaultRegs(vgaRegPtr regp) return vgaHWAllocRegs(regp); } -Bool -vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, - int numGraphics, int numAttribute) -{ -#define VGAHWMINNUM(regtype) \ - ((newMode.num##regtype < regp->num##regtype) ? \ - (newMode.num##regtype) : (regp->num##regtype)) -#define VGAHWCOPYREGSET(regtype) \ - memcpy (newMode.regtype, regp->regtype, VGAHWMINNUM(regtype)) - - vgaRegRec newMode, newSaved; - vgaRegPtr regp; - - regp = &VGAHWPTR(scrp)->ModeReg; - memcpy(&newMode, regp, sizeof(vgaRegRec)); - - /* allocate space for new registers */ - - regp = &newMode; - regp->numCRTC = numCRTC; - regp->numSequencer = numSequencer; - regp->numGraphics = numGraphics; - regp->numAttribute = numAttribute; - if (!vgaHWAllocRegs(regp)) - return FALSE; - - regp = &VGAHWPTR(scrp)->SavedReg; - memcpy(&newSaved, regp, sizeof(vgaRegRec)); - - regp = &newSaved; - regp->numCRTC = numCRTC; - regp->numSequencer = numSequencer; - regp->numGraphics = numGraphics; - regp->numAttribute = numAttribute; - if (!vgaHWAllocRegs(regp)) { - vgaHWFreeRegs(&newMode); - return FALSE; - } - - /* allocations succeeded, copy register data into new space */ - - regp = &VGAHWPTR(scrp)->ModeReg; - VGAHWCOPYREGSET(CRTC); - VGAHWCOPYREGSET(Sequencer); - VGAHWCOPYREGSET(Graphics); - VGAHWCOPYREGSET(Attribute); - - regp = &VGAHWPTR(scrp)->SavedReg; - VGAHWCOPYREGSET(CRTC); - VGAHWCOPYREGSET(Sequencer); - VGAHWCOPYREGSET(Graphics); - VGAHWCOPYREGSET(Attribute); - - /* free old register arrays */ - - regp = &VGAHWPTR(scrp)->ModeReg; - vgaHWFreeRegs(regp); - memcpy(regp, &newMode, sizeof(vgaRegRec)); - - regp = &VGAHWPTR(scrp)->SavedReg; - vgaHWFreeRegs(regp); - memcpy(regp, &newSaved, sizeof(vgaRegRec)); - - return TRUE; - -#undef VGAHWMINNUM -#undef VGAHWCOPYREGSET -} - Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src) { diff --git a/hw/xfree86/vgahw/vgaHW.h b/hw/xfree86/vgahw/vgaHW.h index 3c32fa7bd..a7564e7bc 100644 --- a/hw/xfree86/vgahw/vgaHW.h +++ b/hw/xfree86/vgahw/vgaHW.h @@ -191,9 +191,6 @@ extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); -extern _X_EXPORT Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, - int numSequencer, int numGraphics, - int numAttribute); extern _X_EXPORT Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp); extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp);