Bug #1050
closedAllow preferred fb when retrieving display size in piboxLoadDisplayConfig()
100%
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.
Updated by Hammel about 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 70
Implemented most of this in libpibox except for the preferred setting.
What is implemented has been tested on rpi3 and rpi4 with HDMI, TFT and Pi Touchscreen and seems to work fine.
Those changes are committed and pushed.
Now I need to add the updates for making a preferred setting.
Updated by Hammel about 1 year ago
- % Done changed from 70 to 90
piboxSetPreferredFB() is implemented in my sandbox but hasn't been tested. I should test it on a TFT.
Updated by Hammel about 1 year ago
Implemented and pushed, but can't really be tested until merged with the rootfs staging tree. But it was tested to make sure no regressions were introduced to the automatic fb selection code that was introduced just before this.
Issue will be closed after testing on hardware with a test version of launcher using the new API function.
Updated by Hammel about 1 year ago
Ready for testing on hardware.
Test launcher from opkg as is.
Then change to piboxSetPreferredFB(1) and retest.
Updated by Hammel about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
Verified that is doesn't break anything. It does get the display size of the specified fb as well.
Noted a bug in the API function in piboxlib and fixed it.
Code committed and pushed.
Closing issue.