KMS

KMS — Kernel modesetting support library

Functions

const char * kmstest_pipe_name ()
int kmstest_pipe_to_index ()
const char * kmstest_plane_type_name ()
#define kmstest_port_name()
const char * kmstest_encoder_type_str ()
const char * kmstest_connector_status_str ()
const char * kmstest_connector_type_str ()
const char * kmstest_scaling_filter_str ()
const char * kmstest_dsc_output_format_str ()
void kmstest_dump_mode ()
int kmstest_get_pipe_from_crtc_id ()
void kmstest_set_vt_graphics_mode ()
void kmstest_restore_vt_mode ()
void kmstest_set_vt_text_mode ()
uint64_t igt_kms_frame_time_from_vrefresh ()
bool kmstest_force_connector ()
bool kmstest_force_connector_joiner ()
void kmstest_force_edid ()
bool kmstest_get_connector_default_mode ()
bool kmstest_get_connector_config ()
drmModePropertyBlobPtr kmstest_get_path_blob ()
bool kmstest_probe_connector_config ()
void kmstest_free_connector_config ()
void kmstest_set_connector_dpms ()
bool kmstest_get_property ()
void kmstest_unset_all_crtcs ()
int kmstest_get_crtc_idx ()
uint32_t kmstest_find_crtc_for_connector ()
uint32_t kmstest_dumb_create ()
void * kmstest_dumb_map_buffer ()
void kmstest_dumb_destroy ()
void kmstest_wait_for_pageflip ()
void kmstest_wait_for_pageflip_timeout ()
unsigned int kmstest_get_vblank ()
bool kms_has_vblank ()
void igt_display_reset_outputs ()
void igt_display_require ()
void igt_display_fini ()
void igt_display_reset ()
int igt_display_commit2 ()
int igt_display_commit ()
int igt_display_try_commit_atomic ()
void igt_display_commit_atomic ()
int igt_display_try_commit2 ()
int igt_display_drop_events ()
int igt_display_get_n_pipes ()
void igt_display_require_output ()
void igt_display_require_output_on_pipe ()
const char * igt_output_name ()
drmModeModeInfo * igt_output_get_mode ()
void igt_output_override_mode ()
int igt_output_preferred_vrefresh ()
void igt_output_set_pipe ()
igt_plane_t * igt_output_get_plane ()
igt_plane_t * igt_output_get_plane_type ()
int igt_output_count_plane_type ()
igt_plane_t * igt_output_get_plane_type_index ()
igt_output_t * igt_output_from_connector ()
void igt_output_refresh ()
drmModeModeInfo * igt_std_1024_mode_get ()
void igt_output_set_writeback_fb ()
void igt_modeset_disable_all_outputs ()
igt_plane_t * igt_pipe_get_plane_type ()
int igt_pipe_count_plane_type ()
igt_plane_t * igt_pipe_get_plane_type_index ()
bool output_is_internal_panel ()
igt_output_t * igt_get_single_output_for_pipe ()
void igt_pipe_request_out_fence ()
void igt_plane_set_fb ()
void igt_plane_set_fence_fd ()
void igt_plane_set_pipe ()
void igt_plane_set_position ()
void igt_plane_set_size ()
void igt_plane_set_rotation ()
void igt_fb_set_position ()
void igt_fb_set_size ()
const char * igt_plane_rotation_name ()
void igt_wait_for_vblank ()
void igt_wait_for_vblank_count ()
#define igt_pipe_connector_valid()
#define for_each_if()
#define for_each_output()
#define for_each_connected_output()
#define for_each_disconnected_output()
#define for_each_pipe_static()
#define for_each_pipe()
#define for_each_pipe_with_valid_output()
#define for_each_pipe_with_single_output()
#define for_each_valid_output_on_pipe()
#define for_each_plane_on_pipe()
#define for_each_connector_mode()
#define IGT_FIXED()
bool igt_plane_has_prop ()
uint64_t igt_plane_get_prop ()
#define igt_plane_is_prop_changed()
#define igt_plane_set_prop_changed()
#define igt_plane_clear_prop_changed()
#define igt_plane_set_prop_value()
bool igt_plane_try_prop_enum ()
void igt_plane_set_prop_enum ()
void igt_plane_replace_prop_blob ()
bool igt_plane_check_prop_is_mutable ()
bool igt_output_has_prop ()
uint64_t igt_output_get_prop ()
#define igt_output_is_prop_changed()
#define igt_output_set_prop_changed()
#define igt_output_clear_prop_changed()
#define igt_output_set_prop_value()
bool igt_output_try_prop_enum ()
void igt_output_set_prop_enum ()
void igt_output_replace_prop_blob ()
bool igt_pipe_obj_has_prop ()
uint64_t igt_pipe_obj_get_prop ()
uint64_t igt_pipe_get_prop ()
bool igt_pipe_has_prop ()
#define igt_pipe_obj_is_prop_changed()
#define igt_pipe_is_prop_changed()
#define igt_pipe_obj_set_prop_changed()
#define igt_pipe_set_prop_changed()
#define igt_pipe_obj_clear_prop_changed()
#define igt_pipe_clear_prop_changed()
#define igt_pipe_obj_set_prop_value()
#define igt_pipe_set_prop_value()
bool igt_pipe_obj_try_prop_enum ()
void igt_pipe_obj_set_prop_enum ()
#define igt_pipe_try_prop_enum()
#define igt_pipe_set_prop_enum()
void igt_pipe_obj_replace_prop_blob ()
#define igt_pipe_replace_prop_blob()
void igt_pipe_refresh ()
void igt_enable_connectors ()
void igt_reset_connectors ()
uint32_t kmstest_get_vbl_flag ()
const struct edid * igt_kms_get_base_edid ()
const struct edid * igt_kms_get_full_edid ()
const struct edid * igt_kms_get_base_tile_edid ()
const struct edid * igt_kms_get_alt_edid ()
const struct edid * igt_kms_get_hdmi_audio_edid ()
const struct edid * igt_kms_get_dp_audio_edid ()
const struct edid * igt_kms_get_4k_edid ()
const struct edid * igt_kms_get_3d_edid ()
const struct edid * igt_kms_get_aspect_ratio_edid ()
struct edid ** igt_kms_get_tiled_edid ()
const struct edid * igt_kms_get_custom_edid ()
struct udev_monitor * igt_watch_uevents ()
bool igt_hotplug_detected ()
bool igt_lease_change_detected ()
bool igt_connector_event_detected ()
void igt_flush_uevents ()
void igt_cleanup_uevents ()
bool igt_display_has_format_mod ()
bool igt_plane_has_format_mod ()
bool igt_global_histogram_event_detected ()
return igt_vblank_after_eq ()
return igt_vblank_after ()
void igt_parse_connector_tile_blob ()
int igt_connector_sysfs_open ()
uint32_t igt_reduce_format ()
void igt_require_pipe ()
void igt_dump_connectors_fd ()
void igt_dump_crtcs_fd ()
bool igt_override_all_active_output_modes_to_fit_bw ()
bool igt_get_i915_edp_lobf_status ()
unsigned int igt_get_output_max_bpc ()
unsigned int igt_get_pipe_current_bpc ()
void igt_assert_output_bpc_equal ()
bool igt_check_output_bpc_equal ()
int sort_drm_modes_by_clk_dsc ()
int sort_drm_modes_by_clk_asc ()
int sort_drm_modes_by_res_dsc ()
int sort_drm_modes_by_res_asc ()
void igt_sort_connector_modes ()
bool igt_max_bpc_constraint ()
int igt_get_max_dotclock ()
bool igt_bigjoiner_possible ()
bool bigjoiner_mode_found ()
bool igt_ultrajoiner_possible ()
bool ultrajoiner_mode_found ()
bool igt_has_force_joiner_debugfs ()
bool is_joiner_mode ()
bool igt_check_force_joiner_status ()
bool igt_check_bigjoiner_support ()
bool igt_parse_mode_string ()
bool intel_pipe_output_combo_valid ()
bool igt_check_output_is_dp_mst ()
int igt_get_dp_mst_connector_id ()
int get_num_scalers ()
int igt_get_current_lane_count ()
int igt_get_current_link_rate ()
int igt_get_max_link_rate ()
int igt_get_max_lane_count ()
void igt_force_link_retrain ()
void igt_force_lt_failure ()
bool igt_get_dp_link_retrain_disabled ()
bool igt_has_force_link_training_failure_debugfs ()
int igt_get_dp_pending_lt_failures ()
int igt_get_dp_pending_retrain ()
void igt_reset_link_params ()
int igt_backlight_read ()
int igt_backlight_write ()

Types and Values

Includes

#include <igt.h>

Description

This library provides support to enumerate and set modeset configurations.

There are two parts in this library: First the low level helper function which directly build on top of raw ioctls or the interfaces provided by libdrm. Those functions all have a kmstest_ prefix.

The second part is a high-level library to manage modeset configurations which abstracts away some of the low-level details like the difference between legacy and universal plane support for setting cursors or in the future the difference between legacy and atomic commit. These high-level functions have all igt_ prefixes. This part is still very much work in progress and so also lacks a bit documentation for the individual functions.

Note that this library's header pulls in the i-g-t framebuffer library as a dependency.

Functions

kmstest_pipe_name ()

const char *
kmstest_pipe_name (enum pipe pipe);

Parameters

pipe

display pipe

 

Returns

A string representing pipe , e.g. "A".


kmstest_pipe_to_index ()

int
kmstest_pipe_to_index (char pipe);

Parameters

pipe

display pipe in string format

 

Returns

Index to corresponding pipe


kmstest_plane_type_name ()

const char *
kmstest_plane_type_name (int plane_type);

Parameters

plane_type

display plane type

 

Returns

A string representing plane_type , e.g. "overlay".


kmstest_port_name()

#define kmstest_port_name(port) ((port) + 'A')

Parameters

port

display plane

 

Returns

String representing port , e.g. "A".


kmstest_encoder_type_str ()

const char *
kmstest_encoder_type_str (int type);

Parameters

type

DRM_MODE_ENCODER_* enumeration value

 

Returns

A string representing the drm encoder type .


kmstest_connector_status_str ()

const char *
kmstest_connector_status_str (int status);

Parameters

status

