XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_mode_get_connector Struct Reference

#include <drm_mode.h>

Public Attributes

__u64 encoders_ptr
 
__u64 modes_ptr
 
__u64 props_ptr
 
__u64 prop_values_ptr
 
__u32 count_modes
 
__u32 count_props
 
__u32 count_encoders
 
__u32 encoder_id
 
__u32 connector_id
 
__u32 connector_type
 
__u32 connector_type_id
 
__u32 connection
 
__u32 mm_width
 
__u32 mm_height
 
__u32 subpixel
 
__u32 pad
 

Detailed Description

struct drm_mode_get_connector - Get connector metadata.

User-space can perform a GETCONNECTOR ioctl to retrieve information about a connector. User-space is expected to retrieve encoders, modes and properties by performing this ioctl at least twice: the first time to retrieve the number of elements, the second time to retrieve the elements themselves.

To retrieve the number of elements, set @count_props and @count_encoders to zero, set @count_modes to 1, and set @modes_ptr to a temporary struct drm_mode_modeinfo element.

To retrieve the elements, allocate arrays for @encoders_ptr, @modes_ptr, @props_ptr and @prop_values_ptr, then set @count_modes, @count_props and @count_encoders to their capacity.

Performing the ioctl only twice may be racy: the number of elements may have changed with a hotplug event in-between the two ioctls. User-space is expected to retry the last ioctl until the number of elements stabilizes. The kernel won't fill any array which doesn't have the expected length.

Force-probing a connector

If the @count_modes field is set to zero and the DRM client is the current DRM master, the kernel will perform a forced probe on the connector to refresh the connector status, modes and EDID. A forced-probe can be slow, might cause flickering and the ioctl will block.

User-space needs to force-probe connectors to ensure their metadata is up-to-date at startup and after receiving a hot-plug event. User-space may perform a forced-probe when the user explicitly requests it. User-space shouldn't perform a forced-probe in other situations.

Member Data Documentation

◆ connection

__u32 drm_mode_get_connector::connection

@connection: Status of the connector.

See enum drm_connector_status.

◆ connector_id

__u32 drm_mode_get_connector::connector_id

@connector_id: Object ID of the connector.

◆ connector_type

__u32 drm_mode_get_connector::connector_type

@connector_type: Type of the connector.

See DRM_MODE_CONNECTOR_* defines.

◆ connector_type_id

__u32 drm_mode_get_connector::connector_type_id

@connector_type_id: Type-specific connector number.

This is not an object ID. This is a per-type connector number. Each (type, type_id) combination is unique across all connectors of a DRM device.

The (type, type_id) combination is not a stable identifier: the type_id can change depending on the driver probe order.

◆ count_encoders

__u32 drm_mode_get_connector::count_encoders

@count_encoders: Number of encoders.

◆ count_modes

__u32 drm_mode_get_connector::count_modes

@count_modes: Number of modes.

◆ count_props

__u32 drm_mode_get_connector::count_props

@count_props: Number of properties.

◆ encoder_id

__u32 drm_mode_get_connector::encoder_id

@encoder_id: Object ID of the current encoder.

◆ encoders_ptr

__u64 drm_mode_get_connector::encoders_ptr

@encoders_ptr: Pointer to __u32 array of object IDs.

◆ mm_height

__u32 drm_mode_get_connector::mm_height

@mm_height: Height of the connected sink in millimeters.

◆ mm_width

__u32 drm_mode_get_connector::mm_width

@mm_width: Width of the connected sink in millimeters.

◆ modes_ptr

__u64 drm_mode_get_connector::modes_ptr

@modes_ptr: Pointer to struct drm_mode_modeinfo array.

◆ pad

__u32 drm_mode_get_connector::pad

@pad: Padding, must be zero.

◆ prop_values_ptr

__u64 drm_mode_get_connector::prop_values_ptr

@prop_values_ptr: Pointer to __u64 array of property values.

◆ props_ptr

__u64 drm_mode_get_connector::props_ptr

@props_ptr: Pointer to __u32 array of property IDs.

◆ subpixel

__u32 drm_mode_get_connector::subpixel

@subpixel: Subpixel order of the connected sink.

See enum subpixel_order.


The documentation for this struct was generated from the following files: