summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_crt.c4
-rw-r--r--src/i830_cursor.c12
-rw-r--r--src/i830_display.c8
-rw-r--r--src/i830_driver.c30
-rw-r--r--src/i830_randr.c6
6 files changed, 31 insertions, 31 deletions
diff --git a/src/i830.h b/src/i830.h
index 9e5c8442..333b595d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -447,7 +447,7 @@ typedef struct _I830Rec {
Bool checkDevices;
/* [0] is Pipe A, [1] is Pipe B. */
- int availablePipes;
+ int num_pipes;
/* [0] is display plane A, [1] is display plane B. */
I830PipeRec pipes[MAX_DISPLAY_PIPES];
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 4c6c3ca5..adc2d624 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -174,12 +174,12 @@ i830_crt_detect_load(ScrnInfoPtr pScrn)
int pipeconf_reg, bclrpat_reg, dpll_reg;
int pipe;
- for (pipe = 0; pipe < pI830->availablePipes; pipe++)
+ for (pipe = 0; pipe < pI830->num_pipes; pipe++)
if (!pI830->pipes[pipe].planeEnabled)
break;
/* No available pipes for load detection */
- if (pipe == pI830->availablePipes)
+ if (pipe == pI830->num_pipes)
return FALSE;
if (pipe == 0) {
diff --git a/src/i830_cursor.c b/src/i830_cursor.c
index 6b0e58c4..05e93faf 100644
--- a/src/i830_cursor.c
+++ b/src/i830_cursor.c
@@ -86,7 +86,7 @@ I830SetPipeCursorBase (ScrnInfoPtr pScrn, int pipe)
int cursor_base = (pipe == 0 ? CURSOR_A_BASE : CURSOR_B_BASE);
I830MemRange *cursor_mem;
- if (pipe >= pI830->availablePipes)
+ if (pipe >= pI830->num_pipes)
FatalError("Bad pipe number for cursor base setting\n");
if (pI830->CursorIsARGB)
@@ -180,11 +180,11 @@ I830InitHWCursor(ScrnInfoPtr pScrn)
int i;
DPRINTF(PFX, "I830InitHWCursor\n");
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
pI830->pipes[i].cursorShown = FALSE;
/* Initialise the HW cursor registers, leaving the cursor hidden. */
if (IS_MOBILE(pI830) || IS_I9XX(pI830)) {
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
{
int cursor_control = i == 0 ? CURSOR_A_CONTROL : CURSOR_B_CONTROL;
temp = INREG(cursor_control);
@@ -484,7 +484,7 @@ I830SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
x -= hotspotx;
y -= hotspoty;
- for (pipe = 0; pipe < pI830->availablePipes; pipe++)
+ for (pipe = 0; pipe < pI830->num_pipes; pipe++)
{
I830PipePtr pI830Pipe = &pI830->pipes[pipe];
DisplayModePtr mode = &pI830Pipe->curMode;
@@ -550,7 +550,7 @@ I830ShowCursor(ScrnInfoPtr pScrn)
pI830->CursorMemARGB->Physical, pI830->CursorMemARGB->Start);
pI830->cursorOn = TRUE;
- for (pipe = 0; pipe < pI830->availablePipes; pipe++)
+ for (pipe = 0; pipe < pI830->num_pipes; pipe++)
I830SetPipeCursor (pScrn, pipe, TRUE);
}
@@ -563,7 +563,7 @@ I830HideCursor(ScrnInfoPtr pScrn)
DPRINTF(PFX, "I830HideCursor\n");
pI830->cursorOn = FALSE;
- for (pipe = 0; pipe < pI830->availablePipes; pipe++)
+ for (pipe = 0; pipe < pI830->num_pipes; pipe++)
I830SetPipeCursor (pScrn, pipe, TRUE);
}
diff --git a/src/i830_display.c b/src/i830_display.c
index c9b6b4dd..6c5645b9 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -673,7 +673,7 @@ i830DisableUnusedFunctions(ScrnInfoPtr pScrn)
* internal TV) should have no outputs trying to pull data out of it, so
* we're ready to turn those off.
*/
- for (i = 0; i < pI830->availablePipes; i++) {
+ for (i = 0; i < pI830->num_pipes; i++) {
I830PipePtr pI830Pipe = &pI830->pipes[i];
int dspcntr_reg = pipe == 0 ? DSPACNTR : DSPBCNTR;
int pipeconf_reg = pipe == 0 ? PIPEACONF : PIPEBCONF;
@@ -749,13 +749,13 @@ i830SetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode)
didLock = I830DRILock(pScrn);
#endif
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
pI830->pipes[i].planeEnabled = i830PipeInUse (pScrn, i);
for (i = 0; i < pI830->num_outputs; i++)
pI830->output[i].pre_set_mode(pScrn, &pI830->output[i], pMode);
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
{
if (pI830->pipes[i].planeEnabled)
ok = i830PipeSetMode(pScrn, i830PipeFindClosestMode(pScrn, i, pMode),
@@ -815,7 +815,7 @@ i830DescribeOutputConfiguration(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Output configuration:\n");
- for (i = 0; i < pI830->availablePipes; i++) {
+ for (i = 0; i < pI830->num_pipes; i++) {
CARD32 dspcntr = INREG(DSPACNTR + (DSPBCNTR - DSPACNTR) * i);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 92c27af8..8d9712ae 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -542,7 +542,7 @@ I830LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
DPRINTF(PFX, "I830LoadPalette: numColors: %d\n", numColors);
pI830 = I830PTR(pScrn);
- for(p=0; p < pI830->availablePipes; p++) {
+ for(p=0; p < pI830->num_pipes; p++) {
I830PipePtr pI830Pipe = &pI830->pipes[p];
if (p == 0) {
@@ -1080,14 +1080,14 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
}
if (pI830->PciInfo->chipType == PCI_CHIP_E7221_G)
- pI830->availablePipes = 1;
+ pI830->num_pipes = 1;
else
if (IS_MOBILE(pI830) || IS_I9XX(pI830))
- pI830->availablePipes = 2;
+ pI830->num_pipes = 2;
else
- pI830->availablePipes = 1;
+ pI830->num_pipes = 1;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%d display pipe%s available.\n",
- pI830->availablePipes, pI830->availablePipes > 1 ? "s" : "");
+ pI830->num_pipes, pI830->num_pipes > 1 ? "s" : "");
/*
* Get the pre-allocated (stolen) memory size.
@@ -1231,7 +1231,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
} while (sub);
}
- if (pI830->availablePipes == 1 && pI830->MonType2 != PIPE_NONE) {
+ if (pI830->num_pipes == 1 && pI830->MonType2 != PIPE_NONE) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Monitor 2 cannot be specified on single pipe devices\n");
return FALSE;
@@ -1308,7 +1308,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
#endif
if (xf86ReturnOptValBool(pI830->Options, OPTION_CLONE, FALSE)) {
- if (pI830->availablePipes == 1) {
+ if (pI830->num_pipes == 1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Can't enable Clone Mode because this is a single pipe device\n");
PreInitCleanup(pScrn);
@@ -1334,7 +1334,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
switch (pI830->output[i].type) {
case I830_OUTPUT_LVDS:
/* LVDS must live on pipe B for two-pipe devices */
- pI830->output[i].pipe = pI830->availablePipes - 1;
+ pI830->output[i].pipe = pI830->num_pipes - 1;
break;
case I830_OUTPUT_ANALOG:
pI830->output[i].pipe = 0;
@@ -2091,7 +2091,7 @@ SaveHWState(ScrnInfoPtr pScrn)
temp = INREG(PIPEACONF);
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEACONF is 0x%08lx\n",
(unsigned long) temp);
- if (pI830->availablePipes == 2) {
+ if (pI830->num_pipes == 2) {
temp = INREG(PIPEBCONF);
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEBCONF is 0x%08lx\n",
(unsigned long) temp);
@@ -2123,7 +2123,7 @@ SaveHWState(ScrnInfoPtr pScrn)
pI830->savePaletteA[i] = INREG(PALETTE_A + (i << 2));
}
- if(pI830->availablePipes == 2) {
+ if(pI830->num_pipes == 2) {
pI830->savePIPEBCONF = INREG(PIPEBCONF);
pI830->savePIPEBSRC = INREG(PIPEBSRC);
pI830->saveDSPBCNTR = INREG(DSPBCNTR);
@@ -2234,7 +2234,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
OUTREG(PALETTE_A + (i << 2), pI830->savePaletteA[i]);
}
- if(pI830->availablePipes == 2) {
+ if(pI830->num_pipes == 2) {
OUTREG(FPB0, pI830->saveFPB0);
OUTREG(FPB1, pI830->saveFPB1);
OUTREG(DPLL_B, pI830->saveDPLL_B);
@@ -3171,7 +3171,7 @@ i830AdjustFrame(int scrnIndex, int x, int y, int flags)
pI830->AccelInfoRec->NeedToSync = FALSE;
}
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
if (pI830->pipes[i].planeEnabled)
i830PipeSetBase(pScrn, i, x, y);
}
@@ -3279,7 +3279,7 @@ I830EnterVT(int scrnIndex, int flags)
SetHWOperatingState(pScrn);
/* Mark that we'll need to re-set the mode for sure */
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
memset(&pI830->pipes[i].curMode, 0, sizeof(pI830->pipes[i].curMode));
if (!i830SetMode(pScrn, pScrn->currentMode))
@@ -3423,7 +3423,7 @@ I830SaveScreen(ScreenPtr pScreen, int mode)
DPRINTF(PFX, "I830SaveScreen: %d, on is %s\n", mode, BOOLTOSTRING(on));
if (pScrn->vtSema) {
- for (i = 0; i < pI830->availablePipes; i++) {
+ for (i = 0; i < pI830->num_pipes; i++) {
if (i == 0) {
ctrl = DSPACNTR;
base = DSPABASE;
@@ -3474,7 +3474,7 @@ I830DisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
pI830->output[i].dpms(pScrn, &pI830->output[i], PowerManagementMode);
}
- for (i = 0; i < pI830->availablePipes; i++) {
+ for (i = 0; i < pI830->num_pipes; i++) {
if (i == 0) {
ctrl = DSPACNTR;
base = DSPABASE;
diff --git a/src/i830_randr.c b/src/i830_randr.c
index afa18483..84727a61 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -752,7 +752,7 @@ I830RandRSetInfo12 (ScreenPtr pScreen)
if (!RROutputSetClones (randrp->outputs[i], clones, nclone))
return FALSE;
}
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
I830RandRCrtcNotify (randrp->crtcs[i]);
return TRUE;
}
@@ -785,7 +785,7 @@ I830RandRCreateScreenResources12 (ScreenPtr pScreen)
/*
* Create RandR resources, then probe them
*/
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
{
randrp->crtcs[i] = RRCrtcCreate (pScreen, (void *) i);
RRCrtcGammaSetSize (randrp->crtcs[i], 256);
@@ -821,7 +821,7 @@ I830RandRCreateScreenResources12 (ScreenPtr pScreen)
mmHeight);
}
- for (i = 0; i < pI830->availablePipes; i++)
+ for (i = 0; i < pI830->num_pipes; i++)
i830PipeSetBase(pScrn, i, 0, 0);
return I830RandRSetInfo12 (pScreen);