DRM_MODE_* connector status value

 

Returns

A string representing the drm connector status status .


kmstest_connector_type_str ()

const char *
kmstest_connector_type_str (int type);

Parameters

type

DRM_MODE_CONNECTOR_* enumeration value

 

Returns

A string representing the drm connector type .


kmstest_scaling_filter_str ()

const char *
kmstest_scaling_filter_str (int filter);

Parameters

filter

SCALING_FILTER_* filter value

 

Returns

A string representing the scaling filter filter .


kmstest_dsc_output_format_str ()

const char *
kmstest_dsc_output_format_str (int output_format);

Parameters

output_format

DSC_FORMAT_* output format value

 

Returns

A string representing the output format output format.


kmstest_dump_mode ()

void
kmstest_dump_mode (drmModeModeInfo *mode);

Prints mode to stdout in a human-readable form.

Parameters

mode

libdrm mode structure

 

kmstest_get_pipe_from_crtc_id ()

int
kmstest_get_pipe_from_crtc_id (int fd,
                               int crtc_id);

Parameters

fd

DRM fd

 

crtc_id

DRM CRTC id

 

Returns

The crtc index for the given DRM CRTC ID crtc_id . The crtc index is the equivalent of the pipe id. This value maps directly to an enum pipe value used in other helper functions. Returns 0 if the index could not be determined.


kmstest_set_vt_graphics_mode ()

void
kmstest_set_vt_graphics_mode (void);

Sets the controlling VT (if available) into graphics/raw mode and installs an igt exit handler to set the VT back to text mode on exit. Use kmstest_restore_vt_mode to restore the previous VT mode manually.

All kms tests must call this function to make sure that the fbcon doesn't interfere by e.g. blanking the screen.


kmstest_restore_vt_mode ()

void
kmstest_restore_vt_mode (void);

Restore the VT mode in use before kmstest_set_vt_graphics_mode was called.


kmstest_set_vt_text_mode ()

void
kmstest_set_vt_text_mode (void);

Sets the controlling VT (if available) into text mode. Unlikely kmstest_set_vt_graphics_mode() it do not install an igt exit handler to set the VT back to the previous mode.


igt_kms_frame_time_from_vrefresh ()

uint64_t
igt_kms_frame_time_from_vrefresh (uint32_t vrefresh);

Returns the frame time in nanoseconds for the given vrefresh rate.

Parameters

vrefresh

vertical refresh rate in 1/s units.

 

kmstest_force_connector ()

bool
kmstest_force_connector (int fd,
                         drmModeConnector *connector,
                         enum kmstest_force_connector_state state);

Force the specified state on the specified connector.

Parameters

fd

drm file descriptor

 

connector

connector

 

state

state to force on connector

 

Returns

True on success


kmstest_force_connector_joiner ()

bool
kmstest_force_connector_joiner (int drm_fd,
                                drmModeConnector *connector,
                                int joined_pipes);

Enable force joiner state on the specified connector and install exit handler for resetting

Parameters

fd

drm file descriptor

 

connector

connector

 

Returns

True on success


kmstest_force_edid ()

void
kmstest_force_edid (int drm_fd,
                    drmModeConnector *connector,
                    const struct edid *edid);

Set the EDID data on connector to edid . See also igt_kms_get_base_edid.

If edid is NULL, the forced EDID will be removed.

Parameters

drm_fd

drm file descriptor

 

connector

connector to set edid on

 

edid

An EDID data block

 

kmstest_get_connector_default_mode ()

bool
kmstest_get_connector_default_mode (int drm_fd,
                                    drmModeConnector *connector,
                                    drmModeModeInfo *mode);

Retrieves the default mode for connector and stores it in mode .

Parameters

drm_fd

DRM fd

 

connector

libdrm connector

 

mode

libdrm mode

 

Returns

True on success, false on failure


kmstest_get_connector_config ()

bool
kmstest_get_connector_config (int drm_fd,
                              uint32_t connector_id,
                              unsigned long  crtc_idx_mask,
                              struct kmstest_connector_config *config);

This tries to find a suitable configuration for the given connector and CRTC constraint and fills it into config .

Parameters

drm_fd

DRM fd

 

connector_id

DRM connector id

 

crtc_idx_mask

mask of allowed DRM CRTC indices

 

config

structure filled with the possible configuration

 

Returns

True if suitable configuration found for a given connector & CRTC, else False.


kmstest_get_path_blob ()

drmModePropertyBlobPtr
kmstest_get_path_blob (int drm_fd,
                       uint32_t connector_id);

Finds a property with the name "PATH" on the connector object.

Parameters

drm_fd

DRM fd

 

connector_id

DRM connector id

 

Returns

Pointer to the connector's PATH property if found else NULL.


kmstest_probe_connector_config ()

bool
kmstest_probe_connector_config (int drm_fd,
                                uint32_t connector_id,
                                unsigned long  crtc_idx_mask,
                                struct kmstest_connector_config *config);

This tries to find a suitable configuration for the given connector and CRTC constraint and fills it into config , fully probing the connector in the process.

Parameters

drm_fd

DRM fd

 

connector_id

DRM connector id

 

crtc_idx_mask

mask of allowed DRM CRTC indices

 

config

structure filled with the possible configuration

 

Returns

True if suitable configuration found for a given connector & CRTC, else False.


kmstest_free_connector_config ()

void
kmstest_free_connector_config (struct kmstest_connector_config *config);

Free any resources in config allocated in kmstest_get_connector_config().

Parameters

config

connector configuration structure

 

kmstest_set_connector_dpms ()

void
kmstest_set_connector_dpms (int fd,
                            drmModeConnector *connector,
                            int mode);

This function sets the DPMS setting of connector to mode .

Parameters

fd

DRM fd

 

connector

libdrm connector

 

mode

DRM DPMS value

 

kmstest_get_property ()

bool
kmstest_get_property (int drm_fd,
                      uint32_t object_id,
                      uint32_t object_type,
                      const char *name,
                      uint32_t *prop_id,
                      uint64_t *value,
                      drmModePropertyPtr *prop);

Finds a property with the given name on the given object.

Parameters

drm_fd

drm file descriptor

 

object_id

object whose properties we're going to get

 

object_type

type of obj_id (DRM_MODE_OBJECT_*)

 

name

name of the property we're going to get

 

prop_id

if not NULL, returns the property id

 

value

if not NULL, returns the property value

 

prop

if not NULL, returns the property, and the caller will have to free it manually.

 

Returns

True in case we found something.


kmstest_unset_all_crtcs ()

void
kmstest_unset_all_crtcs (int drm_fd,
                         drmModeResPtr resources);

Disables all the screens.

Parameters

drm_fd

the DRM fd

 

resources

libdrm resources pointer

 

kmstest_get_crtc_idx ()

int
kmstest_get_crtc_idx (drmModeRes *res,
                      uint32_t crtc_id);

Get the CRTC index based on its ID. This is useful since a few places of libdrm deal with CRTC masks.

Parameters

res

the libdrm resources

 

crtc_id

the CRTC id

 

Returns

CRTC index for a given crtc_id


kmstest_find_crtc_for_connector ()

uint32_t
kmstest_find_crtc_for_connector (int fd,
                                 drmModeRes *res,
                                 drmModeConnector *connector,
                                 uint32_t crtc_blacklist_idx_mask);

Parameters

fd

DRM fd

 

res

libdrm resources pointer

 

connector

libdrm connector pointer

 

crtc_blacklist_idx_mask

a mask of CRTC indexes that we can't return

 

Returns

The CRTC ID for a CRTC that fits the connector, otherwise it asserts false and never returns. The blacklist mask can be used in case you have CRTCs that are already in use by other connectors.


kmstest_dumb_create ()

uint32_t
kmstest_dumb_create (int fd,
                     int width,
                     int height,
                     int bpp,
                     unsigned *stride,
                     uint64_t *size);

This wraps the CREATE_DUMB ioctl, which allocates a new dumb buffer object for the specified dimensions.

Parameters

fd

open drm file descriptor

 

width

width of the buffer in pixels

 

height

height of the buffer in pixels

 

bpp

bytes per pixel of the buffer

 

stride

Pointer which receives the dumb bo's stride, can be NULL.

 

size

Pointer which receives the dumb bo's size, can be NULL.

 

Returns

The file-private handle of the created buffer object


kmstest_dumb_map_buffer ()

void *
kmstest_dumb_map_buffer (int fd,
                         uint32_t handle,
                         uint64_t size,
                         unsigned  prot);

Parameters

fd

Opened drm file descriptor

 

handle

Offset in the file referred to by fd

 

size

Length of the mapping, must be greater than 0

 

prot

Describes the memory protection of the mapping

 

Returns

A pointer representing the start of the virtual mapping Caller of this function should munmap the pointer returned, after its usage.


kmstest_dumb_destroy ()

void
kmstest_dumb_destroy (int fd,
                      uint32_t handle);

Parameters

fd

Opened drm file descriptor

 

handle

Offset in the file referred to by fd

 

kmstest_wait_for_pageflip ()

void
kmstest_wait_for_pageflip (int fd);

Blocks until pageflip is completed using a 50 ms timeout.

Parameters

fd

Opened drm file descriptor

 

kmstest_wait_for_pageflip_timeout ()

void
kmstest_wait_for_pageflip_timeout (int fd,
                                   uint64_t timeout_us);

Blocks until pageflip is completed

Parameters

fd

Opened drm file descriptor

 

timeout_us

timeout used for waiting

 

kmstest_get_vblank ()

unsigned int
kmstest_get_vblank (int fd,
                    int pipe,
                    unsigned int flags);

Blocks or request a signal when a specified vblank event occurs

Returns 0 on success or non-zero unsigned integer otherwise

Parameters

fd

Opened drm file descriptor

 

pipe

Display pipe

 

flags

Flags passed to drm_ioctl_wait_vblank

 

kms_has_vblank ()

bool
kms_has_vblank (int fd);

Get the VBlank errno after an attempt to call drmWaitVBlank(). This function is useful for checking if a driver has support or not for VBlank.

Parameters

fd

DRM fd

 

Returns

True if target driver has VBlank support, otherwise return false.


igt_display_reset_outputs ()

void
igt_display_reset_outputs (igt_display_t *display);

