diff options
author | marha <marha@users.sourceforge.net> | 2010-10-07 21:18:13 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-10-07 21:18:13 +0000 |
commit | c8e5c7582ea4cc70d3efa1e66daff6a11fb93faa (patch) | |
tree | a9ab63ec505a6d5daf248ce5e6acaadff6f05241 /xorg-server/hw/xfree86 | |
parent | 3aef45d35bab536aaf3ad1ea040b70ea3f0612c0 (diff) | |
parent | a0fec3241c7f4bd166dc235d840bea6d660b0339 (diff) | |
download | vcxsrv-c8e5c7582ea4cc70d3efa1e66daff6a11fb93faa.tar.gz vcxsrv-c8e5c7582ea4cc70d3efa1e66daff6a11fb93faa.tar.bz2 vcxsrv-c8e5c7582ea4cc70d3efa1e66daff6a11fb93faa.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86EdidModes.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/vbe/vbe.c | 66 |
2 files changed, 5 insertions, 65 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index ecc1b110d..f8cd9a0ca 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -484,8 +484,8 @@ DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks, (hsize == 1368 && vsize == 769))) {
Mode = xf86CVTMode(1366, 768, 60, FALSE, FALSE);
Mode->HDisplay = 1366;
- Mode->VSyncStart--;
- Mode->VSyncEnd--;
+ Mode->HSyncStart--;
+ Mode->HSyncEnd--;
} else if (hsize && vsize && refresh) {
Mode = FindDMTMode(hsize, vsize, refresh, rb);
diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c index 11b1f25eb..56ac5f6b7 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.c +++ b/xorg-server/hw/xfree86/vbe/vbe.c @@ -527,69 +527,9 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode) if (R16(pVbe->pInt10->ax) != 0x4f)
return NULL;
- block = calloc(sizeof(VbeModeInfoBlock), 1);
-
- block->ModeAttributes = *(CARD16*)pVbe->memory;
- block->WinAAttributes = ((char*)pVbe->memory)[2];
- block->WinBAttributes = ((char*)pVbe->memory)[3];
- block->WinGranularity = *(CARD16*)(((char*)pVbe->memory) + 4);
- block->WinSize = *(CARD16*)(((char*)pVbe->memory) + 6);
- block->WinASegment = *(CARD16*)(((char*)pVbe->memory) + 8);
- block->WinBSegment = *(CARD16*)(((char*)pVbe->memory) + 10);
- block->WinFuncPtr = *(CARD32*)(((char*)pVbe->memory) + 12);
- block->BytesPerScanline = *(CARD16*)(((char*)pVbe->memory) + 16);
-
- /* mandatory information for VBE 1.2 and above */
- block->XResolution = *(CARD16*)(((char*)pVbe->memory) + 18);
- block->YResolution = *(CARD16*)(((char*)pVbe->memory) + 20);
- block->XCharSize = ((char*)pVbe->memory)[22];
- block->YCharSize = ((char*)pVbe->memory)[23];
- block->NumberOfPlanes = ((char*)pVbe->memory)[24];
- block->BitsPerPixel = ((char*)pVbe->memory)[25];
- block->NumberOfBanks = ((char*)pVbe->memory)[26];
- block->MemoryModel = ((char*)pVbe->memory)[27];
- block->BankSize = ((char*)pVbe->memory)[28];
- block->NumberOfImages = ((char*)pVbe->memory)[29];
- block->Reserved = ((char*)pVbe->memory)[30];
-
- /* Direct color fields (required for direct/6 and YUV/7 memory models) */
- block->RedMaskSize = ((char*)pVbe->memory)[31];
- block->RedFieldPosition = ((char*)pVbe->memory)[32];
- block->GreenMaskSize = ((char*)pVbe->memory)[33];
- block->GreenFieldPosition = ((char*)pVbe->memory)[34];
- block->BlueMaskSize = ((char*)pVbe->memory)[35];
- block->BlueFieldPosition = ((char*)pVbe->memory)[36];
- block->RsvdMaskSize = ((char*)pVbe->memory)[37];
- block->RsvdFieldPosition = ((char*)pVbe->memory)[38];
- block->DirectColorModeInfo = ((char*)pVbe->memory)[39];
-
- /* Mandatory information for VBE 2.0 and above */
- if (pVbe->version >= 0x200) {
- block->PhysBasePtr = *(CARD32*)(((char*)pVbe->memory) + 40);
- block->Reserved32 = *(CARD32*)(((char*)pVbe->memory) + 44);
- block->Reserved16 = *(CARD16*)(((char*)pVbe->memory) + 48);
-
- /* Mandatory information for VBE 3.0 and above */
- if (pVbe->version >= 0x300) {
- block->LinBytesPerScanLine = *(CARD16*)(((char*)pVbe->memory) + 50);
- block->BnkNumberOfImagePages = ((char*)pVbe->memory)[52];
- block->LinNumberOfImagePages = ((char*)pVbe->memory)[53];
- block->LinRedMaskSize = ((char*)pVbe->memory)[54];
- block->LinRedFieldPosition = ((char*)pVbe->memory)[55];
- block->LinGreenMaskSize = ((char*)pVbe->memory)[56];
- block->LinGreenFieldPosition = ((char*)pVbe->memory)[57];
- block->LinBlueMaskSize = ((char*)pVbe->memory)[58];
- block->LinBlueFieldPosition = ((char*)pVbe->memory)[59];
- block->LinRsvdMaskSize = ((char*)pVbe->memory)[60];
- block->LinRsvdFieldPosition = ((char*)pVbe->memory)[61];
- block->MaxPixelClock = *(CARD32*)(((char*)pVbe->memory) + 62);
- memcpy(&block->Reserved2, ((char*)pVbe->memory) + 66, 188);
- }
- else
- memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 206);
- }
- else
- memcpy(&block->PhysBasePtr, ((char*)pVbe->memory) + 40, 216);
+ block = malloc(sizeof(VbeModeInfoBlock));
+ if (block)
+ memcpy(block, pVbe->memory, sizeof(*block));
return block;
}
|