Actions
Bug #1050
closedAllow preferred fb when retrieving display size in piboxLoadDisplayConfig()
Start date:
19 Oct 2023
Due date:
% Done:
100%
Estimated time:
Severity:
01 - Critical
Description
An app calls piboxGetDisplaySize(), but this just fronts data culled by piboxLoadDisplayConfig(). Given the changes to TFT display support, this needs to change. If this is fixed, then the vc4-fkms-xxx overlays can be used all the time, allowing proper use of DRM/KMS and thus Mesa/OpenGL and fixing launcher (and others) when used on a TFT with those overlays.
- Remove dependency on /etc/pibox-config to read display size. That's hacky.
- In piboxLoadDisplayConfig(), use just /sys/class/graphics/fbX/virtual_size, where X defaults to 0 but can use a preferred number instead.
- if the preferred number doesn't exist, fallback to default
- Drop static display_resolution - it isn't needed in the library
- Make display_touch a local variable to piboxLoadDisplayConfig()
- Make display_type a local variable to piboxLoadDisplayConfig()
- Add piboxSetPreferredFB() to set a library global - must be called before any other library display functions
- If preferred is set, use it in piboxLoadDisplayConfig(), otherwise use fb1
- Use fb0 if preferred or fb1 doesn't exist.
Actions