Initialize display outputs with their connectors and pipes. This function clears any previously allocated outputs.

Parameters

display

a pointer to an initialized igt_display_t structure

 

igt_display_require ()

void
igt_display_require (igt_display_t *display,
                     int drm_fd);

Initialize display and allocate the various resources required. Use igt_display_fini to release the resources when they are no longer required.

This function automatically skips if the kernel driver doesn't support any CRTC or outputs.

Parameters

display

a pointer to an igt_display_t structure

 

drm_fd

a drm file descriptor

 

igt_display_fini ()

void
igt_display_fini (igt_display_t *display);

Release any resources associated with display . This does not free display itself.

Parameters

display

a pointer to an igt_display_t structure

 

igt_display_reset ()

void
igt_display_reset (igt_display_t *display);

Reset basic pipes, connectors and planes on display back to default values. In particular, the following properties will be reset:

For outputs:

For pipes:

For planes:

Parameters

display

a pointer to an igt_display_t structure

 

igt_display_commit2 ()

int
igt_display_commit2 (igt_display_t *display,
                     enum igt_commit_style s);

Commits framebuffer and positioning changes to all planes of each display pipe, using a specific API to perform the programming. This function should be used to exercise a specific driver programming API; igt_display_commit should be used instead if the API used is unimportant to the test being run.

This function should only be used to commit changes that are expected to succeed, since any failure during the commit process will cause the IGT subtest to fail. To commit changes that are expected to fail, use igt_display_try_commit2 instead.

Parameters

display

DRM device handle

 

s

Commit style

 

Returns

0 upon success. This function will never return upon failure since igt_fail() at lower levels will longjmp out of it.


igt_display_commit ()

int
igt_display_commit (igt_display_t *display);

Commits framebuffer and positioning changes to all planes of each display pipe.

Parameters

display

DRM device handle

 

Returns

0 upon success. This function will never return upon failure since igt_fail() at lower levels will longjmp out of it.


igt_display_try_commit_atomic ()

int
igt_display_try_commit_atomic (igt_display_t *display,
                               uint32_t flags,
                               void *user_data);

This function is similar to igt_display_try_commit2, but is used when you want to pass different flags to the actual commit.

Useful flags can be DRM_MODE_ATOMIC_ALLOW_MODESET, DRM_MODE_ATOMIC_NONBLOCK, DRM_MODE_PAGE_FLIP_EVENT, or DRM_MODE_ATOMIC_TEST_ONLY.

user_data is returned in the event if you pass DRM_MODE_PAGE_FLIP_EVENT to flags .

This function will return an error if commit fails, instead of aborting the test.

Parameters

display

igt_display_t to commit.

 

flags

Flags passed to drmModeAtomicCommit.

 

user_data

User defined pointer passed to drmModeAtomicCommit.

 

igt_display_commit_atomic ()

void
igt_display_commit_atomic (igt_display_t *display,
                           uint32_t flags,
                           void *user_data);

This function is similar to igt_display_commit2, but is used when you want to pass different flags to the actual commit.

Useful flags can be DRM_MODE_ATOMIC_ALLOW_MODESET, DRM_MODE_ATOMIC_NONBLOCK, DRM_MODE_PAGE_FLIP_EVENT, or DRM_MODE_ATOMIC_TEST_ONLY.

user_data is returned in the event if you pass DRM_MODE_PAGE_FLIP_EVENT to flags .

This function will abort the test if commit fails.

Parameters

display

igt_display_t to commit.

 

flags

Flags passed to drmModeAtomicCommit.

 

user_data

User defined pointer passed to drmModeAtomicCommit.

 

igt_display_try_commit2 ()

int
igt_display_try_commit2 (igt_display_t *display,
                         enum igt_commit_style s);

Attempts to commit framebuffer and positioning changes to all planes of each display pipe. This function should be used to commit changes that are expected to fail, so that the error code can be checked for correctness. For changes that are expected to succeed, use igt_display_commit instead.

Note that in non-atomic commit styles, no display programming will be performed after the first failure is encountered, so only some of the operations requested by a test may have been completed. Tests that catch errors returned by this function should take care to restore the display to a sane state after a failure is detected.

Parameters

display

DRM device handle

 

s

Commit style

 

Returns

0 upon success, otherwise the error code of the first error encountered.


igt_display_drop_events ()

int
igt_display_drop_events (igt_display_t *display);

Nonblockingly reads all current events and drops them, for highest reliability, call igt_display_commit2() first to flush all outstanding events.

This will be called on the first commit after igt_display_reset() too, to make sure any stale events are flushed.

Parameters

display

DRM device handle

 

Returns

Number of dropped events.


igt_display_get_n_pipes ()

int
igt_display_get_n_pipes (igt_display_t *display);

Parameters

display

A pointer to an igt_display_t structure

 

Returns

Total number of pipes for the given display


igt_display_require_output ()

void
igt_display_require_output (igt_display_t *display);

Checks whether there's a valid pipe /output combination for the given display Skips test if a valid combination of pipe and output is not found

Parameters

display

A pointer to an igt_display_t structure

 

igt_display_require_output_on_pipe ()

void
igt_display_require_output_on_pipe (igt_display_t *display,
                                    enum pipe pipe);

Checks whether there's a valid pipe /output combination for the given display and pipe Skips test if a valid pipe is not found

Parameters

display

A pointer to an igt_display_t structure

 

pipe

Display pipe

 

igt_output_name ()

const char *
igt_output_name (igt_output_t *output);

Parameters

output

Target output

 

Returns

String representing a connector's name, e.g. "DP-1".


igt_output_get_mode ()

drmModeModeInfo *
igt_output_get_mode (igt_output_t *output);

Get the current mode of the given connector

Parameters

output

Target output

 

Returns

A drmModeModeInfo struct representing the current mode


igt_output_override_mode ()

void
igt_output_override_mode (igt_output_t *output,
                          const drmModeModeInfo *mode);

Overrides the output's mode with mode , so that it is used instead of the mode obtained with get connectors. Note that the mode is used without checking if the output supports it, so this might lead to unexpected results.

Parameters

output

Output of which the mode will be overridden

 

mode

New mode, or NULL to disable override.

 

igt_output_preferred_vrefresh ()

int
igt_output_preferred_vrefresh (igt_output_t *output);

Parameters

output

Output whose preferred vrefresh is queried

 

Returns

The vertical refresh rate of output 's preferred mode. If the output reports no modes return 60Hz as a fallback.


igt_output_set_pipe ()

void
igt_output_set_pipe (igt_output_t *output,
                     enum pipe pipe);

This function sets a pipe to a specific output connector by setting the CRTC_ID property of the pipe . The pipe is only activated for all pipes except PIPE_NONE.

Parameters

output

Target output for which the pipe is being set to

 

pipe

Display pipe to set to

 

igt_output_get_plane ()

igt_plane_t *
igt_output_get_plane (igt_output_t *output,
                      int plane_idx);

Finds a driving pipe for the given output otherwise and gets the valid plane associated with that pipe for the given plane_idx . This function will terminate the execution if driving pipe is not for a given output .

Parameters

output

Target output

 

plane_idx

Plane index

 

Returns

A igt_plane_t structure that matches the requested plane index


igt_output_get_plane_type ()

igt_plane_t *
igt_output_get_plane_type (igt_output_t *output,
                           int plane_type);

Finds a valid plane type for the given output otherwise the test is skipped if the right combination of output /plane_type is not found

Parameters

output

Target output

 

plane_type

Cursor, primary or an overlay plane

 

Returns

A igt_plane_t structure that matches the requested plane type


igt_output_count_plane_type ()

int
igt_output_count_plane_type (igt_output_t *output,
                             int plane_type);

Counts the number of planes of type plane_type for the provided output .

Parameters

output

Target output

 

plane_type

Cursor, primary or an overlay plane

 

Returns

The number of planes that match the requested plane type


igt_output_get_plane_type_index ()

igt_plane_t *
igt_output_get_plane_type_index (igt_output_t *output,
                                 int plane_type,
                                 int index);

Get the index th plane of type plane_type for the provided output .

Parameters

output

Target output

 

plane_type

Cursor, primary or an overlay plane

 

index

the index of the plane among planes of the same type

 

Returns

The index th plane that matches the requested plane type


igt_output_from_connector ()

igt_output_t *
igt_output_from_connector (igt_display_t *display,
                           drmModeConnector *connector);

Finds the output corresponding to the given connector

Parameters

display

a pointer to an igt_display_t structure

 

connector

a pointer to a drmModeConnector

 

Returns

A igt_output_t structure configured to use the connector, or NULL if none was found


igt_output_refresh ()

void
igt_output_refresh (igt_output_t *output);

This function sets the given output to a valid default pipe

Parameters

output

Target output

 

igt_std_1024_mode_get ()

drmModeModeInfo *
igt_std_1024_mode_get (int vrefresh);

This function will create a standard drm mode with a given vrefresh

Parameters

vrefresh

Required refresh rate for 1024 mode

 

Returns

Standard 1024vrefresh mode.


igt_output_set_writeback_fb ()

void
igt_output_set_writeback_fb (igt_output_t *output,
                             struct igt_fb *fb);

This function sets the given fb to be used as the target framebuffer for the writeback engine at the next atomic commit. It will also request a writeback out fence that will contain the fd number of the out fence created by KMS if the given fb is valid.

Parameters

output

Target output

 

fb

Target framebuffer

 

igt_modeset_disable_all_outputs ()

void
igt_modeset_disable_all_outputs (igt_display_t *display);

Modeset to disable all output

We need to do a modeset disabling all output to get the next HPD event on TypeC port

Parameters

diplay

igt display structure

 

igt_pipe_get_plane_type ()

igt_plane_t *
igt_pipe_get_plane_type (igt_pipe_t *pipe,
                         int plane_type);

Finds a valid plane type for the given pipe otherwise it skips the test if the right combination of pipe /plane_type is not found

Parameters

pipe

Target pipe

 

plane_type

Cursor, primary or an overlay plane

 

Returns

A igt_plane_t structure that matches the requested plane type


igt_pipe_count_plane_type ()

int
igt_pipe_count_plane_type (igt_pipe_t *pipe,
                           int plane_type);

Counts the number of planes of type plane_type for the provided pipe .

