Functions
Drm output functions

Functions that deal with setup of outputs. More...

Functions

EAPI Eina_Bool ecore_drm2_outputs_create (Ecore_Drm2_Device *device)
 Iterate drm resources and create outputs. More...
 
EAPI void ecore_drm2_outputs_destroy (Ecore_Drm2_Device *device)
 Destroy any created outputs. More...
 
EAPI const Eina_Listecore_drm2_outputs_get (Ecore_Drm2_Device *device)
 Get the list of outputs from a drm device. More...
 
EAPI int ecore_drm2_output_dpms_get (Ecore_Drm2_Output *output)
 Get the dpms level of a given output. More...
 
EAPI void ecore_drm2_output_dpms_set (Ecore_Drm2_Output *output, int level)
 Set the dpms level of a given output. More...
 
EAPI char * ecore_drm2_output_edid_get (Ecore_Drm2_Output *output)
 Get the edid of a given output. More...
 
EAPI Eina_Bool ecore_drm2_output_backlight_get (Ecore_Drm2_Output *output)
 Get if a given output has a backlight. More...
 
EAPI Ecore_Drm2_Output * ecore_drm2_output_find (Ecore_Drm2_Device *device, int x, int y)
 Find an output at the given position. More...
 
EAPI void ecore_drm2_output_geometry_get (Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h)
 Get the geometry of a given output. More...
 
EAPI void ecore_drm2_output_dpi_get (Ecore_Drm2_Output *output, int *xdpi, int *ydpi)
 Get the dpi of a given output. More...
 
EAPI unsigned int ecore_drm2_output_crtc_get (Ecore_Drm2_Output *output)
 Get the id of the crtc that an output is using. More...
 
EAPI Ecore_Drm2_Fb * ecore_drm2_output_latest_fb_get (Ecore_Drm2_Output *output)
 Return the most recently set Ecore_Drm2_Fb for a given output. More...
 
EAPI void ecore_drm2_output_crtc_size_get (Ecore_Drm2_Output *output, int *w, int *h)
 Get the size of the crtc for a given output. More...
 
EAPI Eina_Bool ecore_drm2_output_primary_get (Ecore_Drm2_Output *output)
 Get if a given output is marked as the primary output. More...
 
EAPI void ecore_drm2_output_primary_set (Ecore_Drm2_Output *output, Eina_Bool primary)
 Set a given output to be primary. More...
 
EAPI Eina_Bool ecore_drm2_output_enabled_get (Ecore_Drm2_Output *output)
 Get if a given output is enabled. More...
 
EAPI void ecore_drm2_output_enabled_set (Ecore_Drm2_Output *output, Eina_Bool enabled)
 Set if a given output is enabled. More...
 
EAPI void ecore_drm2_output_physical_size_get (Ecore_Drm2_Output *output, int *w, int *h)
 Get the physical size of a given output. More...
 
EAPI const Eina_Listecore_drm2_output_modes_get (Ecore_Drm2_Output *output)
 Get a list of the modes supported on a given output. More...
 
EAPI void ecore_drm2_output_mode_info_get (Ecore_Drm2_Output_Mode *mode, int *w, int *h, unsigned int *refresh, unsigned int *flags)
 Get information from an existing output mode. More...
 
EAPI Eina_Bool ecore_drm2_output_mode_set (Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode, int x, int y)
 Set a given mode to be used on a given output. More...
 
EAPI char * ecore_drm2_output_name_get (Ecore_Drm2_Output *output)
 Get the name of a given output. More...
 
EAPI char * ecore_drm2_output_model_get (Ecore_Drm2_Output *output)
 Get the model of a given output. More...
 
EAPI Eina_Bool ecore_drm2_output_connected_get (Ecore_Drm2_Output *output)
 Get if a given output is connected. More...
 
EAPI Eina_Bool ecore_drm2_output_cloned_get (Ecore_Drm2_Output *output)
 Get if a given output is cloned. More...
 
EAPI unsigned int ecore_drm2_output_connector_type_get (Ecore_Drm2_Output *output)
 Get the connector type of a given output. More...
 
EAPI void ecore_drm2_output_resolution_get (Ecore_Drm2_Output *output, int *w, int *h, unsigned int *refresh)
 Get the current resolution of a given output. More...
 
