About RGB-Pi and Raspberry Pi4

From RGB-Pi Wiki
Revision as of 19:01, 31 May 2020 by RTomas (talk | contribs) (Created page with "==RGB-Pi Statement of Direction - Raspberry Pi4== As many of you are asking whether the RGB-Pi devices will be supporting the latest Raspberry Pi4 models, we wanted to clarif...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

RGB-Pi Statement of Direction - Raspberry Pi4

As many of you are asking whether the RGB-Pi devices will be supporting the latest Raspberry Pi4 models, we wanted to clarify some points here:

  • From the GPIO specifications point of view, all current RGB-Pi devices are 100% compatible with Raspberry Pi4.
  • From the software perspective, we have stomped to a big wall that prevents us from making the different system timings work.

Tests & Tech Facts

After several days of work, we had success on porting our frontend to the Pi4. The problems arose when testing the games, at that point we faced some issues on executing Retroarch (the system hanged with a lovely black screen). After some research, with found out that the problem was caused by the dynamic timing mechanism, that it is now not operative due to the move from the old vc4 graphic chip to the new vc6 which uses a new video driver.

A brief explanation on the different graphic drivers on Raspberry Pi:

  • Legacy - up to Pi3, Raspberry used a custom video driver that communicated directly to the firmware (which only had a custom implementation of OpenGL ES) and had direct access to the framebuffer. This is now legacy and not fully supported in Pi4 anymore (you lose 3D acceleration/OpenGL among others).
  • FKMS (Fake/Firmware KMS) - uses the custom Dispmanx API to communicate with the firmware. It is the new default driver for Pi4 and does not manage well the framebuffer via fbset or tvservice commands.
  • KMS - the kernel communicates directly to the hardware registers bypassing the firmware.

Current Tech Scenario

  • As stated by Raspberry Pi engineers, a full KMS driver for Pi4 is being worked on by a subcontractor, and will be mainlined in the future.
  • Pi4 still has the same DPI, DSI, and VEC blocks. The HVS and HDMI blocks have significant updates, and the pixel valve routing has been changed.
  • The I2C block connected to the HDMI ports is different from previous versions, which is the most likely reason not to get any usable modes if you try enabling it.
  • Disabling FKMS driver in Pi4 results in the following issues:
    • fbset only works in 32 bit depth mode
    • fbset is not able to properly change the framebuffer size, hanging or setting a virtual resolution instead
    • tvservice only works with composite and HDMI

Conclusions

  • We must wait some time until all these changes be mainlined in the Raspberry kernel drivers.
  • Even if KMS works as expected, we will be forced to create a brand new RGB-Pi dtbo containig all available timings in advance.
  • It is probable that timing changes won't be feasible from CLI (no X) anymore but using xrandr over X env, which would leade us to use a Xorg layer and create a new UI based on whatever is required at that point.

So, unfortunately, do not expect anything on Raspberry Pi4 in the short/medium term.

To be continued...