Parameters

pipe

Target pipe

 

plane_type

Cursor, primary or an overlay plane

 

Returns

The number of planes that match the requested plane type


igt_pipe_get_plane_type_index ()

igt_plane_t *
igt_pipe_get_plane_type_index (igt_pipe_t *pipe,
                               int plane_type,
                               int index);

Get the index th plane of type plane_type for the provided pipe .

Parameters

pipe

Target pipe

 

plane_type

Cursor, primary or an overlay plane

 

index

the index of the plane among planes of the same type

 

Returns

The index th plane that matches the requested plane type


output_is_internal_panel ()

bool
output_is_internal_panel (igt_output_t *output);

Parameters

output

Target output

 

Returns

True if the given output type is internal else False.


igt_get_single_output_for_pipe ()

igt_output_t *
igt_get_single_output_for_pipe (igt_display_t *display,
                                enum pipe pipe);

Get a compatible output for a pipe.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

The pipe for which an igt_output_t must be returned.

 

Returns

A compatible output for a given pipe, or NULL.


igt_pipe_request_out_fence ()

void
igt_pipe_request_out_fence (igt_pipe_t *pipe);

Marks this pipe for requesting an out fence at the next atomic commit will contain the fd number of the out fence created by KMS.

Parameters

pipe

pipe which out fence will be requested for

 

igt_plane_set_fb ()

void
igt_plane_set_fb (igt_plane_t *plane,
                  struct igt_fb *fb);

Pairs a given framebuffer to a plane

This function also sets a default size and position for the framebuffer to avoid crashes on applications that ignore to set these.

Parameters

plane

Plane

 

fb

Framebuffer pointer

 

igt_plane_set_fence_fd ()

void
igt_plane_set_fence_fd (igt_plane_t *plane,
                        int fence_fd);

This function sets a fence fd to enable a commit to wait for some event to occur before completing.

Parameters

plane

plane

 

fence_fd

fence fd, disable fence_fd by setting it to -1

 

igt_plane_set_pipe ()

void
igt_plane_set_pipe (igt_plane_t *plane,
                    igt_pipe_t *pipe);

Parameters

plane

Target plane pointer

 

pipe

The pipe to assign the plane to

 

igt_plane_set_position ()

void
igt_plane_set_position (igt_plane_t *plane,
                        int x,
                        int y);

This function sets a new (x,y) position for the given plane. New position will be committed at plane commit time via drmModeSetPlane().

Parameters

plane

Plane pointer for which position is to be set

 

x

X coordinate

 

y

Y coordinate

 

igt_plane_set_size ()

void
igt_plane_set_size (igt_plane_t *plane,
                    int w,
                    int h);

This function sets width and height for requested plane. New size will be committed at plane commit time via drmModeSetPlane().

Parameters

plane

plane pointer for which size to be set

 

w

width

 

h

height

 

igt_plane_set_rotation ()

void
igt_plane_set_rotation (igt_plane_t *plane,
                        igt_rotation_t rotation);

This function sets a new rotation for the requested plane . New rotation will be committed at plane commit time via drmModeSetPlane().

Parameters

plane

Plane pointer for which rotation is to be set

 

rotation

Plane rotation value (0, 90, 180, 270)

 

igt_fb_set_position ()

void
igt_fb_set_position (struct igt_fb *fb,
                     igt_plane_t *plane,
                     uint32_t x,
                     uint32_t y);

This function sets position for requested framebuffer as src to plane. New position will be committed at plane commit time via drmModeSetPlane().

Parameters

fb

framebuffer pointer

 

plane

plane

 

x

X position

 

y

Y position

 

igt_fb_set_size ()

void
igt_fb_set_size (struct igt_fb *fb,
                 igt_plane_t *plane,
                 uint32_t w,
                 uint32_t h);

This function sets fetch rect size from requested framebuffer as src to plane. New size will be committed at plane commit time via drmModeSetPlane().

Parameters

fb

framebuffer pointer

 

plane

plane

 

w

width

 

h

height

 

igt_plane_rotation_name ()

const char *
igt_plane_rotation_name (igt_rotation_t rotation);

Parameters

rotation

Plane rotation value (0, 90, 180, 270)

 

Returns

Plane rotation value as a string


igt_wait_for_vblank ()

void
igt_wait_for_vblank (int drm_fd,
                     int crtc_offset);

See igt_wait_for_vblank_count for more details

Waits for 1 vertical blank intervals

Parameters

drm_fd

A drm file descriptor

 

crtc_offset

offset of a crtc in drmModeRes.crtcs

 

igt_wait_for_vblank_count ()

void
igt_wait_for_vblank_count (int drm_fd,
                           int crtc_offset,
                           int count);

Waits for a given number of vertical blank intervals

In DRM, 'Pipe', as understood by DRM_IOCTL_WAIT_VBLANK, is actually an offset of crtc in drmModeRes.crtcs and it has nothing to do with a hardware concept of a pipe. They can match but don't have to in case of DRM lease or non-contiguous pipes.

To make thing clear we are calling DRM_IOCTL_WAIT_VBLANK's 'pipe' a crtc_offset.

Parameters

drm_fd

A drm file descriptor

 

crtc_offset

offset of the crtc in drmModeRes.crtcs

 

count

Number of vblanks to wait on

 

igt_pipe_connector_valid()

#define             igt_pipe_connector_valid(pipe, output)

Checks whether the given pipe and output can be used together.

Parameters

pipe

pipe to check.

 

output

igt_output_t to check.

 

for_each_if()

#define for_each_if(condition) if (!(condition)) {} else

for_each_output()

#define             for_each_output(display, output)

This for loop iterates over all outputs.

Parameters

display

a pointer to an igt_display_t structure

 

output

The output to iterate.

 

for_each_connected_output()

#define             for_each_connected_output(display, output)

This for loop iterates over all connected outputs.

Parameters

display

a pointer to an igt_display_t structure

 

output

The output to iterate.

 

for_each_disconnected_output()

#define             for_each_disconnected_output(display, output)

This for loop iterates over all disconnected outputs.

Parameters

display

a pointer to an igt_display_t structure

 

output

The output to iterate.

 

for_each_pipe_static()

#define             for_each_pipe_static(pipe)

This for loop iterates over all pipes supported by IGT libraries.

This should be used to enumerate per-pipe subtests since it has no runtime depencies.

Parameters

pipe

The pipe to iterate.

 

for_each_pipe()

#define             for_each_pipe(display, pipe)

This for loop iterates over all pipes.

Note that this cannot be used to enumerate per-pipe subtest names since it depends upon runtime probing of the actual kms driver that is being tested. Use for_each_pipe_static instead.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

The pipe to iterate.

 

for_each_pipe_with_valid_output()

#define             for_each_pipe_with_valid_output(display, pipe, output)

This for loop is called over all connected outputs. This function will try every combination of pipe and output .

If you only need to test a single output for each pipe, use for_each_pipe_with_single_output(), if you only need an output for a single pipe, use igt_get_single_output_for_pipe().

Parameters

display

a pointer to an igt_display_t structure

 

pipe

The pipe for which this pipe / output combination is valid.

 

output

The output for which this pipe / output combination is valid.

 

for_each_pipe_with_single_output()

#define             for_each_pipe_with_single_output(display, pipe, output)

This loop is called over all pipes, and will try to find a compatible output for each pipe. Unlike for_each_pipe_with_valid_output(), this function will be called at most once for each pipe.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

The pipe for which this pipe / output combination is valid.

 

output

The output for which this pipe / output combination is valid.

 

for_each_valid_output_on_pipe()

#define             for_each_valid_output_on_pipe(display, pipe, output)

This for loop is called over all connected output that can be used on this pipe . If there are no valid outputs for this pipe, nothing happens.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

Pipe to enumerate valid outputs over

 

output

The enumerated output.

 

for_each_plane_on_pipe()

#define             for_each_plane_on_pipe(display, pipe, plane)

This for loop iterates over all planes associated to the given pipe . If there are no valid planes for this pipe, nothing happens.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

Pipe to enumerate valid outputs over

 

plane

The enumerated plane.

 

for_each_connector_mode()

#define             for_each_connector_mode(output)

This for loop iterates over all modes associated to the given output . If there are no mode available for this output, nothing happens.

Parameters

output

Output to enumerate available modes.

 

IGT_FIXED()

#define IGT_FIXED(i,f) ((i) << 16 | (f))

igt_plane_has_prop ()

bool
igt_plane_has_prop (igt_plane_t *plane,
                    enum igt_atomic_plane_properties prop);

Check whether plane supports a given property.

Parameters

plane

Plane to check.

 

prop

Property to check.

 

Returns

True if the property is supported, otherwise false.


igt_plane_get_prop ()

uint64_t
igt_plane_get_prop (igt_plane_t *plane,
                    enum igt_atomic_plane_properties prop);

Return current value on a plane for a given property.

Parameters

plane

Target plane.

 

prop

Property to check.

 

Returns

The value the property is set to, if this is a blob, the blob id is returned. This can be passed to drmModeGetPropertyBlob() to get the contents of the blob.


igt_plane_is_prop_changed()

#define             igt_plane_is_prop_changed(plane, prop)

Check whether a given prop changed for the plane .

Parameters

plane

Plane to check.

 

prop

Property to check.

 

igt_plane_set_prop_changed()

#define             igt_plane_set_prop_changed(plane, prop)

Sets the given prop for the plane .

Parameters

plane

Plane to check.

 

prop

Property to check.

 

igt_plane_clear_prop_changed()

#define             igt_plane_clear_prop_changed(plane, prop)

Clears the given prop for the plane .

Parameters

plane

Plane to check.

 

prop

Property to check.

 

igt_plane_set_prop_value()

#define             igt_plane_set_prop_value(plane, prop, value)

Sets the given prop with the value for the plane .

Parameters

plane

Plane to check.

 

prop

Property to check.

 

value

Value to set.

 

igt_plane_try_prop_enum ()

bool
igt_plane_try_prop_enum (igt_plane_t *plane,
                         enum igt_atomic_plane_properties prop,
                         const char *val);

Parameters

plane

Target plane.

 

prop

Property to check.

 

val

Value to set.

 

Returns

