Display bridges.
More...
Display bridges.
A bridge is what a display controller sends its pixels through on their way to the panel, as a MIPI DSI host, found at the output port of the controller. To a panel with its own frame memory, the controller has the bridge send it a frame on each refresh, timed by the tearing effect of the panel, which the bridge reports. The controller holds the bridge while it sets itself up for the next refresh.
int pbl_display_bridge_refresh(const struct pbl_display_bridge *bridge)
Send a frame from the display controller to the panel.
int pbl_display_bridge_set_event_cb(const struct pbl_display_bridge *bridge, pbl_display_bridge_event_cb_t cb, void *arg)
Set the callback of the events of a bridge.
int pbl_display_bridge_request_tear(const struct pbl_display_bridge *bridge)
Report the next tearing effect of the panel, with PBL_DISPLAY_BRIDGE_EVENT_TEAR.
◆ pbl_display_bridge
| struct pbl_display_bridge |
◆ PBL_DISPLAY_BRIDGE_INIT
| #define PBL_DISPLAY_BRIDGE_INIT |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_parent, |
|
|
|
_ops |
|
) |
| |
Value: { \
.ops = (_ops), \
}
#define PBL_DEVICE_INIT_CLASS(sym, _name, _init, _parent, _cls)
Initializer for the struct pbl_device of device instance sym, in class _cls.
Definition device.h:153
Initializer for the struct pbl_display_bridge of bridge sym, with its device state defined by PBL_DEVICE_STATE_DEFINE().
- Parameters
-
| sym | Symbol of the bridge instance. |
| _name | Name. |
| _parent | Parent device, as the host the bridge is part of, or NULL. |
| _ops | Driver operations. |
◆ pbl_display_bridge_event_cb_t
Called on an event of a bridge, from its interrupt.
- Parameters
-
| event | Event. |
| arg | Argument given with the callback. |
◆ pbl_display_bridge_event
Events of a bridge.
| Enumerator |
|---|
| PBL_DISPLAY_BRIDGE_EVENT_TEAR | The panel reported its tearing effect, once asked for with pbl_display_bridge_request_tear().
|
| PBL_DISPLAY_BRIDGE_EVENT_REFRESH_DONE | The frame of a refresh is out.
|
◆ pbl_display_bridge_hold()
Stop taking from the display controller while it is set up, or go on.
Callable from an interrupt, as the event callback.
- Parameters
-
| bridge | Bridge. |
| hold | Stop, or go on. |
◆ pbl_display_bridge_refresh()
Send a frame from the display controller to the panel.
The end of the frame is reported with PBL_DISPLAY_BRIDGE_EVENT_REFRESH_DONE. Callable from an interrupt, as the event callback.
- Parameters
-
- Returns
- 0 or a negative errno.
◆ pbl_display_bridge_request_tear()
◆ pbl_display_bridge_set_event_cb()
Set the callback of the events of a bridge.
- Parameters
-
| bridge | Bridge. |
| cb | Callback, or NULL. |
| arg | Passed to cb. |
- Returns
- 0, or
-ENODEV if the bridge is not ready.