1. 04 Apr, 2020 1 commit
    • Robert Sprowson's avatar
      Add GraphicsV_VetMode2 implementation · 2858b0b0
      Robert Sprowson authored
      Check the control list for an ExtraBytes entry, and use that to remove the restriction on rows being a multiple of 8 pixels by adding padding at the end (via the ROWINC register in DISPC).
      Also add missing check on the VIDC list passed to vet mode being type 3.
      Don't bother calling the platform code if we know the pixel format isn't supported.
      Ensure TV-out & fixed displays vet the DMA parameters.
      Version 0.44. Tagged as 'OMAPVideo-0_44'
  2. 05 Feb, 2020 1 commit
    • Jeffrey Lee's avatar
      Be more forgiving of early OMAP3 revisions · c4ac11e3
      Jeffrey Lee authored
      Early OMAP3 chip revisions have very tight porch & sync limits. This
      means that many standard VESA/CEA aren't supported (e.g. VGA 60), along
      with 90% of the kernel's builtin modes. With Kernel 6.32 this will
      typically result in the OS failing to find a valid screen mode at boot,
      likely resulting in the system failing to boot completely.
      Fix this by (on old chips only) allowing some fudging of the mode
      timings, by shrinking the sync width and increasing the porch width to
      ensure the overall timing is maintained. This is roughly equivalent to
      what would have happened with earlier kernel versions, which didn't
      always vet modes before applying them.
      Tested on rev C2 BeagleBoard (OMAP3530 ES 3.0; porch+sync limits are
      larger in ES 3.1)
      Version 0.43. Tagged as 'OMAPVideo-0_43'
  3. 05 Jul, 2019 1 commit
  4. 29 Jun, 2019 1 commit
  5. 31 May, 2018 1 commit
    • Jeffrey Lee's avatar
      Big refactor, introduce GraphicsV overlay API support · e285399d
      Jeffrey Lee authored
        This change introduces initial support for the GraphicsV overlay API.
        RGB & YUV overlays are supported, along with rotation and scaling.
        Vertical flipping isn't supported yet, and there are still a number of bugs to track down, along with some potential improvements.
        The code has also been refactored significantly, in an attempt to protect all critical state with spinlocks/mutexes (as appropriate), and to reduce the number of globals so that it's easier to see what's touching what. Previously very little locking was performed, which could lead to issues if VSyncs or synclost interrupts occurred during certain operations. Now, the data should be structured in such a way that this shouldn't cause problems.
        Notable things:
        * State which needs to be writable from interrupt handlers is protected by spinlocks
        * State which needs to be readable from interrupt handlers is protected by reader-writer spinlocks
        * State which doesn't need to be accessed from interrupt handlers is unprotected (mutexes can be introduced in the future to make the code SMP-safe)
        * Using non-alpha screen modes for the desktop will currently result in only "basic" overlays being supported (i.e. overlays which appear ontop of the desktop). In some cases this could be improved by falling back to a software pointer, but for now the only way to get Z-Order overlays is to use a screen mode with an alpha channel.
        * Memory allocation for overlays is abstracted via the buffer interface (h/buffer). This has three implementations: basic buffers for untransformed overlays, VRFB-transformed buffers for OMAP3, and TILER-transformed buffers for OMAP4.
        * Ultimately all overlay memory is allocated as physically contiguous pages within a PMP - although since TILER contains its own MMU this isn't strictly necessary on OMAP4
        * Overlay memory is mapped as write-through cacheable for CPU access; experimentation with different cache policies has yet to be performed. However a potential future optimisation would be to perform lazy unmapping of overlay buffers, reducing the map/unmap overhead in well-behaved code which only maps buffers when they're needed
        Tested on BB-xM, Pandaboard
      Version 0.41. Tagged as 'OMAPVideo-0_41'
  6. 25 Nov, 2017 1 commit
    • ROOL's avatar
      Minor OMAP4 driver updates · c8dcfdc3
      ROOL authored
        Disable G16M modes so that EDID preferred mode can work.
        Correction to AND mask in omap4_vid_disable.
        Submission from Willi Theiss.
      Version 0.40. Tagged as 'OMAPVideo-0_40'
  7. 14 Aug, 2015 1 commit
    • Jeffrey Lee's avatar
      Add memory barriers to GraphicsV acceleration · a1cf1a32
      Jeffrey Lee authored
        c/sdma - Use a read/write barrier at the start and end of any DMA op, to ensure things are ready for switching screen memory to Normal, non-cacheable
        c/cmodule, h/globals - Get the DMB_ReadWrite ARMop ptr on startup
        Tested on BB-xM, PandaBoard
      Version 0.39. Tagged as 'OMAPVideo-0_39'
  8. 03 Aug, 2015 1 commit
    • Robert Sprowson's avatar
      Build fix · 49c66a29
      Robert Sprowson authored
      Don't set RES_OBJ to an empty string.
      Version 0.38. Tagged as 'OMAPVideo-0_38'
  9. 14 Jun, 2015 1 commit
    • Jeffrey Lee's avatar
      Misc tweaks · a5cef008
      Jeffrey Lee authored
        c/cmodule, c/sdma, h/regs, h/sdma, omap3/c/omap, omap4/c/omap - Move *SDMARegs handling from c/cmodule to c/sdma. Define DUMPREG in h/regs instead of in each individual file that uses it.
        omap3/c/dispc_plat, omap4/c/dispc_plat - Fix setting of GO bits in dispc_flush_transparency_cfg()
        omap4/c/dss - Update comment
        omap4/c/omap - Use designated initialisers for omapformats array to ensure it stays in sync with enum ordering. Strip dead code.
        Changes supplied by Willi Theiss
        Tested on BB-xM
      Version 0.37. Tagged as 'OMAPVideo-0_37'
  10. 31 May, 2015 2 commits
    • Jeffrey Lee's avatar
      Add chip-specific functions for *VideoRegs and *TVRegs. Change some OMAP3 register names. · b9501f53
      Jeffrey Lee authored
        c/cmodule, h/globals, omap3/c/omap, omap4/c/omap - Get rid of all the ugly #if's in *VideoRegs handling by moving video & TV register dump logic into chip-specific functions (omap_dump_videoregs, omap_dump_tvregs).
        h/regs3, omap3/c/dispc_plat, omap3/c/dss, omap3/c/omap, omap3/c/venc - Remove '1' from DISPC control & config register names, was only present for OMAP4 compatibility.
        omap4/c/dsi - Fix debug compile error due to DSI PLL regmf removal
        OMAP3/OMAP4 debug/ROM versions all build correctly
        Untested at runtime
      Version 0.36. Tagged as 'OMAPVideo-0_36'
    • Jeffrey Lee's avatar
      OMAP4 tweaks and fixes · 93634278
      Jeffrey Lee authored
        c/cmodule - Debug code updated to use new register names
        h/dss - Remove regmf field from clock_divider_t
        h/regs3 - Correct typo in OVERLAY_ATTRIBUTES register field
        h/regs4 - Rename many registers to match the name used in the OMAP4 TRM (previously used OMAP3 naming due to shared code being used for both chips). Fix the occasional mistake. Also removed configuration4 register from DSI PLL (not mentioned in recent TRMs)
        omap4/c/dispc_plat - Updated for new register names
        omap4/c/dsi - Remove setting of DSI PLL configuration4 register
        omap4/c/dss - Update for new register names. Removal of regm4 from clock_divider_t. Update FIFO configuration so that the larger WB FIFO is used instead of the GFX one.
        omap4/c/omap - Update for new register names and FIFO setup. Fix omap4_vetmode_ldc2() returning true for invalid widths instead of false.
        Changes supplied by Willi Theiss
        Tested on Pandaboard
      Version 0.35. Tagged as 'OMAPVideo-0_35'
  11. 17 May, 2015 1 commit
    • Jeffrey Lee's avatar
      Big code refactor · e30da6ff
      Jeffrey Lee authored
        Support for different OMAP revisions has now been abstracted, with code specific to a certain OMAP revision now located in the omap3 and omap4 folders. This has resulted in some code duplication, but greater readability due to the removal of the #defines that were in use before. This new structure should also make it easier to implement new features, especially those only supported by certain OMAPs.
        Each platform provides a headattrs struct and an overlayattrs struct, which are the primary interface the core code uses to control the backend. Eventually it may be possible to produce one build of the module which supports multiple OMAP revisions at runtime, but for now some #defines and OMAP-specific code remains in the common files.
        This change also adds support for extra pixel formats, gamma table support for OMAP4, and fixes several bugs.
        Tested on BeagleBoard, PandaBoard
      Version 0.34. Tagged as 'OMAPVideo-0_34'
  12. 04 Aug, 2014 1 commit
  13. 20 Jul, 2014 1 commit
    • Jeffrey Lee's avatar
      Handle interlace control list item. TV-out fixes. · 1ce97c50
      Jeffrey Lee authored
        c/graphicsv - Handle the interlace control list item; interlace must be disabled for DVI output but can be specified for TV output (although we only use it to determine the overlay dimensions). Remove dummy GraphicsV_SetInterlace implementation. Fix GraphicsV_Features to return correct pixel formats for TV-out. Make GraphicsV_IICOp do nothing for TV-out.
        Tested on BB-xM
      Version 0.32. Tagged as 'OMAPVideo-0_32'
  14. 27 May, 2014 1 commit
  15. 19 Jan, 2014 1 commit
  16. 17 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Add support for controlling TV-out power · a360a608
      Jeffrey Lee authored
        h/globals - Add new tvpower_func entry to board config struct to allow for board-specific TV-out power controls
        c/venc - Enable/disable TV-out power when enabling/disabling TV-out
        Tested on Pandora and BB-xM
      Version 0.29. Tagged as 'OMAPVideo-0_29'
  17. 15 Dec, 2013 1 commit
    • Jeffrey Lee's avatar
      Update for new GraphicsV registration process. Remove VIDC20 16bpp gamma... · f4bde473
      Jeffrey Lee authored
      Update for new GraphicsV registration process. Remove VIDC20 16bpp gamma demangle code. Advertise red/blue swapped 16bpp & 32bpp modes when using TV-out.
        c/cmodule - Updated to use new GraphicsV registration process and OS_Hardware reason code #defines
        c/dispc, c/venc, h/graphicsv, h/venc - Use Hdr:VIDCList instead of local VIDC list definition
        c/graphicsv - Implement GraphicsV_PixelFormats, and return an appropriate list based on whether TV-out is in use. Call through to the HAL for GraphicsV_IICOp instead of relying on the OS to call the HAL for us.
        c/palette - Remove VIDC20 16bpp gamma demangle code, the OS now supplies the data in a sensible format. Dont use mouse palette function intended for 555 mode emulation if CPR isn't in use (i.e. we're on TV-out, i.e. gamma won't be available either)
        Tested in OMAP3 ROM on BB-xM
        OMAP4 version builds but is unstested
        Requires HdrSrc-2_38 and Kernel-5_35-4_79_2_203
      Version 0.28. Tagged as 'OMAPVideo-0_28'
  18. 18 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Internationalised · 1c4bfcc4
      Robert Sprowson authored
      The failure to activate error message is a little tenuous, but distinct and non zero.
      Built, but not tested.
      Version 0.27. Tagged as 'OMAPVideo-0_27'
  19. 07 Nov, 2012 1 commit
    • Jeffrey Lee's avatar
      Mode vetting fixes and improvements · 83a51d31
      Jeffrey Lee authored
        c/graphicsv - Fix do_vetmode() incorrectly failing most modes due to wrong pixel rate being passed to calculate_dss_clock_divider(). Fix LCD vet rules being used when TV-out is in use. Add extra rule to check for minimum H/V timings.
        Tested on BB-xM
        Numbered modes now work properly when selected (assuming suitable entries exists in MDF)
      Version 0.26. Tagged as 'OMAPVideo-0_26'
  20. 02 Nov, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix wrong mouse colours in 16bpp modes · 34ae668f
      Jeffrey Lee authored
        c/palette - Improved handling of mouse palette so that it's aware of the special gamma table used on OMAP3 to convert RISC OS's 555 pixel format to OMAP's 565. Also fixed the 555 code to fill in all the relevant gamma table entries instead of just the ones that desktop pixels will hit.
        Tested on BB-xM
        Fixes issue reported on forums with black mouse pointer:
      Version 0.25. Tagged as 'OMAPVideo-0_25'
  21. 18 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Add support for TV detection and automatic TV mode selection on OMAP3. Make... · 4662e31f
      Jeffrey Lee authored
      Add support for TV detection and automatic TV mode selection on OMAP3. Make boardconfig_t struct extensible.
        c/cmodule - If TV support is enabled (i.e. OMAP3 build), and the boardconfig_t indicates that TV-out is supported, the module will now use the TV detection feature to check if a TV is connected on startup. If a TV is found then a suitable TV mode will be chosen from the configured territory, and the TV output will be set as the main display.
        h/globals - Modified boardconfig_t to make the structure extensible - two padding bytes are now used to store the size of the struct as reported by the HAL device. Added new entry to boardconfig_t for the TV detection function.
        Tested on BB-xM with high processor vectors
      Version 0.24. Tagged as 'OMAPVideo-0_24'
  22. 09 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Improve TV-Out support. Fix pointer transparency after DSS reset. Other tweaks. · b30a816b
      Jeffrey Lee authored
        c/venc - Fixed corruption when PAL output was in use and the display reached the bottom two rows of the screen; the screen height was being calculated incorrectly from the VENC register settings. This was also causing the constant SYNCLOSTDIGITAL interrupts.
        c/dss - Mark the mouse pointer image as dirty inside dss_reset(), to ensure the transparency colour gets set to hardware the next time the pointer is updated
        Makefile, cmhg/modhead - Make module help string reflect which OMAP version the module is for
        c/venc, h/regs3 - Added revision ID registers to OMAP3 register blocks, to reduce the number of differences between the OMAP3 & OMAP4 versions. The revision ID registers do exist on OMAP3, they just weren't listed in the early TRM version the module was first created from. Also fixed layout of DSI registers on OMAP3.
        OMAP3 version tested on rev A2 BB-xM
        OMAP4 version builds but untested
      Version 0.23. Tagged as 'OMAPVideo-0_23'
  23. 04 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Improve TV-out support · bce9ebd7
      Jeffrey Lee authored
        c/cmodule, c/dispc, c/graphicsv, c/venc, h/venc - Updated TV-out code to center the desktop within the display, while also taking into account the border/porch timings in order to allow vertical shifting using *TV.
        Tested on rev A2 BB-xM
      Version 0.22. Tagged as 'OMAPVideo-0_22'
  24. 06 May, 2012 3 commits
    • Robert Sprowson's avatar
      Some pointers initialised to NULL rather than 0. · d2c44a04
      Robert Sprowson authored
      Compiles, not tested.
      Version 0.21. Tagged as 'OMAPVideo-0_21'
    • Robert Sprowson's avatar
      Merge of OMAP3 and OMAP4 video driver sources. · 5fb58232
      Robert Sprowson authored
      With 85%+ shared code, tracking changes between these two modules was getting complicated, so now this single module will serve both OMAP3 targets and OMAP4.
      At present, the differences are simply selected at compile time with a switch. This may make sense to further rationalise either with tidier macros or run time detection (since the HAL knows which controller is running).
      Tested on OMAP3 in all 8 colour depths,
      Tested by Willi Theiss on OMAP4.
      Version 0.20. Tagged as 'OMAPVideo-0_20'
    • Robert Sprowson's avatar
      Merge of headers with OMAP4Video · eddc762f
      Robert Sprowson authored
      For the most part, this is just adding "_t" suffixes to all the typedefs.
      The OMAP4 controller registers are in "regs4.h" and OMAP3 in "regs3.h", they are selected between with a compile time switch - hence !MkROM becomes !Ms !MkRom3 and !MkRom4.
      OMAP3 version tested & still works, OMAP4 will not work.
      Version 0.19. Tagged as 'OMAPVideo-0_19'
  25. 24 Apr, 2012 1 commit
    • Jeffrey Lee's avatar
      Activate display on module startup · f42da1d6
      Jeffrey Lee authored
        c/cmodule - Issue a dummy mode change on module startup in order to activate the screen earlier on in the ROM boot sequence. Should make it clearer that the machine hasn't crashed, and increase the chances of users spotting any fatal ROM initialisation errors.
        Tested on rev A2 BB-xM
      Version 0.18. Tagged as 'OMAPVideo-0_18'
  26. 04 Feb, 2012 1 commit
  27. 15 Jan, 2012 1 commit
  28. 14 Jan, 2012 1 commit
  29. 12 Dec, 2011 1 commit
    • Steve Revill's avatar
      Fixed the Makefile. · 42439701
      Steve Revill authored
      Attempted a non-existent export in the resources phase.
      Version 0.14. Tagged as 'OMAPVideo-0_14'
  30. 23 Oct, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix black screen on boot issue. Use C99 number types. · c04fa956
      Jeffrey Lee authored
        c/dss - Fixed the cause of the black screens on boot on OMAP3 machines (DM37xx seems fine). It looks like the cause was due to skipping the step where you disable the LCD output before triggering the DSS reset.
        c/cmodule, c/dispc, c/dss, c/graphicsv, h/globals - Removed code relating to previous attempts to fix the black screen issue
        c/cmodule, c/dispc, c/dsi, c/dss, c/graphicsv, c/palette, c/regs, c/sdma, c/venc, h/dsi, h/dss, h/globals, h/graphicsv, h/palette, h/regs - Use the C99 number types instead of u32, u16, etc.
        Tested on rev C2 BB, rev A2 BB-xM
      Version 0.13. Tagged as 'OMAPVideo-0_13'
  31. 11 Jul, 2011 1 commit
  32. 19 Mar, 2011 1 commit
  33. 19 Feb, 2011 1 commit
    • Jeffrey Lee's avatar
      Make GraphicsV_IICOp work · 5807e761
      Jeffrey Lee authored
        c/graphicsv - The GraphicsV_IICOp handler now just passes on the call, so that the kernel will call HAL_Video_IICOp instead.
        Tested on rev A2 BB-xM
      Version 0.10. Tagged as 'OMAPVideo-0_10'
  34. 08 Feb, 2011 1 commit
  35. 31 Oct, 2010 1 commit
    • Jeffrey Lee's avatar
      Improve OMAPVideo power saving abilities and palette handling · 83ef2b6b
      Jeffrey Lee authored
        Makefile, c/palette, h/palette, c/cmodule, c/dispc, c/graphicsv, h/globals - Rewrote palette handling code to support multiple different transformations on palettes, to adapt the palettes from the RISC OS formats to the DISPC formats. This means that palettes and the mouse cursor are now correctly R/B swapped for TV-out, RISC OS's gamma correction tables are now supported, and clever use of gamma tables allows 16bpp modes to be displayed correctly by mapping RISC OS's 555 format to the OMAP's 565 format (but there'll only be 4 blue bits instead of 5)
        c/cmodule, c/dispc, c/graphicsv, h/globals - Add support for the HAL's new display power controls, and implement GraphicsV_SetBlank. For fixed LCDs this will ignore the requested DPMS state and instead just turn the power/backlight off.
        h/sdma - Marked the functions as extern.
        Tested on rev C2 beagleboard, rev C1 touchbook.
        Requires OMAP3 HAL 0.34.
      Version 0.08. Tagged as 'OMAPVideo-0_08'
  36. 14 Sep, 2010 1 commit
    • Jeffrey Lee's avatar
      OMAPVideo fixes & tweaks · 74e8d5e0
      Jeffrey Lee authored
        Makefile - now rewritten to use CModule fragment instead of obsolete RAMCModule/ROMCModule fragments
        c/cmodule - Make *videoregs print out a couple more regs
        c/dsi - Fix debug output when DSI requests time out. Fix HSDIVIDER not working on AM/DM37x.
        c/graphicsv - When setting the mode from a VIDC list, add the border values to the porch values to take into account the hardware's inability to emulate VIDC's coloured border facility. Behaviour matches that of NVidia module.
        h/regs - Add definitions for SMS registers (for display rotation)
        Tested on rev C2 beagleboard, rev A2 BB-xM (indirectly), rev C1 TouchBook
      Version 0.07. Tagged as 'OMAPVideo-0_07'
  37. 28 Jun, 2010 1 commit