False if the given plane doesn't have the enum prop or failed to set the enum property val else True.


igt_plane_set_prop_enum ()

void
igt_plane_set_prop_enum (igt_plane_t *plane,
                         enum igt_atomic_plane_properties prop,
                         const char *val);

This function tries to set given enum property prop value val to the given plane , and terminate the execution if its failed.

Parameters

plane

Target plane.

 

prop

Property to check.

 

val

Value to set.

 

igt_plane_replace_prop_blob ()

void
igt_plane_replace_prop_blob (igt_plane_t *plane,
                             enum igt_atomic_plane_properties prop,
                             const void *ptr,
                             size_t length);

This function will destroy the old property blob for the given property, and will create a new property blob with the values passed to this function.

The new property blob will be committed when you call igt_display_commit(), igt_display_commit2() or igt_display_commit_atomic().

Parameters

plane

plane to set property on.

 

prop

property for which the blob will be replaced.

 

ptr

Pointer to contents for the property.

 

length

Length of contents.

 

igt_plane_check_prop_is_mutable ()

bool
igt_plane_check_prop_is_mutable (igt_plane_t *plane,
                                 enum igt_atomic_plane_properties igt_prop);

Check if a plane supports a given property and if this property is mutable.

Returns true if the plane has the mutable property. False if the property is not support or it's immutable.

Parameters

plane

Target plane.

 

prop

Property to check.

 

igt_output_has_prop ()

bool
igt_output_has_prop (igt_output_t *output,
                     enum igt_atomic_connector_properties prop);

Check whether output supports a given property.

Parameters

output

Output to check.

 

prop

Property to check.

 

Returns

True if the property is supported, otherwise false.


igt_output_get_prop ()

uint64_t
igt_output_get_prop (igt_output_t *output,
                     enum igt_atomic_connector_properties prop);

Return current value on an output for a given property.

Parameters

output

Target output.

 

prop

Property to return.

 

Returns

The value the property is set to, if this is a blob, the blob id is returned. This can be passed to drmModeGetPropertyBlob() to get the contents of the blob.


igt_output_is_prop_changed()

#define             igt_output_is_prop_changed(output, prop)

Check whether a given prop changed for the Output .

Parameters

output

Output to check.

 

prop

Property to check.

 

igt_output_set_prop_changed()

#define             igt_output_set_prop_changed(output, prop)

Sets the given prop for the output .

Parameters

output

Output to check.

 

prop

Property to check.

 

igt_output_clear_prop_changed()

#define             igt_output_clear_prop_changed(output, prop)

Clears the given prop for the output .

Parameters

output

Output to check.

 

prop

Property to check.

 

igt_output_set_prop_value()

#define             igt_output_set_prop_value(output, prop, value)

Sets the given prop with the value for the output .

Parameters

output

Output to check.

 

prop

Property to check.

 

value

Value to set.

 

igt_output_try_prop_enum ()

bool
igt_output_try_prop_enum (igt_output_t *output,
                          enum igt_atomic_connector_properties prop,
                          const char *val);

Parameters

output

Target output.

 

prop

Property to check.

 

val

Value to set.

 

Returns

False if the given output doesn't have the enum prop or failed to set the enum property val else True.


igt_output_set_prop_enum ()

void
igt_output_set_prop_enum (igt_output_t *output,
                          enum igt_atomic_connector_properties prop,
                          const char *val);

This function tries to set given enum property prop value val to the given output , and terminate the execution if its failed.

Parameters

output

Target output.

 

prop

Property to check.

 

val

Value to set.

 

igt_output_replace_prop_blob ()

void
igt_output_replace_prop_blob (igt_output_t *output,
                              enum igt_atomic_connector_properties prop,
                              const void *ptr,
                              size_t length);

This function will destroy the old property blob for the given property, and will create a new property blob with the values passed to this function.

The new property blob will be committed when you call igt_display_commit(), igt_display_commit2() or igt_display_commit_atomic().

Parameters

output

output to set property on.

 

prop

property for which the blob will be replaced.

 

ptr

Pointer to contents for the property.

 

length

Length of contents.

 

igt_pipe_obj_has_prop ()

bool
igt_pipe_obj_has_prop (igt_pipe_t *pipe,
                       enum igt_atomic_crtc_properties prop);

Check whether pipe supports a given property.

Parameters

pipe

Pipe to check.

 

prop

Property to check.

 

Returns

True if the property is supported, otherwise false.


igt_pipe_obj_get_prop ()

uint64_t
igt_pipe_obj_get_prop (igt_pipe_t *pipe,
                       enum igt_atomic_crtc_properties prop);

Return current value on a pipe for a given property.

Parameters

pipe

Target pipe.

 

prop

Property to return.

 

Returns

The value the property is set to, if this is a blob, the blob id is returned. This can be passed to drmModeGetPropertyBlob() to get the contents of the blob.


igt_pipe_get_prop ()

uint64_t
igt_pipe_get_prop (igt_display_t *display,
                   enum pipe pipe,
                   enum igt_atomic_crtc_properties prop);

Return current value on a pipe for a given property.

Parameters

display

Pointer to display.

 

pipe

Target pipe.

 

prop

Property to return.

 

Returns

The value the property is set to, if this is a blob, the blob id is returned. This can be passed to drmModeGetPropertyBlob() to get the contents of the blob.


igt_pipe_has_prop ()

bool
igt_pipe_has_prop (igt_display_t *display,
                   enum pipe pipe,
                   enum igt_atomic_crtc_properties prop);

Check whether pipe supports a given property.

Parameters

display

Pointer to display.

 

pipe

Pipe to check.

 

prop

Property to check.

 

Returns

True if the property is supported, otherwise false.


igt_pipe_obj_is_prop_changed()

#define             igt_pipe_obj_is_prop_changed(pipe_obj, prop)

Check whether a given prop changed for the pipe_obj .

Parameters

pipe_obj

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_is_prop_changed()

#define             igt_pipe_is_prop_changed(display, pipe, prop)

Check whether a given prop changed for the pipe .

Parameters

pipe

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_obj_set_prop_changed()

#define             igt_pipe_obj_set_prop_changed(pipe_obj, prop)

Sets the given prop for the pipe_obj .

Parameters

pipe_obj

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_set_prop_changed()

#define             igt_pipe_set_prop_changed(display, pipe, prop)

Sets the given prop for the pipe .

Parameters

pipe

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_obj_clear_prop_changed()

#define             igt_pipe_obj_clear_prop_changed(pipe_obj, prop)

Clears the given prop for the pipe_obj .

Parameters

pipe_obj

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_clear_prop_changed()

#define             igt_pipe_clear_prop_changed(display, pipe, prop)

Clears the given prop for the pipe .

Parameters

pipe

Pipe object to check.

 

prop

Property to check.

 

igt_pipe_obj_set_prop_value()

#define             igt_pipe_obj_set_prop_value(pipe_obj, prop, value)

Sets the given prop with the value for the pipe_obj .

Parameters

pipe_obj

Pipe object to check.

 

prop

Property to check.

 

value

Value to set.

 

igt_pipe_set_prop_value()

#define             igt_pipe_set_prop_value(display, pipe, prop, value)

Sets the given prop with the value for the pipe .

Parameters

pipe

Pipe to check.

 

prop

Property to check.

 

value

Value to set.

 

igt_pipe_obj_try_prop_enum ()

bool
igt_pipe_obj_try_prop_enum (igt_pipe_t *pipe,
                            enum igt_atomic_crtc_properties prop,
                            const char *val);

Parameters

pipe_obj

Target pipe object.

 

prop

Property to check.

 

val

Value to set.

 

Returns

False if the given pipe_obj doesn't have the enum prop or failed to set the enum property val else True.


igt_pipe_obj_set_prop_enum ()

void
igt_pipe_obj_set_prop_enum (igt_pipe_t *pipe,
                            enum igt_atomic_crtc_properties prop,
                            const char *val);

This function tries to set given enum property prop value val to the given pipe_obj , and terminate the execution if its failed.

Parameters

pipe_obj

Target pipe object.

 

prop

Property to check.

 

val

Value to set.

 

igt_pipe_try_prop_enum()

#define             igt_pipe_try_prop_enum(display, pipe, prop, val)

Parameters

pipe

Target pipe.

 

prop

Property to check.

 

val

Value to set.

 

Returns

False if the given pipe doesn't have the enum prop or failed to set the enum property val else True.


igt_pipe_set_prop_enum()

#define             igt_pipe_set_prop_enum(display, pipe, prop, val)

This function tries to set given enum property prop value val to the given pipe , and terminate the execution if its failed.

Parameters

pipe

Target pipe.

 

prop

Property to check.

 

val

Value to set.

 

igt_pipe_obj_replace_prop_blob ()

void
igt_pipe_obj_replace_prop_blob (igt_pipe_t *pipe,
                                enum igt_atomic_crtc_properties prop,
                                const void *ptr,
                                size_t length);

This function will destroy the old property blob for the given property, and will create a new property blob with the values passed to this function.

The new property blob will be committed when you call igt_display_commit(), igt_display_commit2() or igt_display_commit_atomic().

Please use igt_output_override_mode() if you want to set IGT_CRTC_MODE_ID, it works better with legacy commit.

Parameters

pipe

pipe to set property on.

 

prop

property for which the blob will be replaced.

 

ptr

Pointer to contents for the property.

 

length

Length of contents.

 

igt_pipe_replace_prop_blob()

#define             igt_pipe_replace_prop_blob(display, pipe, prop, ptr, length)

This function will destroy the old property blob for the given property, and will create a new property blob with the values passed to this function.

The new property blob will be committed when you call igt_display_commit(), igt_display_commit2() or igt_display_commit_atomic().

Please use igt_output_override_mode() if you want to set IGT_CRTC_MODE_ID, it works better with legacy commit.

Parameters

pipe

pipe to set property on.

 

prop

property for which the blob will be replaced.

 

ptr

Pointer to contents for the property.

 

length

Length of contents.

 

igt_pipe_refresh ()

void
igt_pipe_refresh (igt_display_t *display,
                  enum pipe pipe,
                  bool force);

Requests the pipe to be part of the state on next update. This is useful when state may have been out of sync after a fork, or we just want to be sure the pipe is included in the next commit.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

Pipe to refresh

 

