summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brace <kevinbrace@gmx.com>2018-11-26 11:01:33 -0800
committerKevin Brace <kevinbrace@gmx.com>2018-11-26 11:01:33 -0800
commitc5922dcc3ff26c9b1291e90ecedee35f97bc51c8 (patch)
tree5561d9f7faff579747693aae7df48c1bf1056f25
parent8db8f6b3f323a9d9cd934172c9f4d4a93a6b7394 (diff)
Eliminate set but unused variables
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r--src/mga_dacG.c21
-rw-r--r--src/mga_driver.c10
-rw-r--r--src/mga_video.c18
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);