Run indent

This commit is contained in:
Alan Hourihane 2008-05-28 15:55:36 +01:00
parent 106bea5ad1
commit f9f7a872bf
5 changed files with 813 additions and 800 deletions

View File

@ -65,12 +65,15 @@ static Bool SaveHWState(ScrnInfoPtr pScrn);
static Bool RestoreHWState(ScrnInfoPtr pScrn); static Bool RestoreHWState(ScrnInfoPtr pScrn);
static void Identify(int flags); static void Identify(int flags);
static const OptionInfoRec *AvailableOptions(int chipid, int busid); static const OptionInfoRec *AvailableOptions(int chipid, int busid);
static ModeStatus ValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); static ModeStatus ValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose,
int flags);
static void FreeScreen(int scrnIndex, int flags); static void FreeScreen(int scrnIndex, int flags);
static void LeaveVT(int scrnIndex, int flags); static void LeaveVT(int scrnIndex, int flags);
static Bool SwitchMode(int scrnIndex, DisplayModePtr mode, int flags); static Bool SwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
static Bool ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv); static Bool ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc,
char **argv);
static Bool PreInit(ScrnInfoPtr pScrn, int flags); static Bool PreInit(ScrnInfoPtr pScrn, int flags);
#if XSERVER_LIBPCIACCESS #if XSERVER_LIBPCIACCESS
static Bool static Bool
pci_probe(DriverPtr driver, pci_probe(DriverPtr driver,
@ -187,8 +190,7 @@ Setup(pointer module, pointer opts, int *errmaj, int *errmin)
* Tell the loader about symbols from other modules that this module * Tell the loader about symbols from other modules that this module
* might refer to. * might refer to.
*/ */
LoaderRefSymLists(fbSymbols, LoaderRefSymLists(fbSymbols, shadowSymbols, ddcSymbols, NULL);
shadowSymbols, ddcSymbols, NULL);
/* /*
* The return value must be non-NULL on success even though there * The return value must be non-NULL on success even though there
@ -266,8 +268,7 @@ Probe(DriverPtr drv, int flags)
* Find the config file Device sections that match this * Find the config file Device sections that match this
* driver, and return if there are none. * driver, and return if there are none.
*/ */
if ((numDevSections = if ((numDevSections = xf86MatchDevice("modesetting", &devSections)) <= 0) {
xf86MatchDevice("modesetting", &devSections)) <= 0) {
return FALSE; return FALSE;
} }
@ -283,14 +284,18 @@ Probe(DriverPtr drv, int flags)
for (ppPci = VideoInfo; ppPci != NULL && *ppPci != NULL; ppPci++) { for (ppPci = VideoInfo; ppPci != NULL && *ppPci != NULL; ppPci++) {
for (numDevs = 0; numDevs < numDevSections; numDevs++) { for (numDevs = 0; numDevs < numDevSections; numDevs++) {
if (devSections[numDevs]->busID && *devSections[numDevs]->busID) { if (devSections[numDevs]->busID && *devSections[numDevs]->busID) {
if (xf86ComparePciBusString(devSections[numDevs]->busID, (*ppPci)->bus, (*ppPci)->device, (*ppPci)->func)) { if (xf86ComparePciBusString
(devSections[numDevs]->busID, (*ppPci)->bus,
(*ppPci)->device, (*ppPci)->func)) {
/* Claim slot */ /* Claim slot */
if (xf86CheckPciSlot((*ppPci)->bus, (*ppPci)->device, if (xf86CheckPciSlot((*ppPci)->bus, (*ppPci)->device,
(*ppPci)->func)) { (*ppPci)->func)) {
usedChips[numUsed++] = xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device, usedChips[numUsed++] =
(*ppPci)->func, drv, (*ppPci)->chipType, xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device,
NULL, TRUE); (*ppPci)->func, drv,
ErrorF("CLAIMED %d %d %d\n",(*ppPci)->bus,(*ppPci)->device, (*ppPci)->func); (*ppPci)->chipType, NULL, TRUE);
ErrorF("CLAIMED %d %d %d\n", (*ppPci)->bus,
(*ppPci)->device, (*ppPci)->func);
} }
} }
} }
@ -328,7 +333,8 @@ Probe(DriverPtr drv, int flags)
{ {
/* Allocate an entity private if necessary */ /* Allocate an entity private if necessary */
if (modesettingEntityIndex < 0) if (modesettingEntityIndex < 0)
modesettingEntityIndex = xf86AllocateEntityPrivateIndex(); modesettingEntityIndex =
xf86AllocateEntityPrivateIndex();
pPriv = xf86GetEntityPrivate(pScrn->entityList[0], pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
modesettingEntityIndex); modesettingEntityIndex);
@ -469,7 +475,8 @@ crtc_resize(ScrnInfoPtr pScrn, int width, int height)
pScrn->bitsPerPixel / 8, 0, NULL, pScrn->bitsPerPixel / 8, 0, NULL,
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE
| DRM_BO_FLAG_NO_EVICT | DRM_BO_FLAG_MAPPABLE | | DRM_BO_FLAG_NO_EVICT | DRM_BO_FLAG_MAPPABLE |
DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_TT, DRM_BO_HINT_DONT_FENCE, &ms->bo); DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_TT,
DRM_BO_HINT_DONT_FENCE, &ms->bo);
MapMem(pScrn); MapMem(pScrn);
@ -479,8 +486,7 @@ crtc_resize(ScrnInfoPtr pScrn, int width, int height)
pScrn->depth, pScrn->depth,
pScrn->bitsPerPixel, pScrn->bitsPerPixel,
pScrn->displayWidth * pScrn->bitsPerPixel / 8, pScrn->displayWidth * pScrn->bitsPerPixel / 8,
ms->bo.handle, ms->bo.handle, &ms->fb_id);
&ms->fb_id);
if (ms->shadowFB) { if (ms->shadowFB) {
if ((ms->shadowMem = if ((ms->shadowMem =
@ -792,7 +798,8 @@ ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pScrn->bitsPerPixel / 8, 0, NULL, pScrn->bitsPerPixel / 8, 0, NULL,
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE
| DRM_BO_FLAG_NO_EVICT | DRM_BO_FLAG_MAPPABLE | | DRM_BO_FLAG_NO_EVICT | DRM_BO_FLAG_MAPPABLE |
DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_TT, DRM_BO_HINT_DONT_FENCE, &ms->bo); DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_TT,
DRM_BO_HINT_DONT_FENCE, &ms->bo);
MapMem(pScrn); MapMem(pScrn);
@ -802,8 +809,7 @@ ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pScrn->depth, pScrn->depth,
pScrn->bitsPerPixel, pScrn->bitsPerPixel,
pScrn->displayWidth * pScrn->bitsPerPixel / 8, pScrn->displayWidth * pScrn->bitsPerPixel / 8,
ms->bo.handle, ms->bo.handle, &ms->fb_id);
&ms->fb_id);
if (ms->shadowFB) { if (ms->shadowFB) {
if ((ms->shadowMem = if ((ms->shadowMem =
@ -909,7 +915,8 @@ AdjustFrame(int scrnIndex, int x, int y, int flags)
xf86CrtcPtr crtc = output->crtc; xf86CrtcPtr crtc = output->crtc;
if (crtc && crtc->enabled) { if (crtc && crtc->enabled) {
crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x, y); crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x,
y);
crtc->x = output->initial_x + x; crtc->x = output->initial_x + x;
crtc->y = output->initial_y + y; crtc->y = output->initial_y + y;
} }

View File

@ -36,14 +36,16 @@
#define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg); #define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg);
typedef struct { typedef struct
{
int lastInstance; int lastInstance;
int refCount; int refCount;
ScrnInfoPtr pScrn_1; ScrnInfoPtr pScrn_1;
ScrnInfoPtr pScrn_2; ScrnInfoPtr pScrn_2;
} EntRec, *EntPtr; } EntRec, *EntPtr;
typedef struct _modesettingRec { typedef struct _modesettingRec
{
int fd; int fd;
unsigned int fb_id; unsigned int fb_id;
void *virtual; void *virtual;

View File

@ -192,7 +192,9 @@ ExaInit(ScrnInfoPtr pScrn)
} }
/* Create a 256KB offscreen area */ /* Create a 256KB offscreen area */
drmBOCreate(ms->fd, 256 * 1024, 0, NULL, DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MEM_TT, DRM_BO_HINT_DONT_FENCE, &ms->exa_bo); drmBOCreate(ms->fd, 256 * 1024, 0, NULL,
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MEM_TT,
DRM_BO_HINT_DONT_FENCE, &ms->exa_bo);
memset(pExa, 0, sizeof(*pExa)); memset(pExa, 0, sizeof(*pExa));
pExa->exa_major = 2; pExa->exa_major = 2;

View File

@ -257,9 +257,11 @@ output_init(ScrnInfoPtr pScrn)
strncpy(name, prop->enums[v].name, strlen(name)); strncpy(name, prop->enums[v].name, strlen(name));
} }
} }
if (name) break; if (name)
break;
} }
if (name) break; if (name)
break;
} }
} }