Commit 99bc86e7 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Improve established mode timing support

Add definitions for 640x480 @ 67Hz, 832x624 @ 75Hz, and 1152x870 @ 75Hz,
gleaned from various monitor manuals. These work on the monitors I have
at my disposal (e.g. BenQ FP737s-D) without generating any warnings.

Version 0.74. Tagged as 'ScrModes-0_74'
parent a7cd20c1
/* (0.73)
/* (0.74)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.73
#define Module_MajorVersion_CMHG 0.74
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Jul 2019
#define Module_Date_CMHG 02 Mar 2020
#define Module_MajorVersion "0.73"
#define Module_Version 73
#define Module_MajorVersion "0.74"
#define Module_Version 74
#define Module_MinorVersion ""
#define Module_Date "02 Jul 2019"
#define Module_Date "02 Mar 2020"
#define Module_ApplicationDate "02-Jul-19"
#define Module_ApplicationDate "02-Mar-20"
#define Module_ComponentName "ScrModes"
#define Module_FullVersion "0.73"
#define Module_HelpVersion "0.73 (02 Jul 2019)"
#define Module_LibraryVersionInfo "0:73"
#define Module_FullVersion "0.74"
#define Module_HelpVersion "0.74 (02 Mar 2020)"
#define Module_LibraryVersionInfo "0:74"
......@@ -1512,7 +1512,7 @@ static _kernel_oserror *parseedid(EDIDBlockRef edidblockref)
#endif
/* Add Established timings I and II (priority 6) */
for (int timings_byte=0; timings_byte<2; timings_byte++)
for (int timings_byte=0; timings_byte<3; timings_byte++)
{
for (int timings_bit=0; timings_bit<8; timings_bit++)
{
......@@ -1526,28 +1526,66 @@ static _kernel_oserror *parseedid(EDIDBlockRef edidblockref)
}
else
{
/* Established timings for 720x400 @ 70Hz, derived from:
* http://www.javiervalcarce.eu/html/vga-signal-format-timming-specs-en.html
* http://www.epanorama.net/documents/pc/vga_timing.html
/* Timings for several of the 'established timings' modes
* which don't have their timings listed in the VESA specs.
* These timings are derived from the following sources:
* [1] http://www.javiervalcarce.eu/html/vga-signal-format-timming-specs-en.html
* [2] http://www.epanorama.net/documents/pc/vga_timing.html
* [3] Asus PA248Q manual
* [4] BenQ FP737s-D manual
* [5] FlexScan L365 manual
* [6] Philips 190C6 service manual
*/
static const ModeDef established_timing_4 =
{
/* 640 x 480 @ 67Hz ([3], [5], [6]) */
640, 480, 64, 96, 0, 640, 0, 64,
3, 39, 0, 480, 0, 3,
30240, -1, NN, 0, 67, 0
};
static const ModeDef established_timing_7 =
{
/* 720 x 400 @ 70Hz */
720, 400, 108, 54, 0, 720, 0, 18,
2, 34, 0, 400, 0, 13,
/* 720 x 400 @ 70Hz ([1], [2], [3], [4], [6])
Also in [5], but with minor v. porch difference */
720, 400, 108, 54, 0, 720, 0, 18,
2, 34, 0, 400, 0, 13,
28322, -1, NP, 0, 70, 0
};
/* There are 3 cases which do not have defined DMT codes.
* These are byte 0 bits 7, 6 and 4 which we will calculate.
static const ModeDef established_timing_1_5 =
{
/* 832 x 624 @ 75Hz ([3], [5], [6]) */
832, 624, 64, 224, 0, 832, 0, 32,
3, 39, 0, 624, 0, 1,
57280, -1, PP, 0, 75, 0
};
static const ModeDef established_timing_2_7 =
{
/* 1152 x 870 @ 75Hz ([4], [6]) */
1152, 870, 128, 144, 0, 1152, 0, 32,
3, 39, 0, 870, 0, 4,
100000, -1, NN, 0, 75, 0
};
/* There are several cases which do not have defined DMT
* codes. See if we have fixed timings available, and if
* not, calculate some timings using GTF or CVT.
*/
int xres = 0;
int yres = 0;
int freq = 0;
switch (timings_bit | (timings_byte << 3))
{
case (2<<3) | 7: /* 1152 X 870 @ 75Hz */
add_builtin_mode(new_monitor, &established_timing_2_7, 6);
break;
case (1<<3) | 5: /* 832 X 624 @ 75Hz */
add_builtin_mode(new_monitor, &established_timing_1_5, 6);
break;
case 7: /* 720 x 400 @ 70Hz */
/* Use some fixed timings for better compatibility */
add_builtin_mode(new_monitor, &established_timing_7, 6);
break;
case 6: /* 720 x 400 @ 88Hz */
......@@ -1556,9 +1594,7 @@ static _kernel_oserror *parseedid(EDIDBlockRef edidblockref)
freq = 88;
break;
case 4: /* 640 x 480 @ 67Hz */
xres = 640;
yres = 480;
freq = 67;
add_builtin_mode(new_monitor, &established_timing_4, 6);
break;
}
......
......@@ -362,8 +362,8 @@ typedef char dmt_assert[((sizeof(display_monitor_timings) / sizeof(display_monit
/* b7 b6 b5 b4 b3 b2 b1 b0 */
const char established_timings[] = {
0x00, 0x00, 0x04, 0x00, 0x05, 0x06, 0x08, 0x09,
0x0a, 0x0b, 0x00, 0x0f, 0x10, 0x11, 0x12, 0x24
/* N.B. third byte not checked */
0x0a, 0x0b, 0x00, 0x0f, 0x10, 0x11, 0x12, 0x24,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const char established_timings3[] = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment