Project

General

Profile

Actions

Bug #1050

closed

Allow preferred fb when retrieving display size in piboxLoadDisplayConfig()

Added by Hammel 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
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.

  1. Remove dependency on /etc/pibox-config to read display size. That's hacky.
  2. In piboxLoadDisplayConfig(), use just /sys/class/graphics/fbX/virtual_size, where X defaults to 0 but can use a preferred number instead.
    1. if the preferred number doesn't exist, fallback to default
  3. Drop static display_resolution - it isn't needed in the library
  4. Make display_touch a local variable to piboxLoadDisplayConfig()
  5. Make display_type a local variable to piboxLoadDisplayConfig()
  6. Add piboxSetPreferredFB() to set a library global - must be called before any other library display functions
  7. If preferred is set, use it in piboxLoadDisplayConfig(), otherwise use fb1
    1. Use fb0 if preferred or fb1 doesn't exist.
Actions #1

Updated by Hammel 6 months 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.

Actions #2

Updated by Hammel 6 months 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.

Actions #3

Updated by Hammel 6 months 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.

Actions #4

Updated by Hammel 6 months ago

Ready for testing on hardware.
Test launcher from opkg as is.
Then change to piboxSetPreferredFB(1) and retest.

Actions #5

Updated by Hammel 6 months 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.

Actions

Also available in: Atom PDF