force

Should be set to true if mode_blob is no longer considered to be valid, for example after doing an atomic commit during fork or closing display fd.

 

igt_enable_connectors ()

void
igt_enable_connectors (int drm_fd);

Force connectors to be enabled where this is known to work well. Use igt_reset_connectors to revert the changes.

An exit handler is installed to ensure connectors are reset when the test exits.

Parameters

drm_fd

A drm file descriptor

 

igt_reset_connectors ()

void
igt_reset_connectors (void);

Remove any forced state from the connectors.


kmstest_get_vbl_flag ()

uint32_t
kmstest_get_vbl_flag (int crtc_offset);

Convert an offset of an crtc in drmModeRes.crtcs into flag representation expected by DRM_IOCTL_WAIT_VBLANK. See igt_wait_for_vblank_count for details

Parameters

crtc_offset

CRTC offset to convert into pipe flag representation.

 

igt_kms_get_base_edid ()

const struct edid *
igt_kms_get_base_edid (void);

Get the base edid block, which includes the following modes:

  • 1920x1080 60Hz

  • 1280x720 60Hz

  • 1024x768 60Hz

  • 800x600 60Hz

  • 640x480 60Hz

Returns

A basic edid block


igt_kms_get_full_edid ()

const struct edid *
igt_kms_get_full_edid (void);

Get the full edid block, which includes the following modes:

  • 2288x1287 144Hz

  • 1920x1080 60Hz

  • 1280x720 60Hz

  • 1024x768 60Hz

  • 800x600 60Hz

  • 640x480 60Hz

Returns

A full edid block


igt_kms_get_base_tile_edid ()

const struct edid *
igt_kms_get_base_tile_edid (void);

Get the base tile edid block, which includes the following modes:

  • 1920x2160 60Hz

  • 1920x1080 60Hz

  • 1280x720 60Hz

  • 1024x768 60Hz

  • 800x600 60Hz

  • 640x480 60Hz

Returns

A basic tile edid block


igt_kms_get_alt_edid ()

const struct edid *
igt_kms_get_alt_edid (void);

Get an alternate edid block, which includes the following modes:

  • 1400x1050 60Hz

  • 1920x1080 60Hz

  • 1280x720 60Hz

  • 1024x768 60Hz

  • 800x600 60Hz

  • 640x480 60Hz

Returns

An alternate edid block


igt_kms_get_hdmi_audio_edid ()

const struct edid *
igt_kms_get_hdmi_audio_edid (void);

Get a basic edid block, which includes the HDMI Audio

Returns

A basic HDMI Audio edid block


igt_kms_get_dp_audio_edid ()

const struct edid *
igt_kms_get_dp_audio_edid (void);

Get a basic edid block, which includes the DP Audio

Returns

A basic DP Audio edid block


igt_kms_get_4k_edid ()

const struct edid *
igt_kms_get_4k_edid (void);

Get a basic edid block, which includes 4K resolution

Returns

A basic edid block with 4K resolution


igt_kms_get_3d_edid ()

const struct edid *
igt_kms_get_3d_edid (void);

Get a basic edid block, which includes 3D mode

Returns

A basic edid block with 3D mode


igt_kms_get_aspect_ratio_edid ()

const struct edid *
igt_kms_get_aspect_ratio_edid (void);

Gets the base edid block, which includes the following modes and different aspect ratio

  • 1920x1080 60Hz

  • 1280x720 60Hz

  • 1024x768 60Hz

  • 800x600 60Hz

  • 640x480 60Hz

Returns

A basic edid block with aspect ratio block


igt_kms_get_tiled_edid ()

struct edid **
igt_kms_get_tiled_edid (uint8_t htile,
                        uint8_t vtile);

Get a basic edid block, which includes tiled display

Parameters

htile

Target H-tile

 

vtile

Target V-tile

 

Returns

A basic tiled display edid block


igt_kms_get_custom_edid ()

const struct edid *
igt_kms_get_custom_edid (enum igt_custom_edid_type edid);

edid : enum to specify which edid block is required returns pointer to requested edid block

Returns

Required edid


igt_watch_uevents ()

struct udev_monitor *
igt_watch_uevents (void);

Begin monitoring udev for sysfs uevents.

Returns

A udev monitor for detecting uevents on


igt_hotplug_detected ()

bool
igt_hotplug_detected (struct udev_monitor *mon,
                      int timeout_secs);

Detect if a hotplug event was received since we last checked the monitor.

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

timeout_secs

How long to wait for a hotplug event to occur.

 

Returns

True if a sysfs hotplug event was received, false if we timed out


igt_lease_change_detected ()

bool
igt_lease_change_detected (struct udev_monitor *mon,
                           int timeout_secs);

Detect if a lease change event was received since we last checked the monitor.

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

timeout_secs

How long to wait for a lease change event to occur.

 

Returns

True if a sysfs lease change event was received, false if we timed out


igt_connector_event_detected ()

bool
igt_connector_event_detected (struct udev_monitor *mon,
                              uint32_t conn_id,
                              uint32_t prop_id,
                              int timeout_msecs);

Detect if a connector event is received for a given connector and property.

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

conn_id

Connector id of the Connector for which the property change is expected.

 

prop_id

Property id for which the change is expected.

 

timeout_secs

How long to wait for a connector event to occur.

 

Returns

True if the connector event was received, false if we timed out


igt_flush_uevents ()

void
igt_flush_uevents (struct udev_monitor *mon);

Get rid of any pending uevents

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

igt_cleanup_uevents ()

void
igt_cleanup_uevents (struct udev_monitor *mon);

Cleanup the resources allocated by igt_watch_uevents

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

igt_display_has_format_mod ()

bool
igt_display_has_format_mod (igt_display_t *display,
                            uint32_t format,
                            uint64_t modifier);

Parameters

display

a pointer to an igt_display_t structure

 

format

Target format

 

modifier

Target modifier

 

Returns

True if display supports the given format and modifier , else false


igt_plane_has_format_mod ()

bool
igt_plane_has_format_mod (igt_plane_t *plane,
                          uint32_t format,
                          uint64_t modifier);

Parameters

plane

Target plane

 

format

Target format

 

modifier

Target modifier

 

Returns

True if plane supports the given format and modifier , else false


igt_global_histogram_event_detected ()

bool
igt_global_histogram_event_detected (struct udev_monitor *mon,
                                     int timeout_secs);

Detect if a global Histogram event was received since we last checked the monitor.

Parameters

mon

A udev monitor initialized with igt_watch_uevents

 

timeout_secs

How long to wait for a lease change event to occur.

 

Returns

true if a sysfs global Histogram event was received, false if we timed out


igt_vblank_after_eq ()

return
igt_vblank_after_eq (b Param1,
                     a Param2);

Compare vblank sequence numbers, handling wraparound correctly.

Parameters

a

First vblank sequence number.

 

b

Second vblank sequence number.

 

Returns

a >= b


igt_vblank_after ()

return
igt_vblank_after (b Param1,
                  a Param2);

Compare vblank sequence numbers, handling wraparound correctly.

Parameters

a

First vblank sequence number.

 

b

Second vblank sequence number.

 

Returns

a > b


igt_parse_connector_tile_blob ()

void
igt_parse_connector_tile_blob (drmModePropertyBlobPtr blob,
                               igt_tile_info_t *tile);

Parses the connector tile blob to extract the tile information. The blob information is exposed from drm/drm_connector.c in the kernel. The format of the tile property is defined in the kernel as char tile[256] that consists of 8 integers that are ':' separated.

Parameters

blob

pointer to the connector's tile properties

 

tile

pointer to tile structure that is populated by the function

 

igt_connector_sysfs_open ()

int
igt_connector_sysfs_open (int drm_fd,
                          drmModeConnector *connector);

Parameters

drm_fd

drm file descriptor

 

connector

drm connector

 

Returns

The connector sysfs fd, or -1 on failure.


igt_reduce_format ()

uint32_t
igt_reduce_format (uint32_t format);

Reduce format to a base format. The aim is to allow grouping sufficiently similar formats into classes. Formats with identical component sizes, overall pixel size, chroma subsampling, etc. are considered part of the same class, no matter in which order the components appear. We arbitrarily choose one of the formats in the class as the base format. Note that the base format itself may not be supported by whatever device is being tested even if some of the other formats in the class are supported.

Parameters

format

drm fourcc

 

Returns

The base format for format


igt_require_pipe ()

void
igt_require_pipe (igt_display_t *display,
                  enum pipe pipe);

Skip a (sub-)test if the pipe not enabled.

Should be used everywhere where a test checks pipe and skip test when pipe is not enabled.

Parameters

display

pointer to igt_display_t

 

pipe

pipe which need to check

 

igt_dump_connectors_fd ()

void
igt_dump_connectors_fd (int drmfd);

Iterates through list of connectors and dumps their list of modes.

Parameters

drmfd

handle to open drm device.

 

igt_dump_crtcs_fd ()

void
igt_dump_crtcs_fd (int drmfd);

Iterates through the list of crtcs and dumps out the mode and basic information for each of them.

Parameters

drmfd

handle to open drm device.

 

igt_override_all_active_output_modes_to_fit_bw ()

bool
igt_override_all_active_output_modes_to_fit_bw
                               (igt_display_t *display);

Override the mode on all active outputs (i.e. pending_pipe != PIPE_NONE) on basis of bandwidth.

Parameters

display

a pointer to an igt_display_t structure

 

Returns

True if a valid connector mode combo found, else false


igt_get_i915_edp_lobf_status ()

bool
igt_get_i915_edp_lobf_status (int drmfd,
                              char *connector_name);

Return: True if its enabled.

Parameters

drmfd

A drm file descriptor

 

connector_name

Name of the libdrm connector we're going to use

 

igt_get_output_max_bpc ()

unsigned int
igt_get_output_max_bpc (int drmfd,
                        char *connector_name);

Parameters

drmfd

A drm file descriptor

 

connector_name

Name of the libdrm connector we're going to use

 

Returns

The maximum bpc from the connector debugfs.


igt_get_pipe_current_bpc ()

unsigned int
igt_get_pipe_current_bpc (int drmfd,
                          enum pipe pipe);

Parameters

drmfd

A drm file descriptor

 

pipe

