1. 07 Nov, 2018 1 commit
    • Jeffrey Lee's avatar
      Improve mode substitution logic · 6b9b62ab
      Jeffrey Lee authored
      Detail:
        This updates ScreenModes to use similar mode substition logic to Kernel-6_14:
        - Try higher colour depths
        - Try lower colour depths
        - Try alternate resolutions (half-width non-double-pixel if original was double-pixel, assorted industry-standard resolutions, and monitor preferred resolution/timings)
        - Plus tries to preserve as many attributes as possible (eigen values, gap mode type, etc.)
        Additionally, LineLength values in the input mode selector block will be used to influence the VIDC list ExtraBytes value, as per the kernel
        File changes:
        - c/ScrModes - Update Service_ModeTranslation and Service_ModeExtension handlers, as described above
        - h/modex - "const PixelFormatRef" is a const pointer to a non-const PixelFormat, but we want "const PixelFormat *", for a pointer to a const PixelFormat
      Admin:
        Tested on Raspberry Pi 3, Iyonix, IGEPv5
        Note that we can't easily remove the Service_ModeTranslation handler from ScreenModes and rely purely on the one in the kernel because the kernel can't easily see which modes ScreenModes provides (ditto other Service_ModeTranslation handlers).
      
      
      Version 0.71. Tagged as 'ScrModes-0_71'
      6b9b62ab
  2. 11 Jul, 2017 1 commit
    • Jeffrey Lee's avatar
      Make EDID handling more robust · c3128e9b
      Jeffrey Lee authored
      Detail:
        c/edidsupport:
        - Make readedid() check that the EDID has a valid header. Previously only the checksum was checked, which is wholly insufficient (e.g. an EDID block full of null bytes would be considered valid). loadedid() also updated for consistency, although with the current code the header will have already been detected by loadmodefile().
        - Add some extra checks to readedidblock() to cope with more situations in which the GraphicsV call could fail. Fix confusing comment/code ordering.
        h/errors, Resources/Germany/Messages, Resources/UK/Messages - Add new "Invalid EDID block" error, for use when no valid header is found
      Admin:
        Tested on Raspberry Pi 3
        Booting an EDID-enabled Pi without a monitor (and with the broken BCMVideo 0.47) no longer results in an (unintelligible) error box on entry to the desktop + system stuck in mode 0
        However, note that other issues in the boot sequence mean that booting with EDID enabled and no monitor still isn't 100% wor...
      c3128e9b
  3. 07 Jun, 2017 1 commit
    • Jeffrey Lee's avatar
      Add support for new GraphicsV_VetMode2 call · 94ffeea7
      Jeffrey Lee authored
      Detail:
        VetMode2 allows the driver to give the OS extra feedback about a proposed mode. In particular, it allows the driver to suggest a value for the ExtraBytes control list item, so by using the VetMode2 call ScreenModes is able to support modes where the video driver requires extra padding to be added to the framebuffer.
        h/modex - Remove local definitions of control list item numbers. Reserve space for one extra control list item in the VIDCList structure.
        c/ScrModes - Use Global/VIDCList.h for control list item numbers. Update mode_valid to make use of VetMode2 where available, and give it the ability to copy the resulting VIDCList into a caller-supplied buffer, allowing service_modeextension to easily use the correct ExtraBytes setting.
      Admin:
        Tested on Raspberry Pi 3
        Requires Kernel-5_82
      
      
      Version 0.65. Tagged as 'ScrModes-0_65'
      94ffeea7
  4. 05 Mar, 2017 2 commits
    • ROOL's avatar
      Offer export of raw EDID blob and complementary MDF export · 961adc98
      ROOL authored
      Detail:
        Export the EDID raw data as a file in ResourceFS. This allows the Screen Setup plugin to scan that directory to pick up the currently connected monitor, and similarly select it from !Boot.Choices.PreDesk. The EDID data can also be drag & drop copied or exported for offline analysis.
        Add SaveModeFile command. This differs in that it works on the current set, to be symmetrical with LoadModeFile which loads the current set. Also fixes issues of losing the original mode names given; NULL pointer dereference when the EDID block contains no modes (eg. VIDCDriver); and no long writes out malformed MDFs which can't be loaded into !MakeModes (this seems to be because the CreateModeFile command was based on a stale copy of EDIDDecode which fixed the same bug circa 2012).
        Query the current GraphicsV driver for the deepest colour depth for the preferred mode, rather than assuming 32bpp is always possible (eg. because of bandwidth or graphics controller constraints).
        If the configured MonitorType is EDID but no EDID could be read, or it was corrupt, substitute a safe VESA monitor to allow the kernel to select something close to MODE 28.
        Add ScreenModes_Features SWI so the Screen Setup plugin knows whether it's safe to offer EDID in its dialogues.
        Retire the ReadEDID command (no longer needed since LoadModeFile can load the exported EDID blob, or one from disc) and CreateModeFile commands (see SaveModeFile).
        Internationalise the default monitor title ("Unidentified") used when EDID doesn't contain one.
      Admin:
        New file - doc/BootStates documents all possible situations, and their recovery, for both the MDF and (non-hotplug) EDID schemes.
        New file - doc/EDIDGoals states the aims of the EDID support from both a user and support perspective.
      
        Submission for the EDID bounty.
      
      Version 0.61. Tagged as 'ScrModes-0_61'
      961adc98
    • ROOL's avatar
      Check for array bounds · 95d1dca9
      ROOL authored
      Detail:
        Define MAXDMTMODENUM to guard against requesting DMT timing not in our table. Assert that the table size matches the define.
        Lowercased some 'X' (edidsupport.c), change to _swix (mdfsupport.c).
      Admin:
        Submission for the EDID bounty.
      
      Version 0.60. Tagged as 'ScrModes-0_60'
      95d1dca9
  5. 06 Aug, 2016 2 commits
    • ROOL's avatar
      Do fill in DPMS support · e1d639d1
      ROOL authored
      Detail:
        Don't ignore the monitor's power saving features for EDID; fill in the DPMS value properly.
      Admin:
        Submission for the EDID bounty.
      
      Version 0.57. Tagged as 'ScrModes-0_57'
      e1d639d1
    • ROOL's avatar
      Omit mode name from lookup tables · d0b58c2a
      ROOL authored
      Detail:
        Save 4k of ROM space by not storing the mode name string; always generate it at run time.
        Split the ModeDefinition struct into the timings part (ModeDef) and full definition (ModeDefinition).
      Admin:
        Submission for the EDID bounty.
        Tagged as ScrModes-0_56-smalltables.
      d0b58c2a
  6. 30 Jul, 2016 2 commits
    • ROOL's avatar
      Take advantage of tail of generate functions being common · faff5d05
      ROOL authored
      Detail:
        Now all generation steps end in compute_modedescription()/add_proposed_mode()/display_mode_parameters(), combine these steps into the add_proposed_mode() function.
        Fix for CVT and GTF generation steps never setting the 'priority' member of the descriptor. These are now set to 6 per Table 5.1 of EDID spec 1.4.
      Admin:
        Submission for the EDID bounty.
      
      Version 0.56. Tagged as 'ScrModes-0_56'
      faff5d05
    • ROOL's avatar
      Switch to integer implementation · 862ea508
      ROOL authored
      Detail:
        The dynamic range of the values being computed easily fit within integer types, so use these instead of doubles. This makes ScrModes independent of its position in intialisation with respect to FPEmulator once more, and saves 1k of code space too.
        Functions generate_mode_using_gtf(), generate_mode_using_cvt_rb(), generate_cvt3_timing() affected.
      Admin:
        Test added to brute force compare float and fixed point results.
        Submission for the EDID bounty.
      
      Version 0.55. Tagged as 'ScrModes-0_55'
      862ea508
  7. 14 May, 2016 2 commits
    • ROOL's avatar
      Split out MDF and EDID support · 9936b759
      ROOL authored
      Detail:
        Main source file split into 3.
      Admin:
        Tested briefly, functionality unchanged.
        Submission for the EDID bounty.
        Tagged as ScrModes-0_53-split
      9936b759
    • ROOL's avatar
      Split out data tables, stylistic refactoring · 8a00983b
      ROOL authored
      Detail:
        Move the 500+ lines of tables into a new source file and remove storage inferred by former CEAModes.h.
        Tame some of the rampant style from various authors, even within 1 function, to something reasonably consistent.
        Uppercase the 'debug' macro to 'IFDEBUG'.
        Relocate ScrModes specific defines out of EDIDModes header, rename to edidmemory.h.
        Add monitor type 6 to monitors.h.
        Fix for unguarded debug printout "Can't allocate space for monitor list" in parseedid.
      Admin:
        Tested briefly, functionality unchanged.
        Submission for the EDID bounty.
        Tagged as ScrModes-0_53-tables
      8a00983b
  8. 10 Jan, 2016 1 commit
    • Jeffrey Lee's avatar
      Add support for parsing CEA Short Video Descriptors (SVDs). Fix loaded EDID... · 55179bbd
      Jeffrey Lee authored
      Add support for parsing CEA Short Video Descriptors (SVDs). Fix loaded EDID files being overwritten with monitor EDID during Service_DisplayChanged.
      
      Detail:
        h/CEAModes - Table of CEA mode timings from CEA 861-D
        s/ScrModes - Implement process_cea_video_data_block() in order to support SVD parsing. Ensure loadedid() sets the EDIDEnabled flag to 0, to prevent the loaded EDID (potentially) being replaced during Service_DisplayChanged.
      Admin:
        Tested on iMx6
      
      
      Version 0.53. Tagged as 'ScrModes-0_53'
      55179bbd
  9. 29 Nov, 2015 1 commit
    • Jeffrey Lee's avatar
      Add support for parsing and reporting the contents of CEA 861-D audio-related EDID blocks · 9a30976a
      Jeffrey Lee authored
      Detail:
        Makefile - Export a C version of hdr/ScrModes
        Resources/Germany/Messages, Resources/UK/Messages, h/errors - Add new error message
        cmhg/ScrModesv, hdr/ScrModes - Declare existence of ScreenModes_EnumerateAudioFormats SWI. Declare ScreenModes_ReadInfo reason codes.
        h/modex - Extend MonitorDefinition struct to allow it to store the speaker mask & audio format information that's extracted from the EDID
        c/ScrModes - Extend support for processing of CEA extension blocks. All block revisions > 0 should now be accepted, and rudimentary parsing of CEA data block collections is implemented (currently, only extracts information from audio related blocks). Add SWI ScreenModes_EnumerateAudioFormats to allow details of the supported formats to be returned in either "raw" or "friendly" forms. Add ScreenModes_ReadInfo reason code 1 to allow reading of the speaker mask (+ validity bits). Also fix *LoadModeFile to allow EDID blocks to be loaded without first having to issue *ReadEDID first (EDIDEnabled flag issue).
      Admin:
        Tested on iMX6 with assorted EDID blocks
        German messages file in need of translation
      
      
      Version 0.49. Tagged as 'ScrModes-0_49'
      9a30976a
  10. 20 Feb, 2015 1 commit
    • Jeffrey Lee's avatar
      Add support for CVT 3 byte codes & VTB-EXT blocks. Other misc fixes. · ca1955a4
      Jeffrey Lee authored
      Detail:
        c/ScrModes, h/modex - Added support for CVT 3 byte codes & VTB-EXT blocks. Add framework for sorting modes by EDID priority. Move CEA extension block handling into its own function & increase error checking.
        Resources/Germany/CmdHelp, Resources/UK/CmdHelp - Fix missing message token & incorrect syntax of syntax message
      Admin:
        Code submission from William Harden
        Tested on Raspberry Pi
      
      
      Version 0.47. Tagged as 'ScrModes-0_47'
      ca1955a4
  11. 08 Feb, 2015 1 commit
    • Steve Revill's avatar
      Added prototype EDID support code. · d893357d
      Steve Revill authored
      This should be considered beta-quality work-in-progress code that gives us a
      new *command (ReadEDID) that attempts to read the list of supported display
      mode information from a connected monitory and configure the system for it,
      as if an MDF file had been loaded containing that information.
      
      Admin:
      
      Community testing is required for this feature. Please try replacing the
      LoadModeFile line in your !Boot.Choices.Boot.PreDesk.Configure.Monitor
      file with a line saying "ReadEDID". If you get a sensible looking list
      of modes when the machine boots, then things should be OK. If you see an
      error, please get in touch with ROOL on the "Bounties - ReadEDID" topic.
      You'll clearly need to be running a ROM with this version of ScreenModes
      in it!
      
      Version 0.39. Tagged as 'ScrModes-0_39'
      d893357d
  12. 19 Jan, 2014 1 commit
    • Jeffrey Lee's avatar
      Ensure syncpol word of VIDC list initialised correctly · ad66229d
      Jeffrey Lee authored
      Detail:
        h/modex - Define the syncpol flags as taking up a full word of space, to avoid bits 2-31 being left undefined when generating a VIDC list, and potentially resulting in wrong interlace setting being used
      Admin:
        Tested on Raspberry Pi
      
      
      Version 0.37. Tagged as 'ScrModes-0_37'
      ad66229d
  13. 15 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Update to add support for new pixel formats and basic support for multiple GraphicsV drivers · 3dd5f11e
      Jeffrey Lee authored
      Detail:
        c/ScrModes - All GraphicsV calls now use the current driver number instead of always calling driver 0. Get the list of supported pixel formats via GraphicsV 17 if implemented, otherwise fall back to GraphicsV 8. Generate old or new style mode provider blocks as appropriate.
        h/modex - Update definitions for new mode provider block format, new control list items
      Admin:
        Tested in Tungsten, IOMD, OMAP3, BCM2835 ROMs
        Requires HdrSrc-2_38 and Kernel-5_35-4_79_2_203
      
      
      Version 0.36. Tagged as 'ScrModes-0_36'
      3dd5f11e
  14. 28 Aug, 2012 1 commit
    • Robert Sprowson's avatar
      Relax clipping of mode names 19 characters is a bit mean if you want to say... · b04272ef
      Robert Sprowson authored
      Relax clipping of mode names 19 characters is a bit mean if you want to say "2048 x 1024 big monitor" or similar, so bumped it to 31+terminator.
      
      100 characters for the monitor title is a bit lavish, since (in System font) display manager's title bar can only fit 33 characters, reduced to 31+terminator too.
      Fixes ticket #302.
      
      Version 0.34. Tagged as 'ScrModes-0_34'
      b04272ef
  15. 14 Jul, 2012 1 commit
    • Robert Sprowson's avatar
      Clean up pass · aa5b72f2
      Robert Sprowson authored
      * Makefile recreated from fragments
      * Swap to C99 types, remove 'machtypes.h'
      * Use centralised SWI and service call definitions, remove 'newswis.h' and 'services.h'
      * Error E21 taken out of resources, CMHG generates this one for free
      * Compiler warnings squashed
      
      Version 0.32. Tagged as 'ScrModes-0_32'
      aa5b72f2
  16. 01 Mar, 2001 1 commit
  17. 10 Jan, 2000 1 commit
  18. 12 Oct, 1999 1 commit
  19. 16 Sep, 1999 1 commit
  20. 21 Jan, 1997 1 commit
  21. 05 Nov, 1996 1 commit