Discussion:
[PATCH xf86-video-mga 1/4] Eliminate unused variables
Kevin Brace
2018-11-26 19:15:31 UTC
Permalink
Care had to be taken to properly handle XAA usage situation

Signed-off-by: Kevin Brace <***@gmx.com>
---
src/mga_bios.c | 1 -
src/mga_dacG.c | 6 +-----
src/mga_dri.c | 5 +++--
src/mga_driver.c | 3 +--
src/mga_storm.c | 11 ++++++++++-
src/mga_video.c | 11 ++++++++++-
6 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/src/mga_bios.c b/src/mga_bios.c
index a391b2c..f4198d0 100644
--- a/src/mga_bios.c
+++ b/src/mga_bios.c
@@ -297,7 +297,6 @@ Bool mga_read_and_process_bios( ScrnInfoPtr pScrn )
#ifndef XSERVER_LIBPCIACCESS
Bool pciBIOS = TRUE;
#endif
- int rlen;
static const unsigned expected_length[] = { 0, 64, 64, 64, 128, 128 };
unsigned version;
unsigned pins_len;
diff --git a/src/mga_dacG.c b/src/mga_dacG.c
index 3b0d93e..b86ad39 100644
--- a/src/mga_dacG.c
+++ b/src/mga_dacG.c
@@ -827,12 +827,8 @@ MGAG200EHPIXPLLSET(ScrnInfoPtr pScrn, MGARegPtr mgaReg)
{
MGAPtr pMga = MGAPTR(pScrn);

- unsigned long ulFallBackCounter, ulLoopCount, ulLockCheckIterations = 0, ulTempCount, ulVCount;
+ unsigned long ulLoopCount, ulLockCheckIterations = 0, ulTempCount, ulVCount;
unsigned char ucTempByte, ucPixCtrl, ucPLLLocked = FALSE;
- unsigned char ucM;
- unsigned char ucN;
- unsigned char ucP;
- unsigned char ucS;

while(ulLockCheckIterations <= 32 && ucPLLLocked == FALSE)
{
diff --git a/src/mga_dri.c b/src/mga_dri.c
index a285f01..6867d8f 100644
--- a/src/mga_dri.c
+++ b/src/mga_dri.c
@@ -121,12 +121,13 @@ static void MGAWaitForIdleDMA( ScrnInfoPtr pScrn )
void MGAGetQuiescence( ScrnInfoPtr pScrn )
{
MGAPtr pMga = MGAPTR(pScrn);
+#ifdef USE_XAA
+ MGAFBLayout *pLayout = &pMga->CurrentLayout;
+#endif /* USE_XAA */

pMga->haveQuiescense = 1;

if ( pMga->directRenderingEnabled ) {
- MGAFBLayout *pLayout = &pMga->CurrentLayout;
-
MGAWaitForIdleDMA( pScrn );

/* FIXME what about EXA? */
diff --git a/src/mga_driver.c b/src/mga_driver.c
index 636e985..0fa9d9a 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -2651,7 +2651,7 @@ MGAMapMem(ScrnInfoPtr pScrn)
#ifdef XSERVER_LIBPCIACCESS
struct pci_device *const dev = pMga->PciInfo;
struct pci_mem_region *region;
- int i, err;
+ int err;
#endif


@@ -3173,7 +3173,6 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL)
vgaHWPtr hwp;
MGAPtr pMga;
MGARamdacPtr MGAdac;
- int ret;
VisualPtr visual;
unsigned char *FBStart;
int width, height, displayWidth;
diff --git a/src/mga_storm.c b/src/mga_storm.c
index 3e0d382..28349c2 100644
--- a/src/mga_storm.c
+++ b/src/mga_storm.c
@@ -577,10 +577,19 @@ Bool mgaAccelInit( ScreenPtr pScreen )
#endif
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
- int maxFastBlitMem, maxlines;
+// int maxFastBlitMem, maxlines;
+#ifdef HAVE_XAA_H
+ int maxFastBlitMem;
+#endif /* HAVE_XAA_H */
+ int maxlines;
+
+#if defined(HAVE_XAA_H) && defined(RENDER)
Bool doRender = FALSE;
+#endif /* defined(HAVE_XAA_H) && defined(RENDER) */
BoxRec AvailFBArea;
+#ifdef HAVE_XAA_H
int i;
+#endif /* HAVE_XAA_H */

pMga->ScratchBuffer = malloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
if(!pMga->ScratchBuffer) return FALSE;
diff --git a/src/mga_video.c b/src/mga_video.c
index cb6b9c9..881f88c 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -565,8 +565,12 @@ MGAAllocateMemory(
void **mem_struct,
int size
){
+#if defined(USE_XAA) || defined(USE_EXA)
MGAPtr pMga = MGAPTR(pScrn);
+#endif /* defined(USE_XAA) || defined(USE_EXA) */
+#ifdef USE_XAA
ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+#endif /* USE_XAA */
int offset = 0;

#ifdef USE_EXA
@@ -644,7 +648,9 @@ MGAAllocateMemory(
static void
MGAFreeMemory(ScrnInfoPtr pScrn, void *mem_struct)
{
+#if defined(USE_XAA) || defined(USE_EXA)
MGAPtr pMga = MGAPTR(pScrn);
+#endif /* defined(USE_XAA) || defined(USE_EXA) */

#ifdef USE_EXA
if (pMga->Exa) {
@@ -1805,7 +1811,10 @@ static void MGACopyILOAD(
CARD32 *fb_ptr;
CARD8 *ubuf, *vbuf;
CARD32 *pu, *pv;
- int k,l;
+#ifdef CUSTOM_MEMCOPY
+ int k;
+#endif /* CUSTOM_MEMCOPY */
+ int l;
short clip_x1, clip_x2, tmp_w;

#ifdef DEBUG_MGA2164
--
2.7.4

_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info
Kevin Brace
2018-11-26 19:15:32 UTC
Permalink
Signed-off-by: Kevin Brace <***@gmx.com>
---
src/mga_dacG.c | 21 ---------------------
src/mga_driver.c | 10 ----------
src/mga_video.c | 18 ++++++++++++------
3 files changed, 12 insertions(+), 37 deletions(-)

diff --git a/src/mga_dacG.c b/src/mga_dacG.c
index b86ad39..d5a7689 100644
--- a/src/mga_dacG.c
+++ b/src/mga_dacG.c
@@ -58,7 +58,6 @@ MGAG200E4ComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulVCOMax, ulVCOMin;
unsigned int ulTestP;
@@ -81,8 +80,6 @@ MGAG200E4ComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulFoInternal = lFo * 2;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = ulFoInternal * 5 / 1000;

for (i = 0 ; i < P_ARRAY_SIZE ; i++)
{
@@ -125,7 +122,6 @@ MGAG200SEComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulVCOMax, ulVCOMin;
unsigned int ulTestP;
@@ -138,8 +134,6 @@ MGAG200SEComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulPLLFreqRef = 25000;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestP = 8; ulTestP > 0; ulTestP >>= 1) {
@@ -170,7 +164,6 @@ MGAG200EVComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulTestP;
unsigned int ulTestM;
@@ -184,8 +177,6 @@ MGAG200EVComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulPLLFreqRef = 50000;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestP = 16; ulTestP > 0; ulTestP--) {
@@ -221,7 +212,6 @@ MGAG200WBComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulVCOMax, ulVCOMin;
unsigned int ulTestP;
@@ -244,8 +234,6 @@ MGAG200WBComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulTestMEnd = 16;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestP = ulTestPStart; ulTestP < 9; ulTestP++) {
@@ -281,7 +269,6 @@ MGAG200EW3ComputePLLParam(ScrnInfoPtr pScrn ,long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulVCOMax, ulVCOMin;
unsigned int ulTestP1;
@@ -311,8 +298,6 @@ MGAG200EW3ComputePLLParam(ScrnInfoPtr pScrn ,long lFo, int *M, int *N, int *P)
ulTestNEnd = 2048;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestP1 = ulTestP1Start; ulTestP1 < ulTestP1End; ulTestP1++) {
@@ -349,7 +334,6 @@ MGAG200EHComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulTestP;
unsigned int ulTestM;
@@ -363,8 +347,6 @@ MGAG200EHComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulPLLFreqRef = 33333;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestP = 16; ulTestP > 0; ulTestP>>= 1) {
@@ -398,7 +380,6 @@ MGAG200EH3ComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
{
unsigned int ulComputedFo;
unsigned int ulFDelta;
- unsigned int ulFPermitedDelta;
unsigned int ulFTmpDelta;
unsigned int ulTestP;
unsigned int ulTestM;
@@ -414,8 +395,6 @@ MGAG200EH3ComputePLLParam(ScrnInfoPtr pScrn, long lFo, int *M, int *N, int *P)
ulTestP = 0;

ulFDelta = 0xFFFFFFFF;
- /* Permited delta is 0.5% as VESA Specification */
- ulFPermitedDelta = lFo * 5 / 1000;

/* Then we need to minimize the M while staying within 0.5% */
for (ulTestM = 150; ulTestM >= 6; ulTestM--) {
diff --git a/src/mga_driver.c b/src/mga_driver.c
index 0fa9d9a..441600a 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -700,7 +700,6 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
intptr_t match_data)
{
ScrnInfoPtr pScrn = NULL;
- EntityInfoPtr pEnt;
MGAPtr pMga;

if (pci_device_has_kernel_driver(dev)) {
@@ -758,7 +757,6 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_device * dev,
* For cards that can do dual head per entity, mark the entity
* as sharable.
*/
- pEnt = xf86GetEntityInfo(entity_num);
if (pMga->chip_attribs->dual_head_possible) {
MGAEntPtr pMgaEnt = NULL;
DevUnion *pPriv;
@@ -3179,9 +3177,6 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL)
MGAEntPtr pMgaEnt = NULL;
int f;
CARD32 VRTemp = 0, FBTemp = 0;
-#ifdef MGADRI
- MessageType driFrom = X_DEFAULT;
-#endif
DPMSSetProcPtr mga_dpms_set_proc = NULL;

hwp = VGAHWPTR(pScrn);
@@ -3363,20 +3358,16 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Not supported by hardware, not initializing the DRI\n");
pMga->directRenderingEnabled = FALSE;
- driFrom = X_PROBED;
} else if (!xf86ReturnOptValBool(pMga->Options, OPTION_DRI, TRUE)) {
- driFrom = X_CONFIG;
} else if ( pMga->NoAccel ) {
xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
"Acceleration disabled, not initializing the DRI\n" );
pMga->directRenderingEnabled = FALSE;
- driFrom = X_CONFIG;
}
else if ( pMga->TexturedVideo == TRUE ) {
xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
"Textured video enabled, not initializing the DRI\n" );
pMga->directRenderingEnabled = FALSE;
- driFrom = X_CONFIG;
}
else if (pMga->SecondCrtc == TRUE) {
xf86DrvMsg( pScrn->scrnIndex, X_ERROR,
@@ -3391,7 +3382,6 @@ MGAScreenInit(SCREEN_INIT_ARGS_DECL)
"Need at least %d kB video memory at this resolution, bit depth\n",
(3 * displayWidth * height * (pScrn->bitsPerPixel >> 3)) / 1024 );
pMga->directRenderingEnabled = FALSE;
- driFrom = X_PROBED;
}
else {
pMga->directRenderingEnabled = MGADRIScreenInit(pScreen);
diff --git a/src/mga_video.c b/src/mga_video.c
index 881f88c..8d77af8 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -1530,7 +1530,12 @@ static void MGACopyScaledILOAD(
CARD32 *fb_ptr;
unsigned char *ubuf, *vbuf, *tbuf;
CARD32 *pu, *pv;
- int k,l, pl, dl, xds, yds;
+ int k,l;
+#ifdef MGA2164_BLIT_DUP
+ int pl;
+#endif /* MGA2164_BLIT_DUP */
+ int dl;
+ int xds, yds;
short box_h;
short scr_pitch = ( pScrn->virtualX + 15) & ~15;

@@ -1616,8 +1621,10 @@ static void MGACopyScaledILOAD(
ubuf=vbuf+width*height/4;
pu = (CARD32 *)(ubuf+(src_y/2)*(width/2));
pv = (CARD32 *)(vbuf+(src_y/2)*(width/2));
-
- for(pl=-1,dl=0;dl<box_h;dl++) {
+#ifdef MGA2164_BLIT_DUP
+ pl = -1;
+#endif /* MGA2164_BLIT_DUP */
+ for(dl=0;dl<box_h;dl++) {
int beta;
l=(dl+(pbox->y1-drw_y))*src_h/drw_h;
/* FIXME: check the math */
@@ -1774,7 +1781,9 @@ static void MGACopyScaledILOAD(
default:
break;
}
+#ifdef MGA2164_BLIT_DUP
pl=l;
+#endif /* MGA2164_BLIT_DUP */
} else {
/* dup lines */

@@ -1981,7 +1990,6 @@ MGAPutImageILOAD(
MGAPortPrivPtr pPriv = pMga->portPrivate;
INT32 x1, x2, y1, y2;
int dstPitch = 0;
- int bpp;
BoxRec dstBox;
int nbox;
BoxPtr pbox;
@@ -1997,8 +2005,6 @@ MGAPutImageILOAD(
clipBoxes, width, height))
return Success;

- bpp = pScrn->bitsPerPixel >> 3;
-
#ifdef HAVE_XAA_H
if( pMga->AccelInfoRec->NeedToSync && ((long)data != pPriv->lastPort) ) {
MGAStormSync(pScrn);
--
2.7.4

_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/x
Kevin Brace
2018-11-26 19:15:33 UTC
Permalink
Signed-off-by: Kevin Brace <***@gmx.com>
---
src/mga.h | 2 +-
src/mga_dga.c | 8 ++++----
src/mga_driver.c | 4 ++--
src/mga_storm.c | 28 ++++++++++++++--------------
src/mga_video.c | 4 ++--
5 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/mga.h b/src/mga.h
index bfb43b8..f47b0af 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -559,7 +559,7 @@ typedef struct {
CARD32 MAccess;
int FifoSize;
int StyleLen;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
XAAInfoRecPtr AccelInfoRec;
#endif
xf86CursorInfoPtr CursorInfoRec;
diff --git a/src/mga_dga.c b/src/mga_dga.c
index ef03688..66e6a09 100644
--- a/src/mga_dga.c
+++ b/src/mga_dga.c
@@ -15,7 +15,7 @@ static Bool MGA_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
static Bool MGA_SetMode(ScrnInfoPtr, DGAModePtr);
static int MGA_GetViewport(ScrnInfoPtr);
static void MGA_SetViewport(ScrnInfoPtr, int, int, int);
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
static void MGA_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void MGA_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
static void MGA_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,
@@ -30,7 +30,7 @@ DGAFunctionRec MGA_DGAFuncs = {
MGA_SetViewport,
MGA_GetViewport,
MGAStormSync,
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
MGA_FillRect,
MGA_BlitRect,
MGA_BlitTransRect
@@ -124,7 +124,7 @@ SECOND_PASS:
mode->flags = DGA_CONCURRENT_ACCESS;
if(pixmap)
mode->flags |= DGA_PIXMAP_AVAILABLE;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
if(!pMga->NoAccel) {
mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
if((Bpp != 3) && (pMga->Chipset != PCI_CHIP_MGA2064))
@@ -365,7 +365,7 @@ MGA_SetViewport(
pMga->DGAViewportStatus = 0; /* MGAAdjustFrame loops until finished */
}

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
static void
MGA_FillRect (
ScrnInfoPtr pScrn,
diff --git a/src/mga_driver.c b/src/mga_driver.c
index 441600a..94183db 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -1969,7 +1969,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
pMga->NoAccel = FALSE;
pMga->Exa = FALSE;
#ifdef USE_EXA
-#ifndef HAVE_XAA_H
+#ifndef USE_XAA
pMga->Exa = TRUE;
#endif
if (!xf86NameCmp(s, "EXA")) {
@@ -3148,7 +3148,7 @@ MGACrtc2FillStrip(ScrnInfoPtr pScrn)
(pScrn->bitsPerPixel >> 3) * pScrn->displayWidth * pScrn->virtualY);
} else {
xf86SetLastScrnFlag(pScrn->entityList[0], pScrn->scrnIndex);
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
pMga->RestoreAccelState(pScrn);
pMga->SetupForSolidFill(pScrn, 0, GXcopy, 0xFFFFFFFF);
pMga->SubsequentSolidFillRect(pScrn, pScrn->virtualX, 0,
diff --git a/src/mga_storm.c b/src/mga_storm.c
index 28349c2..08dfa20 100644
--- a/src/mga_storm.c
+++ b/src/mga_storm.c
@@ -57,7 +57,7 @@ do { \
XAAMoveDWORDS((d),(s),(c)); \
} while (0)

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
static void mgaSetupForSolidFill( ScrnInfoPtr pScrn, int color,
int rop, unsigned int planemask );

@@ -572,29 +572,29 @@ MGASubsequentCPUToScreenTexture (

Bool mgaAccelInit( ScreenPtr pScreen )
{
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
XAAInfoRecPtr infoPtr;
#endif
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
// int maxFastBlitMem, maxlines;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
int maxFastBlitMem;
-#endif /* HAVE_XAA_H */
+#endif /* USE_XAA */
int maxlines;

-#if defined(HAVE_XAA_H) && defined(RENDER)
+#if defined(USE_XAA) && defined(RENDER)
Bool doRender = FALSE;
-#endif /* defined(HAVE_XAA_H) && defined(RENDER) */
+#endif /* defined(USE_XAA) && defined(RENDER) */
BoxRec AvailFBArea;
-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
int i;
-#endif /* HAVE_XAA_H */
+#endif /* USE_XAA */

pMga->ScratchBuffer = malloc(((pScrn->displayWidth * pMga->CurrentLayout.bitsPerPixel) + 127) >> 3);
if(!pMga->ScratchBuffer) return FALSE;

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
pMga->AccelInfoRec = infoPtr = XAACreateInfoRec();
if(!infoPtr) return FALSE;
#endif
@@ -630,7 +630,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
pMga->AtypeNoBLK = MGAAtypeNoBLK;
}

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
/* fill out infoPtr here */
infoPtr->Flags = PIXMAP_CACHE |
OFFSCREEN_PIXMAPS |
@@ -937,7 +937,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )

}

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
for (i = 0; i < pScrn->numEntities; i++) {
if (xf86IsEntityShared(pScrn->entityList[i])) {
infoPtr->RestoreAccelState = mgaRestoreAccelState;
@@ -976,7 +976,7 @@ Bool mgaAccelInit( ScreenPtr pScreen )
}


-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
/* Support for multiscreen */
static void mgaRestoreAccelState(ScrnInfoPtr pScrn)
{
@@ -1105,7 +1105,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
opmode &= ~0x30000;
#endif

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
pMga->SetupForSolidFill = mgaSetupForSolidFill;
pMga->SubsequentSolidFillRect = mgaSubsequentSolidFillRect;
pMga->RestoreAccelState = mgaRestoreAccelState;
@@ -1184,7 +1184,7 @@ void MGAStormEngineInit( ScrnInfoPtr pScrn )
}


-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
static void
MGASetClippingRectangle(
ScrnInfoPtr pScrn,
diff --git a/src/mga_video.c b/src/mga_video.c
index 8d77af8..d703e48 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -2005,7 +2005,7 @@ MGAPutImageILOAD(
clipBoxes, width, height))
return Success;

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
if( pMga->AccelInfoRec->NeedToSync && ((long)data != pPriv->lastPort) ) {
MGAStormSync(pScrn);
}
@@ -2039,7 +2039,7 @@ MGAPutImageILOAD(
pbox++;
}

-#ifdef HAVE_XAA_H
+#ifdef USE_XAA
pMga->AccelInfoRec->NeedToSync = TRUE;
#endif
pPriv->videoStatus = FREE_TIMER;
--
2.7.4

_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listin
Kevin Brace
2018-11-26 19:15:34 UTC
Permalink
Signed-off-by: Kevin Brace <***@gmx.com>
---
src/mga.h | 3 ++-
src/mga_arc.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mga.h b/src/mga.h
index f47b0af..1a7cb47 100644
--- a/src/mga.h
+++ b/src/mga.h
@@ -737,8 +737,9 @@ Bool mgaExaInit(ScreenPtr pScreen);

Bool MGAHWCursorInit(ScreenPtr pScreen);

-
+#ifdef USE_XAA
void MGAPolyArcThinSolid(DrawablePtr, GCPtr, int, xArc*);
+#endif /* USE_XAA */

Bool MGADGAInit(ScreenPtr pScreen);

diff --git a/src/mga_arc.c b/src/mga_arc.c
index 61ade3b..3c9dd42 100644
--- a/src/mga_arc.c
+++ b/src/mga_arc.c
@@ -59,6 +59,7 @@ in this Software without prior written authorization from The Open Group.
OUTREG(MGAREG_YDSTLEN + MGAREG_EXEC, ((y) << 16) | 1); \
}

+#ifdef USE_XAA
static void
MGAZeroArc(
DrawablePtr pDraw,
@@ -220,4 +221,5 @@ MGAPolyArcThinSolid (
miPolyArc(pDraw, pGC, 1, arc);
}
}
+#endif /* USE_XAA */
--
2.7.4

_______________________________________________
xorg-***@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Loading...