Numerous tweaks and fixes
Detail: c/ScrModes: - Double-checked all the DMT timings against the spec and corrected a few mistakes in both the DMT timings list and the established timings list. - Tidied up DMT & established timing formatting a bit, made static data arrays const - Fixed preferred mode handling so that it'll forget the preferred mode if you load an MDF after reading EDID (preferred_mode->bit0 used as a cheeky flag, in preference over malloc/free). Fixes crash/bad behaviour on startup caused by returning a duff preferred mode from Service_MonitorLeadTranslation on startup. - Added sanity checks to avoid null pointer dereferences if preferred_mode or new_preferred_mode are null - Fixed preferred mode handling to work correctly with interlaced modes (fixed it to use the frame width & height instead of the field width & height) - Tweaked CVT extension block handling - swapped the "- 17" with "- 18" in order to take into account the presence of the checksum byte - Tweaked GTF calculation to round pixel_khz to nearest when calculating it. I don't think this is mentioned in the spec, but when comparing some timings against the GTF spreadsheet this fixes ScreenModes being off by 1kHz in a few cases - When outputing an MDF, don't output display range parameters if the block wasn't found - Fix MDF output of interlaced modes (frame width/height vs. field width/height), use more accurate mHz frame rate value instead of Hz one - Make GraphicsV_IICOp calls use the correct GraphicsV driver number; current_graphicsv_driver() function added to replace ad-hoc code in a couple of other places - Fix reading of extension blocks. Also tweak logic to avoid re-reading the first block. - Initialise 'thefilename' when calling parseedid so that ERR_NOMODES will display something vaguely sensible Admin: Tested on Raspberry Pi (ROM), Pandaboard (ROM), Iyonix (softload) Appears to read EDID correctly from test monitors (BenQ FP737s, BenQ FP241W, ADI TD-523N), but there are some minor discrepancies in MDF output for some modes Version 0.43. Tagged as 'ScrModes-0_43'
Showing
This diff is collapsed.
Please register or sign in to comment