Merge git://proxy01.pd.intel.com:9419/git/xorg/driver/xf86-video-intel into crestline
This commit is contained in:
commit
58aeb87f2e
|
|
@ -87,7 +87,6 @@ extern const char *I810ddcSymbols[];
|
|||
extern const char *I810fbSymbols[];
|
||||
extern const char *I810xaaSymbols[];
|
||||
extern const char *I810shadowFBSymbols[];
|
||||
extern const char *I810shadowSymbols[];
|
||||
#ifdef XF86DRI
|
||||
extern const char *I810driSymbols[];
|
||||
extern const char *I810drmSymbols[];
|
||||
|
|
|
|||
|
|
@ -343,12 +343,6 @@ const char *I810driSymbols[] = {
|
|||
|
||||
#endif /* I830_ONLY */
|
||||
|
||||
const char *I810shadowSymbols[] = {
|
||||
"shadowSetup",
|
||||
"shadowAdd",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char *I810i2cSymbols[] = {
|
||||
"xf86CreateI2CBusRec",
|
||||
"xf86I2CBusInit",
|
||||
|
|
@ -437,7 +431,6 @@ i810Setup(pointer module, pointer opts, int *errmaj, int *errmin)
|
|||
I810drmSymbols,
|
||||
I810driSymbols,
|
||||
#endif
|
||||
I810shadowSymbols,
|
||||
I810shadowFBSymbols,
|
||||
I810vbeSymbols, vbeOptionalSymbols,
|
||||
I810ddcSymbols, I810int10Symbols, NULL);
|
||||
|
|
|
|||
|
|
@ -108,10 +108,6 @@ static void I830DRITransitionTo3d(ScreenPtr pScreen);
|
|||
static void I830DRITransitionMultiToSingle3d(ScreenPtr pScreen);
|
||||
static void I830DRITransitionSingleToMulti3d(ScreenPtr pScreen);
|
||||
|
||||
#if 0
|
||||
static void I830DRIShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf);
|
||||
#endif
|
||||
|
||||
extern void GlxSetVisualConfigs(int nconfigs,
|
||||
__GLXvisualConfig * configs,
|
||||
void **configprivs);
|
||||
|
|
@ -981,16 +977,7 @@ I830DRIFinishScreenInit(ScreenPtr pScreen)
|
|||
|
||||
DPRINTF(PFX, "I830DRIFinishScreenInit\n");
|
||||
|
||||
/* Have shadow run only while there is 3d active.
|
||||
*/
|
||||
#if 0
|
||||
if (pI830->allowPageFlip && pI830->drmMinor >= 1) {
|
||||
shadowAdd(pScreen, 0, I830DRIShadowUpdate, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
pI830->allowPageFlip = 0;
|
||||
|
||||
pI830->allowPageFlip = 0;
|
||||
|
||||
if (!DRIFinishScreenInit(pScreen))
|
||||
return FALSE;
|
||||
|
|
@ -1267,70 +1254,6 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
|
|||
* allocate and free 3d-specific memory on demand.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Use the miext/shadow module to maintain a list of dirty rectangles.
|
||||
* These are blitted to the back buffer to keep both buffers clean
|
||||
* during page-flipping when the 3d application isn't fullscreen.
|
||||
*
|
||||
* Unlike most use of the shadow code, both buffers are in video
|
||||
* memory.
|
||||
*
|
||||
* An alternative to this would be to organize for all on-screen
|
||||
* drawing operations to be duplicated for the two buffers. That
|
||||
* might be faster, but seems like a lot more work...
|
||||
*/
|
||||
|
||||
|
||||
#if 0
|
||||
/* This should be done *before* XAA syncs,
|
||||
* Otherwise will have to sync again???
|
||||
*/
|
||||
static void
|
||||
I830DRIShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
RegionPtr damage = &pBuf->damage;
|
||||
int i, num = REGION_NUM_RECTS(damage);
|
||||
BoxPtr pbox = REGION_RECTS(damage);
|
||||
drmI830Sarea *pSAREAPriv = DRIGetSAREAPrivate(pScreen);
|
||||
int cmd, br13;
|
||||
|
||||
/* Don't want to do this when no 3d is active and pages are
|
||||
* right-way-round :
|
||||
*/
|
||||
if (!pSAREAPriv->pf_active && pSAREAPriv->pf_current_page == 0)
|
||||
return;
|
||||
|
||||
br13 = (pScrn->displayWidth * pI830->cpp) | (0xcc << 16);
|
||||
|
||||
if (pScrn->bitsPerPixel == 32) {
|
||||
cmd = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA |
|
||||
XY_SRC_COPY_BLT_WRITE_RGB);
|
||||
br13 |= 3 << 24;
|
||||
} else {
|
||||
cmd = (XY_SRC_COPY_BLT_CMD);
|
||||
br13 |= 1 << 24;
|
||||
}
|
||||
|
||||
for (i = 0 ; i < num ; i++, pbox++) {
|
||||
BEGIN_LP_RING(8);
|
||||
OUT_RING(cmd);
|
||||
OUT_RING(br13);
|
||||
OUT_RING((pbox->y1 << 16) | pbox->x1);
|
||||
OUT_RING((pbox->y2 << 16) | pbox->x2);
|
||||
OUT_RING(pI830->back_buffer->offset);
|
||||
OUT_RING((pbox->y1 << 16) | pbox->x1);
|
||||
OUT_RING(br13 & 0xffff);
|
||||
OUT_RING(pI830->front_buffer->offset);
|
||||
ADVANCE_LP_RING();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
I830EnablePageFlip(ScreenPtr pScreen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -539,8 +539,10 @@ I830MapMem(ScrnInfoPtr pScrn)
|
|||
if (!pI830->FbBase)
|
||||
return FALSE;
|
||||
|
||||
if (I830IsPrimary(pScrn))
|
||||
pI830->LpRing->virtual_start = pI830->FbBase + pI830->LpRing->mem->offset;
|
||||
if (I830IsPrimary(pScrn) && pI830->LpRing->mem != NULL) {
|
||||
pI830->LpRing->virtual_start =
|
||||
pI830->FbBase + pI830->LpRing->mem->offset;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1239,14 +1241,13 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
pI830->mmModeFlags = 0;
|
||||
|
||||
if (!pI830->directRenderingDisabled) {
|
||||
pI830->mmModeFlags = I830_KERNEL_TEX;
|
||||
#ifdef XF86DRI_MM
|
||||
Bool tmp = FALSE;
|
||||
|
||||
if (!IS_I965G(pI830))
|
||||
pI830->mmModeFlags |= I830_KERNEL_MM;
|
||||
else
|
||||
#endif
|
||||
pI830->mmModeFlags |= I830_KERNEL_TEX;
|
||||
|
||||
from = X_PROBED;
|
||||
|
||||
|
|
@ -1301,17 +1302,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
I830SetupOutputs(pScrn);
|
||||
|
||||
SaveHWState(pScrn);
|
||||
/* Do an initial detection of the outputs while none are configured on yet.
|
||||
* This will give us some likely legitimate response for later if both
|
||||
* pipes are already allocated and we're asked to do a detect.
|
||||
*/
|
||||
for (i = 0; i < xf86_config->num_output; i++)
|
||||
{
|
||||
xf86OutputPtr output = xf86_config->output[i];
|
||||
|
||||
output->status = (*output->funcs->detect) (output);
|
||||
}
|
||||
|
||||
if (!xf86InitialConfiguration (pScrn, FALSE))
|
||||
{
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");
|
||||
|
|
@ -1418,13 +1408,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
pI830->SWCursor = TRUE;
|
||||
}
|
||||
|
||||
if (!xf86RandR12PreInit (pScrn))
|
||||
{
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RandR initialization failure\n");
|
||||
PreInitCleanup(pScrn);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pScrn->modes == NULL) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n");
|
||||
PreInitCleanup(pScrn);
|
||||
|
|
@ -1471,7 +1454,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.majorversion = 2;
|
||||
req.minorversion = 0;
|
||||
req.minorversion = 1;
|
||||
if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req,
|
||||
&errmaj, &errmin)) {
|
||||
LoaderErrorMsg(NULL, "exa", errmaj, errmin);
|
||||
|
|
@ -1515,29 +1498,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* rotation requires the newer libshadow */
|
||||
if (I830IsPrimary(pScrn)) {
|
||||
int errmaj, errmin;
|
||||
pI830->shadowReq.majorversion = 1;
|
||||
pI830->shadowReq.minorversion = 1;
|
||||
|
||||
if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL,
|
||||
&pI830->shadowReq, &errmaj, &errmin)) {
|
||||
pI830->shadowReq.minorversion = 0;
|
||||
if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL,
|
||||
&pI830->shadowReq, &errmaj, &errmin)) {
|
||||
LoaderErrorMsg(NULL, "shadow", errmaj, errmin);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
|
||||
pI830->shadowReq.majorversion = pI8301->shadowReq.majorversion;
|
||||
pI830->shadowReq.minorversion = pI8301->shadowReq.minorversion;
|
||||
pI830->shadowReq.patchlevel = pI8301->shadowReq.patchlevel;
|
||||
}
|
||||
xf86LoaderReqSymLists(I810shadowSymbols, NULL);
|
||||
|
||||
pI830->preinit = FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -1918,18 +1878,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
InitRegisterRec(ScrnInfoPtr pScrn)
|
||||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
int i;
|
||||
|
||||
if (!I830IsPrimary(pScrn)) return;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
pI830->fence[i] = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
I830PointerMoved(int index, int x, int y)
|
||||
{
|
||||
|
|
@ -1957,22 +1905,6 @@ I830PointerMoved(int index, int x, int y)
|
|||
(*pI830->PointerMoved)(index, newX, newY);
|
||||
}
|
||||
|
||||
static Bool
|
||||
I830CreateScreenResources (ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
|
||||
pScreen->CreateScreenResources = pI830->CreateScreenResources;
|
||||
if (!(*pScreen->CreateScreenResources)(pScreen))
|
||||
return FALSE;
|
||||
|
||||
if (!xf86RandR12CreateScreenResources (pScreen))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Bool
|
||||
I830InitFBManager(
|
||||
ScreenPtr pScreen,
|
||||
|
|
@ -2351,7 +2283,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
/* For this allocation, switch to a smaller DRI memory manager
|
||||
* size.
|
||||
*/
|
||||
pI830->mmSize = I830_MM_MINPAGES * GTT_PAGE_SIZE;
|
||||
pI830->mmSize = I830_MM_MINPAGES * GTT_PAGE_SIZE / KB(1);
|
||||
} else {
|
||||
pI830->mmSize = savedMMSize;
|
||||
}
|
||||
|
|
@ -2511,8 +2443,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
}
|
||||
#endif
|
||||
|
||||
InitRegisterRec(pScrn);
|
||||
|
||||
#ifdef XF86DRI
|
||||
/*
|
||||
* pI830->directRenderingDisabled is set once in PreInit. Reinitialise
|
||||
|
|
@ -2703,38 +2633,12 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
|
|||
pI830->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = I830CloseScreen;
|
||||
|
||||
if (pI830->shadowReq.minorversion >= 1) {
|
||||
/* Rotation */
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n");
|
||||
xf86DisableRandR(); /* Disable built-in RandR extension */
|
||||
shadowSetup(pScreen);
|
||||
/* support all rotations */
|
||||
xf86RandR12Init (pScreen);
|
||||
if (pI830->useEXA) {
|
||||
#ifdef I830_USE_EXA
|
||||
if (pI830->EXADriverPtr->exa_minor >= 1) {
|
||||
xf86RandR12SetRotations (pScreen, RR_Rotate_0 | RR_Rotate_90 |
|
||||
RR_Rotate_180 | RR_Rotate_270);
|
||||
} else {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
|
||||
"EXA version %d.%d too old to support rotation\n",
|
||||
pI830->EXADriverPtr->exa_major,
|
||||
pI830->EXADriverPtr->exa_minor);
|
||||
xf86RandR12SetRotations (pScreen, RR_Rotate_0);
|
||||
}
|
||||
#endif /* I830_USE_EXA */
|
||||
} else {
|
||||
xf86RandR12SetRotations (pScreen, RR_Rotate_0 | RR_Rotate_90 |
|
||||
RR_Rotate_180 | RR_Rotate_270);
|
||||
}
|
||||
pI830->PointerMoved = pScrn->PointerMoved;
|
||||
pScrn->PointerMoved = I830PointerMoved;
|
||||
pI830->CreateScreenResources = pScreen->CreateScreenResources;
|
||||
pScreen->CreateScreenResources = I830CreateScreenResources;
|
||||
} else {
|
||||
/* Rotation */
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "libshadow is version %d.%d.%d, required 1.1.0 or greater for rotation.\n",pI830->shadowReq.majorversion,pI830->shadowReq.minorversion,pI830->shadowReq.patchlevel);
|
||||
}
|
||||
if (!xf86CrtcScreenInit (pScreen))
|
||||
return FALSE;
|
||||
|
||||
/* Wrap pointer motion to flip touch screen around */
|
||||
pI830->PointerMoved = pScrn->PointerMoved;
|
||||
pScrn->PointerMoved = I830PointerMoved;
|
||||
|
||||
if (serverGeneration == 1)
|
||||
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
|
||||
|
|
|
|||
|
|
@ -1121,8 +1121,8 @@ i830_allocate_depthbuffer(ScrnInfoPtr pScrn)
|
|||
pI830->depth_buffer =
|
||||
i830_allocate_memory_tiled(pScrn, "depth buffer", size, pitch,
|
||||
GTT_PAGE_SIZE, ALIGN_BOTH_ENDS,
|
||||
TILING_YMAJOR);
|
||||
pI830->depth_tiled = FENCE_YMAJOR;
|
||||
TILING_XMAJOR);
|
||||
pI830->depth_tiled = FENCE_XMAJOR;
|
||||
}
|
||||
|
||||
/* Otherwise, allocate it linear. */
|
||||
|
|
@ -1369,7 +1369,9 @@ i830_set_fence(ScrnInfoPtr pScrn, int nr, unsigned int offset,
|
|||
}
|
||||
}
|
||||
|
||||
if (IS_I9XX(pI830))
|
||||
if ((IS_I945G(pI830) || IS_I945GM(pI830)) && tile_format == TILING_YMAJOR)
|
||||
fence_pitch = pitch / 128;
|
||||
else if (IS_I9XX(pI830))
|
||||
fence_pitch = pitch / 512;
|
||||
else
|
||||
fence_pitch = pitch / 128;
|
||||
|
|
|
|||
Loading…
Reference in New Issue