lv_linux_drm.h

API reference for lv_linux_drm.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_linux_drm_private.h

Functions

lv_linux_drm_set_file

Configure the DRM device file and connector for a display.

Sets the DRM device file path and connector ID to use for the specified display. The DRM device file is typically located at /dev/dri/cardN where N is the card number. The connector ID specifies which physical output (HDMI, VGA, etc.) to use.

 
lv_result_t lv_linux_drm_set_file(lv_display_t *disp, const char *file, int64_t connector_id)
Parameters
NameTypeDescription
displv_display_t *Pointer to the display object created with lv_linux_drm_create()
fileconst char *Path to the DRM device file (e.g., "/dev/dri/card0")
connector_idint64_tID of the DRM connector to use, or -1 to auto-select the first available

Returns: lv_result_t — LV_RESULT_OK if the initialization succeeded or LV_RESULT_INVALID if it failed

lv_linux_drm_set_mode_cb

Set a callback function for custom DRM mode selection to override the default mode selection behavior

The default mode selection behavior is selecting the native mode

 
void lv_linux_drm_set_mode_cb(lv_display_t *disp, lv_linux_drm_select_mode_cb_t callback)
Parameters
NameTypeDescription
displv_display_t *pointer to the display object
callbacklv_linux_drm_select_mode_cb_tfunction to be called when a display mode needs to be selected, or NULL to use the default mode selection behavior

Typedefs

lv_linux_drm_mode_t

 
typedef struct _lv_linux_drm_mode_t lv_linux_drm_mode_t

DRM display mode information. Contains the essential display parameters for mode selection.

Used by 5 functions
  • lv_linux_drm_mode_get_horizontal_resolution — param mode
  • lv_linux_drm_mode_get_vertical_resolution — param mode
  • lv_linux_drm_mode_get_refresh_rate — param mode
  • lv_linux_drm_mode_is_preferred — param mode
  • lv_linux_drm_mode_get_raw — param mode

lv_linux_drm_select_mode_cb_t

 
typedef size_t(* lv_linux_drm_select_mode_cb_t) (lv_display_t *disp, const lv_linux_drm_mode_t *modes, size_t mode_count)

Callback function type for selecting a DRM display mode

Used by 1 function
  • lv_linux_drm_set_mode_cb — param callback

Dependencies

Last updated on

On this page