Display pipe

 

Returns

The current bpc from the crtc debugfs.


igt_assert_output_bpc_equal ()

void
igt_assert_output_bpc_equal (int drmfd,
                             enum pipe pipe,
                             char *output_name,
                             unsigned int bpc);

Assert if crtc's current bpc is not matched with the requested one.

Parameters

drmfd

A drm file descriptor

 

pipe

Display pipe

 

output_name

Name of the libdrm connector we're going to use

 

bpc

BPC to compare with max & current bpc

 

igt_check_output_bpc_equal ()

bool
igt_check_output_bpc_equal (int drmfd,
                            enum pipe pipe,
                            char *output_name,
                            unsigned int bpc);

This is similar to igt_assert_output_bpc_equal, instead of assert it'll return True if crtc has the correct requested bpc, else False.

Parameters

drmfd

A drm file descriptor

 

pipe

Display pipe

 

output_name

Name of the libdrm connector we're going to use

 

bpc

BPC to compare with max & current bpc

 

Returns

True if crtc's current bpc is matched with the requested bpc, else False.


sort_drm_modes_by_clk_dsc ()

int
sort_drm_modes_by_clk_dsc (const void *a,
                           const void *b);

Comparator function for sorting DRM modes in descending order by clock.

Parameters

a

first element

 

b

second element

 

Returns

True if first element's clock is less than second element's clock, else False.


sort_drm_modes_by_clk_asc ()

int
sort_drm_modes_by_clk_asc (const void *a,
                           const void *b);

Comparator function for sorting DRM modes in ascending order by clock.

Parameters

a

first element

 

b

second element

 

Returns

True if first element's clock is greater than second element's clock, else False.


sort_drm_modes_by_res_dsc ()

int
sort_drm_modes_by_res_dsc (const void *a,
                           const void *b);

Comparator function for sorting DRM modes in descending order by resolution.

Parameters

a

first element

 

b

second element

 

Returns

True if first element's resolution is less than second element's resolution, else False.


sort_drm_modes_by_res_asc ()

int
sort_drm_modes_by_res_asc (const void *a,
                           const void *b);

Comparator function for sorting DRM modes in ascending order by resolution.

Parameters

a

first element

 

b

second element

 

Returns

True if first element's resolution is greater than second element's resolution, else False.


igt_sort_connector_modes ()

void
igt_sort_connector_modes (drmModeConnector *connector,
                          int (*comparator) (const void *, const void*));

Sorts connector modes based on the comparator .

Parameters

connector

libdrm connector

 

comparator

comparison function to compare two elements

 

igt_max_bpc_constraint ()

bool
igt_max_bpc_constraint (igt_display_t *display,
                        enum pipe pipe,
                        igt_output_t *output,
                        int bpc);

The "max bpc" property only ensures that the bpc will not go beyond the value set through this property. It does not guarantee that the same bpc will be used for the given mode.

So, if we really want a particular bpc set, try reducing the resolution till we get the bpc that we set in max bpc property.

Parameters

display

a pointer to an igt_display_t structure

 

pipe

Display pipe

 

output

Target output

 

bpc

BPC to compare with max & current bpc

 

Returns

True if suitable mode found to use requested bpc, else False.


igt_get_max_dotclock ()

int
igt_get_max_dotclock (int fd);

Get the Max pixel clock frequency from intel specific debugfs "i915_frequency_info".

Parameters

fd

A drm file descriptor

 

Returns

Max supported pixel clock frequency.


igt_bigjoiner_possible ()

bool
igt_bigjoiner_possible (int drm_fd,
                        drmModeModeInfo *mode,
                        int max_dotclock);

Bigjoiner will come into the picture, when the requested mode resolution > 5K or mode clock > max_dotclock.

Parameters

drm_fd

drm file descriptor

 

mode

libdrm mode

 

max_dotclock

Max pixel clock frequency

 

Returns

True if mode requires Bigjoiner, else False.


bigjoiner_mode_found ()

bool
bigjoiner_mode_found (int drm_fd,
                      drmModeConnector *connector,
                      int max_dotclock,
                      drmModeModeInfo *mode);

Bigjoiner will come in to the picture when the resolution > 5K or clock > max-dot-clock.

Parameters

drm_fd

drm file descriptor

 

connector

libdrm connector

 

max_dot_clock

max dot clock frequency

 

mode

libdrm mode to be filled

 

Returns

True if big joiner found in connector modes


igt_ultrajoiner_possible ()

bool
igt_ultrajoiner_possible (drmModeModeInfo *mode,
                          int max_dotclock);

Ultrajoiner will come into the picture, when the requested mode resolution > 10K or mode clock > 2 * max_dotclock.

Parameters

mode

libdrm mode

 

max_dotclock

Max pixel clock frequency

 

Returns

True if mode requires Ultrajoiner, else False.


ultrajoiner_mode_found ()

bool
ultrajoiner_mode_found (int drm_fd,
                        drmModeConnector *connector,
                        int max_dotclock,
                        drmModeModeInfo *mode);

igt_has_force_joiner_debugfs ()

bool
igt_has_force_joiner_debugfs (int drmfd,
                              char *conn_name);

Checks if the force big joiner debugfs is available for a specific connector.

Parameters

drmfd

A drm file descriptor

 

conn_name

Name of the connector

 

Returns

true if the debugfs is available, false otherwise.


is_joiner_mode ()

bool
is_joiner_mode (int drm_fd,
                igt_output_t *output);

Checks if the current configuration requires Big Joiner or Ultra Joiner mode based on the maximum dot clock and connector settings.

Parameters

drm_fd

drm file descriptor

 

output

pointer to the output structure

 

Returns

True if joiner mode is required, otherwise False.


igt_check_force_joiner_status ()

bool
igt_check_force_joiner_status (int drmfd,
                               char *connector_name);

Checks if the force big joiner is enabled.

Parameters

drmfd

file descriptor of the DRM device.

 

connector_name

connector to check.

 

Returns

True if the force big joiner is enabled, False otherwise.


igt_check_bigjoiner_support ()

bool
igt_check_bigjoiner_support (igt_display_t *display);

Get all active pipes from connected outputs (i.e. pending_pipe != PIPE_NONE) and check those pipes supports the selected mode(s).

Example:

  • Pipe-D can't support mode > 5K

  • To use 8K mode on a pipe then consecutive pipe must be free.

Parameters

display

a pointer to an igt_display_t structure

 

Returns

True if a valid crtc/connector mode combo found, else false


igt_parse_mode_string ()

bool
igt_parse_mode_string (const char *mode_string,
                       drmModeModeInfo *mode);

Parse mode string and populate mode

Format: clock(MHz),hdisp,hsync-start,hsync-end,htotal,vdisp,vsync-start, vsync-end,vtotal

Parameters

mode_string

modeline string

 

mode

a pointer to a drm mode structure

 

Returns

True if the correct number of arguments are entered, else false.


intel_pipe_output_combo_valid ()

bool
intel_pipe_output_combo_valid (igt_display_t *display);

Every individual test must use igt_output_set_pipe() before calling this helper, so that this function will get all active pipes from connected outputs (i.e. pending_pipe != PIPE_NONE) and check the selected combo is valid or not.

This helper is supposed to be a superset of all constraints of pipe/output combo.

Example:

  • Pipe-D can't support mode > 5K

  • To use 8K mode on a pipe then consecutive pipe must be free.

  • MSO is supported only on PIPE_A/PIPE_B.

Parameters

display

a pointer to an igt_display_t structure

 

Returns

True if a valid pipe/output mode combo found, else false


igt_check_output_is_dp_mst ()

bool
igt_check_output_is_dp_mst (igt_output_t *output);

Parameters

output

Target output

 

Returns

True if output is dp-mst, else false.


igt_get_dp_mst_connector_id ()

int
igt_get_dp_mst_connector_id (igt_output_t *output);

Parameters

output

Target output

 

Returns

Connector id if output is dp-mst, else -EINVAL.


get_num_scalers ()

int
get_num_scalers (igt_display_t *display,
                 enum pipe pipe);

Parameters

display

the display

 

pipe

display pipe

 

Returns

Number of scalers supported per pipe.


igt_get_current_lane_count ()

int
igt_get_current_lane_count (int drm_fd,
                            igt_output_t *output);

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

Returns

lane_count if set for output else -1


igt_get_current_link_rate ()

int
igt_get_current_link_rate (int drm_fd,
                           igt_output_t *output);

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

Returns

link_rate if set for output else -1


igt_get_max_link_rate ()

int
igt_get_max_link_rate (int drm_fd,
                       igt_output_t *output);

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

Returns

max_link_rate


igt_get_max_lane_count ()

int
igt_get_max_lane_count (int drm_fd,
                        igt_output_t *output);

igt_force_link_retrain ()

void
igt_force_link_retrain (int drm_fd,
                        igt_output_t *output,
                        int retrain_count);

Force link retrain on the output.

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

retrain_count

number of retraining required

 

igt_force_lt_failure ()

void
igt_force_lt_failure (int drm_fd,
                      igt_output_t *output,
                      int failure_count);

Force link training failure on the output. failure_count : 1 for retraining with same link params 2 for retraining with reduced link params

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

failure_count

1 for same link param and 2 for reduced link params

 

igt_get_dp_link_retrain_disabled ()

bool
igt_get_dp_link_retrain_disabled (int drm_fd,
                                  igt_output_t *output);

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

Returns

True if link retrain disabled, false otherwise


igt_has_force_link_training_failure_debugfs ()

bool
igt_has_force_link_training_failure_debugfs
                               (int drmfd,
                                igt_output_t *output);

igt_get_dp_pending_lt_failures ()

int
igt_get_dp_pending_lt_failures (int drm_fd,
                                igt_output_t *output);

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

Returns

Number of pending link training failures.


igt_get_dp_pending_retrain ()

int
igt_get_dp_pending_retrain (int drm_fd,
                            igt_output_t *output);

igt_reset_link_params ()

void
igt_reset_link_params (int drm_fd,
                       igt_output_t *output);

Reset link rate and lane count to auto, also installs exit handler to set link rate and lane count to auto on exit

Parameters

drm_fd

A drm file descriptor

 

output

Target output

 

igt_backlight_read ()

