Merge branch 'master' into mpx
Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c
This commit is contained in:
@@ -1217,8 +1217,15 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int o;
|
||||
|
||||
if (maxX == 0 || maxY == 0)
|
||||
xf86RandR12GetOriginalVirtualSize (scrn, &maxX, &maxY);
|
||||
/* When canGrow was TRUE in the initial configuration we have to
|
||||
* compare against the maximum values so that we don't drop modes.
|
||||
* When canGrow was FALSE, the maximum values would have been clamped
|
||||
* anyway.
|
||||
*/
|
||||
if (maxX == 0 || maxY == 0) {
|
||||
maxX = config->maxWidth;
|
||||
maxY = config->maxHeight;
|
||||
}
|
||||
|
||||
/* Elide duplicate modes before defaulting code uses them */
|
||||
xf86PruneDuplicateMonitorModes (scrn->monitor);
|
||||
@@ -1723,8 +1730,26 @@ Bool
|
||||
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
int c;
|
||||
int c, o;
|
||||
|
||||
/*
|
||||
* Turn off everything so mode setting is done
|
||||
* with hardware in a consistent state
|
||||
*/
|
||||
for (o = 0; o < config->num_output; o++)
|
||||
{
|
||||
xf86OutputPtr output = config->output[o];
|
||||
(*output->funcs->dpms)(output, DPMSModeOff);
|
||||
}
|
||||
|
||||
for (c = 0; c < config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
|
||||
crtc->funcs->dpms(crtc, DPMSModeOff);
|
||||
memset(&crtc->mode, 0, sizeof(crtc->mode));
|
||||
}
|
||||
|
||||
for (c = 0; c < config->num_crtc; c++)
|
||||
{
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
|
||||
@@ -562,6 +562,10 @@ typedef struct _xf86CrtcConfig {
|
||||
OptionInfoPtr options;
|
||||
|
||||
Bool debug_modes;
|
||||
|
||||
/* wrap screen BlockHandler for rotation */
|
||||
ScreenBlockHandlerProcPtr BlockHandler;
|
||||
|
||||
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
|
||||
|
||||
extern int xf86CrtcConfigPrivateIndex;
|
||||
|
||||
@@ -71,7 +71,11 @@ static Bool quirk_dt_sync_hm_vp (int scrnIndex, xf86MonPtr DDC)
|
||||
if (memcmp (DDC->vendor.name, "VSC", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 58653)
|
||||
return TRUE;
|
||||
|
||||
/* Samsung SyncMaster 205BW */
|
||||
if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 541)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static Bool
|
||||
xf86RotateRedisplay(ScreenPtr pScreen)
|
||||
{
|
||||
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
|
||||
@@ -273,7 +273,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||
RegionPtr region;
|
||||
|
||||
if (!damage)
|
||||
return;
|
||||
return FALSE;
|
||||
xf86RotatePrepare (pScreen);
|
||||
region = DamageRegion(damage);
|
||||
if (REGION_NOTEMPTY(pScreen, region))
|
||||
@@ -317,19 +317,25 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||
pScreen->SourceValidate = SourceValidate;
|
||||
DamageEmpty(damage);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
xf86RotateBlockHandler(pointer data, OSTimePtr pTimeout, pointer pRead)
|
||||
xf86RotateBlockHandler(int screenNum, pointer blockData,
|
||||
pointer pTimeout, pointer pReadmask)
|
||||
{
|
||||
ScreenPtr pScreen = (ScreenPtr) data;
|
||||
ScreenPtr pScreen = screenInfo.screens[screenNum];
|
||||
ScrnInfoPtr pScrn = xf86Screens[screenNum];
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
|
||||
xf86RotateRedisplay(pScreen);
|
||||
}
|
||||
|
||||
static void
|
||||
xf86RotateWakeupHandler(pointer data, int i, pointer LastSelectMask)
|
||||
{
|
||||
pScreen->BlockHandler = xf86_config->BlockHandler;
|
||||
(*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
|
||||
if (xf86RotateRedisplay(pScreen))
|
||||
{
|
||||
/* Re-wrap if rotation is still happening */
|
||||
xf86_config->BlockHandler = pScreen->BlockHandler;
|
||||
pScreen->BlockHandler = xf86RotateBlockHandler;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -367,10 +373,6 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
|
||||
}
|
||||
DamageDestroy (xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage = NULL;
|
||||
/* Free block/wakeup handler */
|
||||
RemoveBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
||||
xf86RotateWakeupHandler,
|
||||
(pointer) pScreen);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,20 +442,12 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||
if (!xf86_config->rotation_damage)
|
||||
goto bail2;
|
||||
|
||||
/* Assign block/wakeup handler */
|
||||
if (!RegisterBlockAndWakeupHandlers (xf86RotateBlockHandler,
|
||||
xf86RotateWakeupHandler,
|
||||
(pointer) pScreen))
|
||||
{
|
||||
goto bail3;
|
||||
}
|
||||
/* Wrap block handler */
|
||||
xf86_config->BlockHandler = pScreen->BlockHandler;
|
||||
pScreen->BlockHandler = xf86RotateBlockHandler;
|
||||
}
|
||||
if (0)
|
||||
{
|
||||
bail3:
|
||||
DamageDestroy (xf86_config->rotation_damage);
|
||||
xf86_config->rotation_damage = NULL;
|
||||
|
||||
bail2:
|
||||
if (shadow || shadowData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user