xfree86: vgahw: drop obsolete vgaHWSetRegCounts
No callers left, so no need to keep it around anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1724>
This commit is contained in:
parent
515d19806c
commit
bb0295b397
|
@ -6774,30 +6774,6 @@ programming the standard VGA registers, and for handling VGA colourmaps.
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
</blockquote></para></blockquote>
|
||||||
|
|
||||||
<blockquote><para>
|
|
||||||
<programlisting>
|
|
||||||
Bool vgaHWSetRegCounts(ScrnInfoPtr pScrn, int numCRTC,
|
|
||||||
int numSequencer, int numGraphics, int numAttribute);
|
|
||||||
</programlisting>
|
|
||||||
<blockquote><para>
|
|
||||||
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
|
|
||||||
<function>vgaHWSave()</function> and <function>vgaHWRestore()</function>.
|
|
||||||
This function should be called after a <structname>vgaHWRec</structname>
|
|
||||||
has been allocated with <function>vgaHWGetHWRec()</function>. The
|
|
||||||
default values are defined in <filename>vgaHW.h</filename> as follows:
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
#define VGA_NUM_CRTC 25
|
|
||||||
#define VGA_NUM_SEQ 5
|
|
||||||
#define VGA_NUM_GFX 9
|
|
||||||
#define VGA_NUM_ATTR 21
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
|
||||||
|
|
||||||
<blockquote><para>
|
<blockquote><para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
|
Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
|
||||||
|
@ -7021,11 +6997,6 @@ programming the standard VGA registers, and for handling VGA colourmaps.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
The number of registers actually saved may be modified by a prior call
|
|
||||||
to <function>vgaHWSetRegCounts()</function>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
</blockquote></para></blockquote>
|
||||||
|
|
||||||
<blockquote><para>
|
<blockquote><para>
|
||||||
|
@ -7105,11 +7076,6 @@ programming the standard VGA registers, and for handling VGA colourmaps.
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
The number of registers actually restored may be modified by a prior call
|
|
||||||
to <function>vgaHWSetRegCounts()</function>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</blockquote></para></blockquote>
|
</blockquote></para></blockquote>
|
||||||
|
|
||||||
<blockquote><para>
|
<blockquote><para>
|
||||||
|
|
|
@ -1511,75 +1511,6 @@ vgaHWAllocDefaultRegs(vgaRegPtr regp)
|
||||||
return vgaHWAllocRegs(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
|
Bool
|
||||||
vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src)
|
vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src)
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,9 +191,6 @@ extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save);
|
||||||
extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save,
|
extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save,
|
||||||
int flags);
|
int flags);
|
||||||
extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode);
|
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 vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
|
||||||
extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp);
|
extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp);
|
||||||
extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp);
|
extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp);
|
||||||
|
|
Loading…
Reference in New Issue