Run indent
This commit is contained in:
parent
106bea5ad1
commit
f9f7a872bf
|
@ -194,7 +194,7 @@ crtc_init(ScrnInfoPtr pScrn)
|
|||
|
||||
res = drmModeGetResources(ms->fd);
|
||||
if (res == 0) {
|
||||
ErrorF("Failed drmModeGetResources %d\n",errno);
|
||||
ErrorF("Failed drmModeGetResources %d\n", errno);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -210,6 +210,6 @@ crtc_init(ScrnInfoPtr pScrn)
|
|||
crtc->driver_private = drm_crtc;
|
||||
}
|
||||
|
||||
out:
|
||||
out:
|
||||
drmModeFreeResources(res);
|
||||
}
|
||||
|
|
|
@ -65,12 +65,15 @@ static Bool SaveHWState(ScrnInfoPtr pScrn);
|
|||
static Bool RestoreHWState(ScrnInfoPtr pScrn);
|
||||
static void Identify(int flags);
|
||||
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 LeaveVT(int scrnIndex, 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);
|
||||
|
||||
#if XSERVER_LIBPCIACCESS
|
||||
static Bool
|
||||
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
|
||||
* might refer to.
|
||||
*/
|
||||
LoaderRefSymLists(fbSymbols,
|
||||
shadowSymbols, ddcSymbols, NULL);
|
||||
LoaderRefSymLists(fbSymbols, shadowSymbols, ddcSymbols, NULL);
|
||||
|
||||
/*
|
||||
* 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
|
||||
* driver, and return if there are none.
|
||||
*/
|
||||
if ((numDevSections =
|
||||
xf86MatchDevice("modesetting", &devSections)) <= 0) {
|
||||
if ((numDevSections = xf86MatchDevice("modesetting", &devSections)) <= 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -283,14 +284,18 @@ Probe(DriverPtr drv, int flags)
|
|||
for (ppPci = VideoInfo; ppPci != NULL && *ppPci != NULL; ppPci++) {
|
||||
for (numDevs = 0; numDevs < numDevSections; numDevs++) {
|
||||
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 */
|
||||
if (xf86CheckPciSlot((*ppPci)->bus, (*ppPci)->device,
|
||||
(*ppPci)->func)) {
|
||||
usedChips[numUsed++] = xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device,
|
||||
(*ppPci)->func, drv, (*ppPci)->chipType,
|
||||
NULL, TRUE);
|
||||
ErrorF("CLAIMED %d %d %d\n",(*ppPci)->bus,(*ppPci)->device, (*ppPci)->func);
|
||||
usedChips[numUsed++] =
|
||||
xf86ClaimPciSlot((*ppPci)->bus, (*ppPci)->device,
|
||||
(*ppPci)->func, drv,
|
||||
(*ppPci)->chipType, NULL, TRUE);
|
||||
ErrorF("CLAIMED %d %d %d\n", (*ppPci)->bus,
|
||||
(*ppPci)->device, (*ppPci)->func);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -308,7 +313,7 @@ Probe(DriverPtr drv, int flags)
|
|||
if (numUsed > 0)
|
||||
foundScreen = TRUE;
|
||||
} else {
|
||||
ErrorF("NUMUSED %d\n",numUsed);
|
||||
ErrorF("NUMUSED %d\n", numUsed);
|
||||
for (i = 0; i < numUsed; i++) {
|
||||
ScrnInfoPtr pScrn = NULL;
|
||||
|
||||
|
@ -328,7 +333,8 @@ Probe(DriverPtr drv, int flags)
|
|||
{
|
||||
/* Allocate an entity private if necessary */
|
||||
if (modesettingEntityIndex < 0)
|
||||
modesettingEntityIndex = xf86AllocateEntityPrivateIndex();
|
||||
modesettingEntityIndex =
|
||||
xf86AllocateEntityPrivateIndex();
|
||||
|
||||
pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
|
||||
modesettingEntityIndex);
|
||||
|
@ -443,7 +449,7 @@ crtc_resize(ScrnInfoPtr pScrn, int width, int height)
|
|||
if (width == pScrn->virtualX && height == pScrn->virtualY)
|
||||
return TRUE;
|
||||
|
||||
ErrorF("RESIZING TO %dx%d\n",width,height);
|
||||
ErrorF("RESIZING TO %dx%d\n", width, height);
|
||||
|
||||
pScrn->virtualX = width;
|
||||
pScrn->virtualY = height;
|
||||
|
@ -469,7 +475,8 @@ crtc_resize(ScrnInfoPtr pScrn, int width, int height)
|
|||
pScrn->bitsPerPixel / 8, 0, NULL,
|
||||
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE
|
||||
| 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);
|
||||
|
||||
|
@ -479,8 +486,7 @@ crtc_resize(ScrnInfoPtr pScrn, int width, int height)
|
|||
pScrn->depth,
|
||||
pScrn->bitsPerPixel,
|
||||
pScrn->displayWidth * pScrn->bitsPerPixel / 8,
|
||||
ms->bo.handle,
|
||||
&ms->fb_id);
|
||||
ms->bo.handle, &ms->fb_id);
|
||||
|
||||
if (ms->shadowFB) {
|
||||
if ((ms->shadowMem =
|
||||
|
@ -792,7 +798,8 @@ ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
pScrn->bitsPerPixel / 8, 0, NULL,
|
||||
DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_SHAREABLE
|
||||
| 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);
|
||||
|
||||
|
@ -802,8 +809,7 @@ ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
pScrn->depth,
|
||||
pScrn->bitsPerPixel,
|
||||
pScrn->displayWidth * pScrn->bitsPerPixel / 8,
|
||||
ms->bo.handle,
|
||||
&ms->fb_id);
|
||||
ms->bo.handle, &ms->fb_id);
|
||||
|
||||
if (ms->shadowFB) {
|
||||
if ((ms->shadowMem =
|
||||
|
@ -909,7 +915,8 @@ AdjustFrame(int scrnIndex, int x, int y, int flags)
|
|||
xf86CrtcPtr crtc = output->crtc;
|
||||
|
||||
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->y = output->initial_y + y;
|
||||
}
|
||||
|
|
|
@ -36,14 +36,16 @@
|
|||
|
||||
#define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg);
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
int lastInstance;
|
||||
int refCount;
|
||||
ScrnInfoPtr pScrn_1;
|
||||
ScrnInfoPtr pScrn_2;
|
||||
} EntRec, *EntPtr;
|
||||
|
||||
typedef struct _modesettingRec {
|
||||
typedef struct _modesettingRec
|
||||
{
|
||||
int fd;
|
||||
unsigned int fb_id;
|
||||
void *virtual;
|
||||
|
@ -51,7 +53,7 @@ typedef struct _modesettingRec {
|
|||
|
||||
EntPtr entityPrivate;
|
||||
|
||||
void (*PointerMoved)(int, int, int);
|
||||
void (*PointerMoved) (int, int, int);
|
||||
|
||||
int Chipset;
|
||||
EntityInfoPtr pEnt;
|
||||
|
|
|
@ -192,7 +192,9 @@ ExaInit(ScrnInfoPtr pScrn)
|
|||
}
|
||||
|
||||
/* 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));
|
||||
pExa->exa_major = 2;
|
||||
|
|
|
@ -243,23 +243,25 @@ output_init(ScrnInfoPtr pScrn)
|
|||
|
||||
name = NULL;
|
||||
if (prop) {
|
||||
ErrorF("VALUES %d\n",prop->count_values);
|
||||
ErrorF("VALUES %d\n", prop->count_values);
|
||||
|
||||
for (v=0;v<prop->count_values;v++)
|
||||
for (v = 0; v < prop->count_values; v++)
|
||||
ErrorF("%s %lld\n", prop->name, prop->values[v]);
|
||||
|
||||
for (v=0;v<prop->count_enums;v++) {
|
||||
for (v = 0; v < prop->count_enums; v++) {
|
||||
ErrorF("%s %s\n", prop->name, prop->enums[v].name);
|
||||
if (drm_output->prop_values[p] == prop->enums[v].value) {
|
||||
if (!strncmp("Connector Type", prop->name, 14)) {
|
||||
ErrorF("WE'VE GOT %s\n",prop->enums[v].name);
|
||||
ErrorF("WE'VE GOT %s\n", prop->enums[v].name);
|
||||
name = xalloc(strlen(prop->enums[v].name));
|
||||
strncpy(name, prop->enums[v].name, strlen(name));
|
||||
}
|
||||
}
|
||||
if (name) break;
|
||||
if (name)
|
||||
break;
|
||||
}
|
||||
if (name) break;
|
||||
if (name)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,6 +282,6 @@ output_init(ScrnInfoPtr pScrn)
|
|||
output->doubleScanAllowed = FALSE;
|
||||
}
|
||||
|
||||
out:
|
||||
out:
|
||||
drmModeFreeResources(res);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue