Merge branch 'modesetting-origin' into modesetting
This commit is contained in:
commit
736d82a6b4
|
|
@ -381,7 +381,7 @@ static int i810_pitches[] = {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
int I830EntityIndex = -1;
|
||||
static int I830EntityIndex = -1;
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ static XF86ModuleVersionInfo i810VersRec = {
|
|||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
_X_EXPORT XF86ModuleData i810ModuleData = { &i810VersRec, i810Setup, 0 };
|
||||
_X_EXPORT XF86ModuleData i810ModuleData = { &i810VersRec, i810Setup, NULL };
|
||||
|
||||
static pointer
|
||||
i810Setup(pointer module, pointer opts, int *errmaj, int *errmin)
|
||||
|
|
@ -468,7 +468,7 @@ I810FreeRec(ScrnInfoPtr pScrn)
|
|||
if (!pScrn->driverPrivate)
|
||||
return;
|
||||
xfree(pScrn->driverPrivate);
|
||||
pScrn->driverPrivate = 0;
|
||||
pScrn->driverPrivate = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -577,7 +577,8 @@ I810Probe(DriverPtr drv, int flags)
|
|||
|
||||
/* Allocate new ScrnInfoRec and claim the slot */
|
||||
if ((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
|
||||
I810PciChipsets, 0, 0, 0, 0, 0))) {
|
||||
I810PciChipsets, NULL, NULL, NULL,
|
||||
NULL, NULL))) {
|
||||
EntityInfoPtr pEnt;
|
||||
|
||||
pEnt = xf86GetEntityInfo(usedChips[i]);
|
||||
|
|
@ -609,23 +610,23 @@ I810Probe(DriverPtr drv, int flags)
|
|||
if (I830EntityIndex < 0)
|
||||
I830EntityIndex = xf86AllocateEntityPrivateIndex();
|
||||
|
||||
pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
|
||||
pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
|
||||
I830EntityIndex);
|
||||
if (!pPriv->ptr) {
|
||||
pPriv->ptr = xnfcalloc(sizeof(I830EntRec), 1);
|
||||
pI830Ent = pPriv->ptr;
|
||||
pI830Ent->lastInstance = -1;
|
||||
} else {
|
||||
pI830Ent = pPriv->ptr;
|
||||
if (!pPriv->ptr) {
|
||||
pPriv->ptr = xnfcalloc(sizeof(I830EntRec), 1);
|
||||
pI830Ent = pPriv->ptr;
|
||||
pI830Ent->lastInstance = -1;
|
||||
} else {
|
||||
pI830Ent = pPriv->ptr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the entity instance for this instance of the driver.
|
||||
* For dual head per card, instance 0 is the "master"
|
||||
* instance, driving the primary head, and instance 1 is
|
||||
* the "slave".
|
||||
*/
|
||||
pI830Ent->lastInstance++;
|
||||
|
||||
/*
|
||||
* Set the entity instance for this instance of the driver.
|
||||
* For dual head per card, instance 0 is the "master"
|
||||
* instance, driving the primary head, and instance 1 is
|
||||
* the "slave".
|
||||
*/
|
||||
pI830Ent->lastInstance++;
|
||||
xf86SetEntityInstanceForScreen(pScrn,
|
||||
pScrn->entityList[0], pI830Ent->lastInstance);
|
||||
I830InitpScrn(pScrn);
|
||||
|
|
@ -746,7 +747,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
pI810->PciTag = pciTag(pI810->PciInfo->bus, pI810->PciInfo->device,
|
||||
pI810->PciInfo->func);
|
||||
|
||||
if (xf86RegisterResources(pI810->pEnt->index, 0, ResNone))
|
||||
if (xf86RegisterResources(pI810->pEnt->index, NULL, ResNone))
|
||||
return FALSE;
|
||||
pScrn->racMemFlags = RAC_FB | RAC_COLORMAP;
|
||||
|
||||
|
|
@ -1222,7 +1223,7 @@ I810UnmapMMIO(ScrnInfoPtr pScrn)
|
|||
|
||||
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->MMIOBase,
|
||||
I810_REG_SIZE);
|
||||
pI810->MMIOBase = 0;
|
||||
pI810->MMIOBase = NULL;
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
|
@ -1232,7 +1233,7 @@ I810UnmapMem(ScrnInfoPtr pScrn)
|
|||
|
||||
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pI810->FbBase,
|
||||
pI810->FbMapSize);
|
||||
pI810->FbBase = 0;
|
||||
pI810->FbBase = NULL;
|
||||
I810UnmapMMIO(pScrn);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1301,7 +1301,7 @@ I810GetSurfaceAttribute(
|
|||
Atom attribute,
|
||||
INT32 *value
|
||||
){
|
||||
return I810GetPortAttribute(pScrn, attribute, value, 0);
|
||||
return I810GetPortAttribute(pScrn, attribute, value, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1310,7 +1310,7 @@ I810SetSurfaceAttribute(
|
|||
Atom attribute,
|
||||
INT32 value
|
||||
){
|
||||
return I810SetPortAttribute(pScrn, attribute, value, 0);
|
||||
return I810SetPortAttribute(pScrn, attribute, value, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ struct wm_info {
|
|||
unsigned int wm;
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_8_100[] = {
|
||||
static struct wm_info i810_wm_8_100[] = {
|
||||
{0, 0x22003000},
|
||||
{25.2, 0x22003000},
|
||||
{28.0, 0x22003000},
|
||||
|
|
@ -87,7 +87,7 @@ struct wm_info i810_wm_8_100[] = {
|
|||
{202.5, 0x2220e000}
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_16_100[] = {
|
||||
static struct wm_info i810_wm_16_100[] = {
|
||||
{0, 0x22004000},
|
||||
{25.2, 0x22006000},
|
||||
{28.0, 0x22006000},
|
||||
|
|
@ -118,7 +118,7 @@ struct wm_info i810_wm_16_100[] = {
|
|||
{202.5, 0x22416000}
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_24_100[] = {
|
||||
static struct wm_info i810_wm_24_100[] = {
|
||||
{0, 0x22006000},
|
||||
{25.2, 0x22009000},
|
||||
{28.0, 0x22009000},
|
||||
|
|
@ -149,13 +149,13 @@ struct wm_info i810_wm_24_100[] = {
|
|||
{202.5, 0x44419000}
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_32_100[] = {
|
||||
static struct wm_info i810_wm_32_100[] = {
|
||||
{0, 0x2210b000},
|
||||
{60, 0x22415000}, /* 0x314000 works too */
|
||||
{80, 0x22419000} /* 0x518000 works too */
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_8_133[] = {
|
||||
static struct wm_info i810_wm_8_133[] = {
|
||||
{0, 0x22003000},
|
||||
{25.2, 0x22003000},
|
||||
{28.0, 0x22003000},
|
||||
|
|
@ -185,7 +185,7 @@ struct wm_info i810_wm_8_133[] = {
|
|||
{202.5, 0x2220e000}
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_16_133[] = {
|
||||
static struct wm_info i810_wm_16_133[] = {
|
||||
{0, 0x22004000},
|
||||
{25.2, 0x22006000},
|
||||
{28.0, 0x22006000},
|
||||
|
|
@ -216,7 +216,7 @@ struct wm_info i810_wm_16_133[] = {
|
|||
{202.5, 0x22416000}
|
||||
};
|
||||
|
||||
struct wm_info i810_wm_24_133[] = {
|
||||
static struct wm_info i810_wm_24_133[] = {
|
||||
{0, 0x22006000},
|
||||
{25.2, 0x22009000},
|
||||
{28.0, 0x22009000},
|
||||
|
|
|
|||
|
|
@ -180,10 +180,12 @@ I830EmitFlush(ScrnInfoPtr pScrn)
|
|||
if (IS_I965G(pI830))
|
||||
flags = 0;
|
||||
|
||||
BEGIN_LP_RING(2);
|
||||
OUT_RING(MI_FLUSH | flags);
|
||||
OUT_RING(MI_NOOP); /* pad to quadword */
|
||||
ADVANCE_LP_RING();
|
||||
{
|
||||
BEGIN_LP_RING(2);
|
||||
OUT_RING(MI_FLUSH | flags);
|
||||
OUT_RING(MI_NOOP); /* pad to quadword */
|
||||
ADVANCE_LP_RING();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ do { \
|
|||
} while(0)
|
||||
#endif
|
||||
|
||||
float scale_units[2][2];
|
||||
static float scale_units[2][2];
|
||||
|
||||
const int I830CopyROP[16] =
|
||||
const static int I830CopyROP[16] =
|
||||
{
|
||||
ROP_0, /* GXclear */
|
||||
ROP_DSa, /* GXand */
|
||||
|
|
@ -79,7 +79,7 @@ const int I830CopyROP[16] =
|
|||
ROP_1 /* GXset */
|
||||
};
|
||||
|
||||
const int I830PatternROP[16] =
|
||||
const static int I830PatternROP[16] =
|
||||
{
|
||||
ROP_0,
|
||||
ROP_DPa,
|
||||
|
|
@ -111,8 +111,8 @@ union intfloat {
|
|||
OUT_RING(tmp.ui); \
|
||||
} while(0)
|
||||
|
||||
Bool is_transform[2];
|
||||
PictTransform *transform[2];
|
||||
static Bool is_transform[2];
|
||||
static PictTransform *transform[2];
|
||||
|
||||
extern Bool I830EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr);
|
||||
extern Bool I830EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr,
|
||||
|
|
|
|||
|
|
@ -1560,7 +1560,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
|||
if (pI830->rotation != RR_Rotate_0)
|
||||
shadowAdd (pScrn->pScreen,
|
||||
(*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen),
|
||||
func, I830WindowLinear, pI830->rotation, 0);
|
||||
func, I830WindowLinear, pI830->rotation, NULL);
|
||||
|
||||
if (I830IsPrimary(pScrn)) {
|
||||
if (pI830->rotation != RR_Rotate_0)
|
||||
|
|
@ -1786,7 +1786,7 @@ BAIL0:
|
|||
if (pI830->rotation != RR_Rotate_0)
|
||||
shadowAdd (pScrn->pScreen,
|
||||
(*pScrn->pScreen->GetScreenPixmap) (pScrn->pScreen),
|
||||
func, I830WindowLinear, pI830->rotation, 0);
|
||||
func, I830WindowLinear, pI830->rotation, NULL);
|
||||
|
||||
if (I830IsPrimary(pScrn)) {
|
||||
if (pI830->rotation != RR_Rotate_0)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ static Bool i830_sdvo_write_byte(xf86OutputPtr output,
|
|||
|
||||
#define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd}
|
||||
/** Mapping of command numbers to names, for debug output */
|
||||
const struct _sdvo_cmd_name {
|
||||
const static struct _sdvo_cmd_name {
|
||||
CARD8 cmd;
|
||||
char *name;
|
||||
} sdvo_cmd_names[] = {
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ typedef struct {
|
|||
* These values account for -1s required.
|
||||
*/
|
||||
|
||||
const tv_mode_t tv_modes[] = {
|
||||
const static tv_mode_t tv_modes[] = {
|
||||
{
|
||||
.name = "NTSC 480i",
|
||||
.oversample = TV_OVERSAMPLE_8X,
|
||||
|
|
@ -1092,7 +1092,7 @@ i830_tv_get_modes(xf86OutputPtr output)
|
|||
{
|
||||
ScrnInfoPtr pScrn = output->scrn;
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
DisplayModePtr new, first = NULL, *tail = &first;;
|
||||
DisplayModePtr new, first = NULL, *tail = &first;
|
||||
int i;
|
||||
|
||||
(void) pI830;
|
||||
|
|
|
|||
|
|
@ -2695,13 +2695,13 @@ I830FreeSurface(XF86SurfacePtr surface)
|
|||
static int
|
||||
I830GetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 * value)
|
||||
{
|
||||
return I830GetPortAttribute(pScrn, attribute, value, 0);
|
||||
return I830GetPortAttribute(pScrn, attribute, value, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
I830SetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value)
|
||||
{
|
||||
return I830SetPortAttribute(pScrn, attribute, value, 0);
|
||||
return I830SetPortAttribute(pScrn, attribute, value, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -2880,10 +2880,10 @@ i830_crtc_dpms_video(xf86CrtcPtr crtc, Bool on)
|
|||
/* Check we have an LFP connected */
|
||||
if (i830PipeHasType(xf86_config->crtc[pPriv->pipe],
|
||||
I830_OUTPUT_LVDS)) {
|
||||
int vtotal_reg = pPriv->pipe ? VTOTAL_A : VTOTAL_B;
|
||||
size = pPriv->pipe ? INREG(PIPEBSRC) : INREG(PIPEASRC);
|
||||
hsize = (size >> 16) & 0x7FF;
|
||||
vsize = size & 0x7FF;
|
||||
int vtotal_reg = pPriv->pipe ? VTOTAL_A : VTOTAL_B;
|
||||
active = INREG(vtotal_reg) & 0x7FF;
|
||||
|
||||
if (vsize < active && hsize > 1024)
|
||||
|
|
|
|||
|
|
@ -214,7 +214,6 @@ I830XAAInit(ScreenPtr pScreen)
|
|||
|
||||
{
|
||||
Bool shared_accel = FALSE;
|
||||
int i;
|
||||
|
||||
for(i = 0; i < pScrn->numEntities; i++) {
|
||||
if(xf86IsEntityShared(pScrn->entityList[i]))
|
||||
|
|
|
|||
Loading…
Reference in New Issue