From 8ac68476344c0b39d4819c09c92e862ff3271860 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Sat, 15 Mar 2008 21:26:25 -0300 Subject: [PATCH] Compile warning fixes. Minor reordering to avoid warnings about mixed declarations and code. --- src/smi_driver.c | 16 ++++++++-------- src/smi_exa.c | 5 ++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/smi_driver.c b/src/smi_driver.c index 11a3ef4..934311d 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1102,9 +1102,9 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) } if (!pSmi->NoAccel) { - from = X_DEFAULT; char *strptr; - + + from = X_DEFAULT; if ((strptr = (char *)xf86GetOptValString(pSmi->Options, OPTION_ACCELMETHOD))) { if (!xf86NameCmp(strptr,"XAA")) { from = X_CONFIG; @@ -2637,6 +2637,12 @@ SMI_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) /* dualhead */ if (pSmi->Dualhead) { + /* TFT panel uses FIFO1, DSTN panel uses FIFO1 for upper panel and + * FIFO2 for lower panel. I don't have a DSTN panel, so it's untested. + * -- AGD + */ + CARD32 fifo1_readoffset, fifo2_readoffset, fifo_writeoffset; + /* PLL controls */ /* set LCD to vclk2 */ new->SR69 = 0x04; @@ -2667,12 +2673,6 @@ SMI_ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) new->SR6F = 0x89; } - /* TFT panel uses FIFO1, DSTN panel uses FIFO1 for upper panel and - * FIFO2 for lower panel. I don't have a DSTN panel, so it's untested. - * -- AGD - */ - CARD32 fifo1_readoffset, fifo2_readoffset, fifo_writeoffset; - /* setting SR21 bit 2 disables ZV circuitry, * if ZV is needed, SR21 = 0x20 */ diff --git a/src/smi_exa.c b/src/smi_exa.c index 575ab65..e53f482 100644 --- a/src/smi_exa.c +++ b/src/smi_exa.c @@ -439,14 +439,13 @@ SMI_DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, { ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; SMIPtr pSmi = SMIPTR(pScrn); + unsigned char *src = pSrc->devPrivate.ptr; + int src_pitch = exaGetPixmapPitch(pSrc); ENTER_PROC("SMI_DownloadFromScreen"); DEBUG((VERBLEV, "x=%d y=%d w=%d h=%d dst=%d dst_pitch=%d\n", x, y, w, h, dst, dst_pitch)); - unsigned char *src = pSrc->devPrivate.ptr; - int src_pitch = exaGetPixmapPitch(pSrc); - exaWaitSync(pSrc->drawable.pScreen); src += (y * src_pitch) + (x * pSmi->Bpp); -- 1.5.3.2