int
igt_backlight_read (int *result,
                    const char *fname,
                    igt_backlight_context_t *context);

Parameters

result

Pointer to store the result

 

fname

Name of the file to read

 

context

Pointer to the context structure

 

igt_backlight_write ()

int
igt_backlight_write (int value,
                     const char *fname,
                     igt_backlight_context_t *context);

Parameters

value

Value to write

 

fname

Name of the file to write

 

context

Pointer to the context structure

 

Types and Values

LOCAL_DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT

#define LOCAL_DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT 6

enum pipe

Members

PIPE_NONE

Invalid pipe, used for disconnecting a output from a pipe.

 

PIPE_ANY

Deprecated alias for PIPE_NONE .

 

PIPE_A

First crtc.

 

PIPE_B

Second crtc.

 

PIPE_C

Third crtc.

 

PIPE_D

Fourth crtc.

 

PIPE_E

Fifth crtc.

 

PIPE_F

Sixth crtc.

 

PIPE_G

Seventh crtc.

 

PIPE_H

Eighth crtc.

 

PIPE_I

Ninth crtc.

 

PIPE_J

Tenth crtc.

 

PIPE_K

Eleventh crtc.

 

PIPE_L

Twelfth crtc.

 

PIPE_M

Thirteenth crtc.

 

PIPE_N

Fourteenth crtc.

 

PIPE_O

Fifteenth crtc.

 

PIPE_P

Sixteenth crtc.

 

IGT_MAX_PIPES

Max number of pipes allowed.

 

enum port

Members

PORT_A

   

PORT_B

   

PORT_C

   

PORT_D

   

PORT_E

   

I915_MAX_PORTS

   

enum igt_custom_edid_type

Enum used for the helper function igt_custom_edid_type IGT_CUSTOM_EDID_BASE : Returns base edid IGT_CUSTOM_EDID_FULL : Returns edid with full list of standard timings. IGT_CUSTOM_EDID_ALT : Returns alternate edid IGT_CUSTOM_EDID_HDMI_AUDIO : Returns edid with HDMI audio block IGT_CUSTOM_EDID_DP_AUDIO : Returns edid with DP audio block IGT_CUSTOM_EDID_ASPECT_RATIO : Returns base edid with apect ratio data block

Members

IGT_CUSTOM_EDID_BASE

   

IGT_CUSTOM_EDID_FULL

   

IGT_CUSTOM_EDID_ALT

   

IGT_CUSTOM_EDID_HDMI_AUDIO

   

IGT_CUSTOM_EDID_DP_AUDIO

   

IGT_CUSTOM_EDID_ASPECT_RATIO

   

IGT_CUSTOM_EDID_COUNT

#define IGT_CUSTOM_EDID_COUNT 6

enum dsc_output_format

Members

DSC_FORMAT_RGB

   

DSC_FORMAT_YCBCR420

   

DSC_FORMAT_YCBCR444

   

HDISPLAY_6K_PER_PIPE

#define HDISPLAY_6K_PER_PIPE 6144

HDISPLAY_5K_PER_PIPE

#define HDISPLAY_5K_PER_PIPE 5120

enum igt_atomic_crtc_properties

Members

IGT_CRTC_CTM

   

IGT_CRTC_GAMMA_LUT

   

IGT_CRTC_GAMMA_LUT_SIZE

   

IGT_CRTC_DEGAMMA_LUT

   

IGT_CRTC_DEGAMMA_LUT_SIZE

   

IGT_CRTC_MODE_ID

   

IGT_CRTC_ACTIVE

   

IGT_CRTC_OUT_FENCE_PTR

   

IGT_CRTC_VRR_ENABLED

   

IGT_CRTC_SCALING_FILTER

   

IGT_CRTC_HISTOGRAM

   

IGT_CRTC_GLOBAL_HISTOGRAM

   

IGT_CRTC_GLOBAL_HIST_PIXEL_FACTOR

   

IGT_NUM_CRTC_PROPS

   

enum igt_atomic_connector_properties

Members

IGT_CONNECTOR_SCALING_MODE

   

IGT_CONNECTOR_CRTC_ID

   

IGT_CONNECTOR_DPMS

   

IGT_CONNECTOR_BROADCAST_RGB

   

IGT_CONNECTOR_CONTENT_PROTECTION

   

IGT_CONNECTOR_VRR_CAPABLE

   

IGT_CONNECTOR_HDCP_CONTENT_TYPE

   

IGT_CONNECTOR_LINK_STATUS

   

IGT_CONNECTOR_MAX_BPC

   

IGT_CONNECTOR_HDR_OUTPUT_METADATA

   

IGT_CONNECTOR_WRITEBACK_PIXEL_FORMATS

   

IGT_CONNECTOR_WRITEBACK_FB_ID

   

IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR

   

IGT_CONNECTOR_DITHERING_MODE

   

IGT_NUM_CONNECTOR_PROPS

   

struct kmstest_connector_config

struct kmstest_connector_config {
	drmModeCrtc *crtc;
	drmModeConnector *connector;
	drmModeEncoder *encoder;
	drmModeModeInfo default_mode;

	int pipe;
	unsigned valid_crtc_idx_mask;
	char *connector_path;
};

struct kmstest_plane

struct kmstest_plane {
	int id;
	int index;
	int type;
	int pos_x;
	int pos_y;
	int width;
	int height;
};

struct kmstest_crtc

struct kmstest_crtc {
	int id;
	int pipe;
	bool active;
	int width;
	int height;
	int n_planes;
	struct kmstest_plane *planes;
};

enum kmstest_force_connector_state

Members

FORCE_CONNECTOR_UNSPECIFIED

Unspecified

 

FORCE_CONNECTOR_ON

On

 

FORCE_CONNECTOR_DIGITAL

Digital

 

FORCE_CONNECTOR_OFF

Off

 

enum intel_broadcast_rgb_mode

Members

BROADCAST_RGB_AUTO

Choose the color range to use automatically

 

BROADCAST_RGB_FULL

Force the connector to use full color range

 

BROADCAST_RGB_16_235

Force the connector to use a limited 16:235 color range

 

enum joined_pipes

Members

JOINED_PIPES_DEFAULT

Default setting with no force joiner

 

JOINED_PIPES_NONE

Force to exactly one pipe

 

JOINED_PIPES_BIG_JOINER

Join two pipes big joiner

 

JOINED_PIPES_ULTRA_JOINER

Join four pipes for ultra joiner

 

enum igt_commit_style

Members

COMMIT_LEGACY

Changes will be committed using the legacy API.

 

COMMIT_UNIVERSAL

Changes will be committed with the universal plane API, no modesets are allowed.

 

COMMIT_ATOMIC

Changes will be committed using the atomic API.

 

enum igt_atomic_plane_properties

Members

IGT_PLANE_SRC_X

   

IGT_PLANE_SRC_Y

   

IGT_PLANE_SRC_W

   

IGT_PLANE_SRC_H

   

IGT_PLANE_CRTC_X

   

IGT_PLANE_CRTC_Y

   

IGT_PLANE_CRTC_W

   

IGT_PLANE_CRTC_H

   

IGT_PLANE_FB_ID

   

IGT_PLANE_CRTC_ID

   

IGT_PLANE_IN_FENCE_FD

   

IGT_PLANE_TYPE

   

IGT_PLANE_ROTATION

   

IGT_PLANE_IN_FORMATS

   

IGT_PLANE_COLOR_ENCODING

   

IGT_PLANE_COLOR_RANGE

   

IGT_PLANE_PIXEL_BLEND_MODE

   

IGT_PLANE_ALPHA

   

IGT_PLANE_ZPOS

   

IGT_PLANE_FB_DAMAGE_CLIPS

   

IGT_PLANE_SCALING_FILTER

   

IGT_PLANE_HOTSPOT_X

   

IGT_PLANE_HOTSPOT_Y

   

IGT_PLANE_SIZE_HINTS

   

IGT_NUM_PLANE_PROPS

   

igt_display_t

typedef struct igt_display igt_display_t;

igt_pipe_t

typedef struct igt_pipe igt_pipe_t;

igt_fixed_t

typedef uint32_t igt_fixed_t;			/* 16.16 fixed point */

enum igt_rotation_t

Members

IGT_ROTATION_0

   

IGT_ROTATION_90

   

IGT_ROTATION_180

   

IGT_ROTATION_270

   

IGT_REFLECT_X

   

IGT_REFLECT_Y

   

IGT_ROTATION_MASK

#define             IGT_ROTATION_MASK

igt_plane_t

typedef struct {
} igt_plane_t;

struct igt_pipe

struct igt_pipe {
	igt_display_t *display;
	/* ID of a hardware pipe */
	enum pipe pipe;
	/* pipe is enabled or not */
	bool enabled;

	int n_planes;
	int num_primary_planes;
	int plane_cursor;
	int plane_primary;
	igt_plane_t *planes;

	uint64_t changed;
	uint32_t props[IGT_NUM_CRTC_PROPS];
	uint64_t values[IGT_NUM_CRTC_PROPS];

	/* ID of KMS CRTC object */
	uint32_t crtc_id;
	/* offset of a pipe in drmModeRes.crtcs */
	uint32_t crtc_offset;

	int32_t out_fence_fd;
};

igt_output_t

typedef struct {
} igt_output_t;

struct igt_display

struct igt_display {
	int drm_fd;
	int log_shift;
	int n_pipes;
	int n_planes;
	int n_outputs;
	igt_output_t *outputs;
	igt_plane_t *planes;
	igt_pipe_t *pipes;
	bool has_cursor_plane;
	bool is_atomic;
	bool has_virt_cursor_plane;
	bool first_commit;

	uint64_t *modifiers;
	uint32_t *formats;
	int format_mod_count;
};

igt_tile_info_t

typedef struct {
	int tile_group_id;
	bool tile_is_single_monitor;
	uint8_t num_h_tile, num_v_tile;
	uint8_t tile_h_loc, tile_v_loc;
	uint16_t tile_h_size, tile_v_size;
} igt_tile_info_t;

igt_backlight_context_t

typedef struct {
	int max;
	int old;
	igt_output_t *output;
	char path[PATH_MAX];
	char backlight_dir_path[PATH_MAX];
} igt_backlight_context_t;

struct edid

struct edid;