EAPI Eina_Bool ecore_drm2_output_possible_crtc_get (Ecore_Drm2_Output *output, unsigned int crtc)
 Get if an output can be used on a given crtc. More...
 
EAPI void ecore_drm2_output_gamma_set (Ecore_Drm2_Output *output, uint16_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
 Set the gamma level of an Ecore_Drm_Output. More...
 
EAPI int ecore_drm2_output_supported_rotations_get (Ecore_Drm2_Output *output)
 Get the supported rotations of a given output. More...
 
EAPI Eina_Bool ecore_drm2_output_rotation_set (Ecore_Drm2_Output *output, int rotation)
 Set a rotation on a given output. More...
 
EAPI void ecore_drm2_output_user_data_set (Ecore_Drm2_Output *o, void *data)
 Set the user data for the output's page flip handler. More...
 
EAPI unsigned int ecore_drm2_output_subpixel_get (const Ecore_Drm2_Output *output)
 Get the subpixel state of the output. More...
 
EAPI void * ecore_drm2_fb_bo_get (Ecore_Drm2_Fb *fb)
 Get the Framebuffer's gbm buffer object. More...
 
EAPI void ecore_drm2_fb_status_handler_set (Ecore_Drm2_Fb *fb, Ecore_Drm2_Fb_Status_Handler handler, void *data)
 Register a callback for buffer status updates. More...
 

Detailed Description

Functions that deal with setup of outputs.

Function Documentation

◆ ecore_drm2_outputs_create()

EAPI Eina_Bool ecore_drm2_outputs_create ( Ecore_Drm2_Device *  device)

Iterate drm resources and create outputs.

Parameters
device
Returns
EINA_TRUE on success, EINA_FALSE otherwise
Since
1.18

◆ ecore_drm2_outputs_destroy()

EAPI void ecore_drm2_outputs_destroy ( Ecore_Drm2_Device *  device)

Destroy any created outputs.

Parameters
device
Since
1.18

◆ ecore_drm2_outputs_get()

EAPI const Eina_List* ecore_drm2_outputs_get ( Ecore_Drm2_Device *  device)

Get the list of outputs from a drm device.

Parameters
device
Returns
Since
1.18

◆ ecore_drm2_output_dpms_get()

EAPI int ecore_drm2_output_dpms_get ( Ecore_Drm2_Output *  output)

Get the dpms level of a given output.

Parameters
output
Returns
Integer value representing the state of DPMS on a given output or -1 on error
Since
1.18

◆ ecore_drm2_output_dpms_set()

EAPI void ecore_drm2_output_dpms_set ( Ecore_Drm2_Output *  output,
int  level 
)

Set the dpms level of a given output.

Parameters
output
level
Since
1.18

◆ ecore_drm2_output_edid_get()

EAPI char* ecore_drm2_output_edid_get ( Ecore_Drm2_Output *  output)

Get the edid of a given output.

Parameters
output
Returns
A string representing the edid
Since
1.18

◆ ecore_drm2_output_backlight_get()

EAPI Eina_Bool ecore_drm2_output_backlight_get ( Ecore_Drm2_Output *  output)

Get if a given output has a backlight.

Parameters
output
Returns
EINA_TRUE if this output has a backlight, EINA_FALSE otherwise
Since
1.18

◆ ecore_drm2_output_find()

EAPI Ecore_Drm2_Output* ecore_drm2_output_find ( Ecore_Drm2_Device *  device,
int  x,
int  y 
)

Find an output at the given position.

Parameters
device
x
y
Returns
An Ecore_Drm2_Output which exists at the given coordinates, or NULL on failure
Since
1.18

◆ ecore_drm2_output_geometry_get()

EAPI void ecore_drm2_output_geometry_get ( Ecore_Drm2_Output *  output,
int *  x,
int *  y,
int *  w,
int *  h 
)

Get the geometry of a given output.

Parameters
output
x
y
w
h
Since
1.18

◆ ecore_drm2_output_dpi_get()

EAPI void ecore_drm2_output_dpi_get ( Ecore_Drm2_Output *  output,
int *  xdpi,
int *  ydpi 
)

Get the dpi of a given output.

Parameters
output
xdpi
ydpi
Since
1.19

◆ ecore_drm2_output_crtc_get()

EAPI unsigned int ecore_drm2_output_crtc_get ( Ecore_Drm2_Output *  output)

Get the id of the crtc that an output is using.

Parameters
output
Returns
A valid crtc id or 0 on failure
Since
1.18

◆ ecore_drm2_output_latest_fb_get()

EAPI Ecore_Drm2_Fb* ecore_drm2_output_latest_fb_get ( Ecore_Drm2_Output *  output)

Return the most recently set Ecore_Drm2_Fb for a given output.

This may be the currently scanned out buffer, a buffer currently being flipped to scanout, or a buffer that has been submit but may not actually ever hit scanout at all.

Parameters
output
Returns
The latest Ecore_Drm2_Fb submit for this output, or NULL otherwise
Since
1.19

◆ ecore_drm2_output_crtc_size_get()

EAPI void ecore_drm2_output_crtc_size_get ( Ecore_Drm2_Output *  output,
int *  w,
int *  h 
)

Get the size of the crtc for a given output.

Parameters
output
*w
*h
Since
1.18

◆ ecore_drm2_output_primary_get()

EAPI Eina_Bool ecore_drm2_output_primary_get ( Ecore_Drm2_Output *  output)

Get if a given output is marked as the primary output.

Parameters
output
Returns
EINA_TRUE if output is primary, EINA_FALSE otherwise
Since
1.18

◆ ecore_drm2_output_primary_set()

EAPI void ecore_drm2_output_primary_set ( Ecore_Drm2_Output *  output,
Eina_Bool  primary 
)

Set a given output to be primary.

Parameters
output
primary
Since
1.18

◆ ecore_drm2_output_enabled_get()

EAPI Eina_Bool ecore_drm2_output_enabled_get ( Ecore_Drm2_Output *  output)

Get if a given output is enabled.

Parameters
output
Returns
EINA_TRUE if enabled, EINA_FALSE otherwise.
Since
1.18

◆ ecore_drm2_output_enabled_set()

EAPI void ecore_drm2_output_enabled_set ( Ecore_Drm2_Output *  output,
Eina_Bool  enabled 
)

Set if a given output is enabled.

Parameters
output
enabled
Since
1.18

◆ ecore_drm2_output_physical_size_get()

EAPI void ecore_drm2_output_physical_size_get ( Ecore_Drm2_Output *  output,
int *  w,
int *  h 
)

Get the physical size of a given output.

This function will give the physical size (in mm) of an output

Parameters
output
*w
*h
Since
1.18

◆ ecore_drm2_output_modes_get()

EAPI const Eina_List* ecore_drm2_output_modes_get ( Ecore_Drm2_Output *  output)

Get a list of the modes supported on a given output.

Parameters
output
Returns
An Eina_List of the modes supported for this output
Note
The returned list should not be freed
Since
1.18

◆ ecore_drm2_output_mode_info_get()

EAPI void ecore_drm2_output_mode_info_get ( Ecore_Drm2_Output_Mode *  mode,
int *  w,
int *  h,
unsigned int *  refresh,
unsigned int *  flags 
)

Get information from an existing output mode.

Parameters
mode
w
h
refresh
flags
Since
1.18

◆ ecore_drm2_output_mode_set()

EAPI Eina_Bool ecore_drm2_output_mode_set ( Ecore_Drm2_Output *  output,
Ecore_Drm2_Output_Mode *  mode,
int  x,
int  y 
)

Set a given mode to be used on a given output.

Parameters
output
mode
x
y
Returns
EINA_TRUE on success, EINA_FALSE otherwise
Since
1.18

References EINA_TRUE.

◆ ecore_drm2_output_name_get()

EAPI char* ecore_drm2_output_name_get ( Ecore_Drm2_Output *  output)

Get the name of a given output.

Parameters
output
Returns
A string representing the output's name. Caller should free this return.
Since
1.18

◆ ecore_drm2_output_model_get()

EAPI char* ecore_drm2_output_model_get ( Ecore_Drm2_Output *  output)

Get the model of a given output.

Parameters
output
Returns
A string representing the output's model. Caller should free this return.
Since
1.18

◆ ecore_drm2_output_connected_get()

EAPI Eina_Bool ecore_drm2_output_connected_get ( Ecore_Drm2_Output *  output)

Get if a given output is connected.

Parameters
output
Returns
EINA_TRUE if connected, EINA_FALSE otherwise
Since
1.18

◆ ecore_drm2_output_cloned_get()

EAPI Eina_Bool ecore_drm2_output_cloned_get ( Ecore_Drm2_Output *  output)

Get if a given output is cloned.

Parameters
output
Returns
EINA_TRUE if cloned, EINA_FALSE otherwise.
Since
1.18

◆ ecore_drm2_output_connector_type_get()

EAPI unsigned int ecore_drm2_output_connector_type_get ( Ecore_Drm2_Output *  output)

Get the connector type of a given output.

Parameters
output
Returns
An unsigned integer representing the type of connector for this output
Since
1.18

◆ ecore_drm2_output_resolution_get()

EAPI void ecore_drm2_output_resolution_get ( Ecore_Drm2_Output *  output,
int *  w,
int *  h,
unsigned int *  refresh 
)

Get the current resolution of a given output.

Parameters
output
*w
*h
*refresh
Since
1.18

◆ ecore_drm2_output_possible_crtc_get()

EAPI Eina_Bool ecore_drm2_output_possible_crtc_get ( Ecore_Drm2_Output *  output,
unsigned int  crtc 
)

Get if an output can be used on a given crtc.

This function will loop the possible crtcs of an encoder to determine if a given output can be assigned to a given crtc

Parameters
output
crtc
Returns
EINA_TRUE if the output can be assigned to given crtc, EINA_FALSE otherwise
Since
1.18

References EINA_FALSE.

◆ ecore_drm2_output_gamma_set()

EAPI void ecore_drm2_output_gamma_set ( Ecore_Drm2_Output *  output,
uint16_t  size,
uint16_t *  red,
uint16_t *  green,
uint16_t *  blue 
)

Set the gamma level of an Ecore_Drm_Output.

This function will set the gamma of an Ecore_Drm2_Output

Parameters
outputThe Ecore_Drm2_Output to set the gamma level on
sizeThe gamma table size to set
redThe amount to scale the red channel
greenThe amount to scale the green channel
blueThe amount to scale the blue channel
Since
1.19

◆ ecore_drm2_output_supported_rotations_get()

EAPI int ecore_drm2_output_supported_rotations_get ( Ecore_Drm2_Output *  output)

Get the supported rotations of a given output.

Parameters
output
Returns
An integer representing possible rotations, or -1 on failure
Note
This function will only return valid values if Atomic support is enabled as it requires hardware plane support.
Since
1.19

◆ ecore_drm2_output_rotation_set()

EAPI Eina_Bool ecore_drm2_output_rotation_set ( Ecore_Drm2_Output *  output,
int  rotation 
)

Set a rotation on a given output.

Parameters
output
rotation
Returns
EINA_TRUE on success, EINA_FALSE otherwise
Note
This function will only work if Atomic support is enabled as it requires hardware plane support.
Since
1.19

References EINA_FALSE.

◆ ecore_drm2_output_user_data_set()

EAPI void ecore_drm2_output_user_data_set ( Ecore_Drm2_Output *  o,
void *  data 
)

Set the user data for the output's page flip handler.

Parameters
outputThe output to update user data for
dataThe new user data pointer
Since
1.19

◆ ecore_drm2_output_subpixel_get()

EAPI unsigned int ecore_drm2_output_subpixel_get ( const Ecore_Drm2_Output *  output)

Get the subpixel state of the output.

Parameters
outputthe output
Returns
The state value
Since
1.20

◆ ecore_drm2_fb_bo_get()

EAPI void* ecore_drm2_fb_bo_get ( Ecore_Drm2_Fb *  fb)

Get the Framebuffer's gbm buffer object.

Parameters
fbThe framebuffer to query
Returns
The gbm bo for the framebuffer
Since
1.19

◆ ecore_drm2_fb_status_handler_set()

EAPI void ecore_drm2_fb_status_handler_set ( Ecore_Drm2_Fb *  fb,
Ecore_Drm2_Fb_Status_Handler  handler,
void *  data 
)

Register a callback for buffer status updates.

When a flip completes ecore_drm2 may release a buffer. Use this callback if you need to do bookkeeping or locking on buffer release.

Additionally, an fb may be placed on scanout or removed from scanout by evas. When this happens a compositor needs to ensure the buffers aren't released back to a client while they're on scanout.

Parameters
fbThe fb to register the callback on
handlerThe function to handle the callback
dataThe user data to pass to the callback
Since
1.20