Project

General

Profile

Actions

Bug #1050

closed

Allow preferred fb when retrieving display size in piboxLoadDisplayConfig()

Added by Hammel about 1 year ago. Updated about 1 year 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

Also available in: Atom PDF