|
XenevaOS
|
#include <drm_panel.h>
Public Attributes | |
| int(* | prepare )(struct drm_panel *panel) |
| int(* | enable )(struct drm_panel *panel) |
| int(* | disable )(struct drm_panel *panel) |
| int(* | unprepare )(struct drm_panel *panel) |
| int(* | get_modes )(struct drm_panel *panel, struct drm_connector *connector) |
| enum drm_panel_orientation(* | get_orientation )(struct drm_panel *panel) |
| int(* | get_timings )(struct drm_panel *panel, unsigned int num_timings, struct display_timing *timings) |
| void(* | debugfs_init )(struct drm_panel *panel, struct dentry *root) |
struct drm_panel_funcs - perform operations on a given panel
The .prepare() function is typically called before the display controller starts to transmit video data. Panel drivers can use this to turn the panel on and wait for it to become ready. If additional configuration is required (via a control bus such as I2C, SPI or DSI for example) this is a good time to do that.
After the display controller has started transmitting video data, it's safe to call the .enable() function. This will typically enable the backlight to make the image on screen visible. Some panels require a certain amount of time or frames before the image is displayed. This function is responsible for taking this into account before enabling the backlight to avoid visual glitches.
Before stopping video transmission from the display controller it can be necessary to turn off the panel to avoid visual glitches. This is done in the .disable() function. Analogously to .enable() this typically involves turning off the backlight and waiting for some time to make sure no image is visible on the panel. It is then safe for the display controller to cease transmission of video data.
To save power when no video data is transmitted, a driver can power down the panel. This is the job of the .unprepare() function.
Backlight can be handled automatically if configured using drm_panel_of_backlight() or drm_panel_dp_aux_backlight(). Then the driver does not need to implement the functionality to enable/disable backlight.
@debugfs_init:
Allows panels to create panels-specific debugfs files.
| int(* drm_panel_funcs::disable) (struct drm_panel *panel) |
@disable:
Disable panel (turn off back light, etc.).
This function is optional.
| int(* drm_panel_funcs::enable) (struct drm_panel *panel) |
@enable:
Enable panel (turn on back light, etc.).
This function is optional.
| int(* drm_panel_funcs::get_modes) (struct drm_panel *panel, struct drm_connector *connector) |
@get_modes:
Add modes to the connector that the panel is attached to and returns the number of modes added.
This function is mandatory.
| enum drm_panel_orientation(* drm_panel_funcs::get_orientation) (struct drm_panel *panel) |
@get_orientation:
Return the panel orientation set by device tree or EDID.
This function is optional.
| int(* drm_panel_funcs::get_timings) (struct drm_panel *panel, unsigned int num_timings, struct display_timing *timings) |
@get_timings:
Copy display timings into the provided array and return the number of display timings available.
This function is optional.
| int(* drm_panel_funcs::prepare) (struct drm_panel *panel) |
@prepare:
Turn on panel and perform set up.
This function is optional.
| int(* drm_panel_funcs::unprepare) (struct drm_panel *panel) |
@unprepare:
Turn off panel.
This function is optional.