STRUCT DRM_CONNECTOR_STATE(9)
β¨ struct drm_connector_state(9) β¨
okay bestie, welcome to the Kernel API Manual π
this one's about struct drm_connector_state, which is literally mutable connector state β yes that's the whole NAME, she's concise, she's iconic, she's giving main character energy π
πΈ SYNOPSIS πΈ
like, here's the whole struct, every single field, no cap:
struct drm_connector_state {
struct drm_connector *connector;
struct drm_crtc *crtc;
struct drm_encoder *best_encoder;
enum drm_link_status link_status;
struct drm_atomic_commit *state;
struct drm_crtc_commit *commit;
struct drm_tv_connector_state tv;
bool self_refresh_aware;
enum hdmi_picture_aspect picture_aspect_ratio;
unsigned int content_type;
unsigned int hdcp_content_type;
unsigned int scaling_mode;
unsigned int content_protection;
enum drm_colorspace colorspace;
enum drm_connector_color_format color_format;
struct drm_writeback_job *writeback_job;
u8 max_requested_bpc;
u8 max_bpc;
enum drm_privacy_screen_status privacy_screen_sw_state;
struct drm_property_blob *hdr_output_metadata;
struct drm_connector_hdmi_state hdmi;
};
π Members π
okay so let's go through every single one, grab a snack π
connectorβ backpointer to the connector. that's it, that's the whole vibe π«Άcrtcβ the CRTC to connect the connector to, orNULLif it's disabled.
π¨ bestie do NOT change this directly, use drm_atomic_set_crtc_for_connector instead. i'm serious. put it down.
best_encoderβ used by the atomic helpers to select the encoder, through thedrm_connector_helper_funcs.atomic_best_encoderordrm_connector_helper_funcs.best_encodercallbacks.
this is also used in the atomic helpers to map encoders to their current and previous connectors, see drm_atomic_get_old_connector_for_encoder and drm_atomic_get_new_connector_for_encoder.
β οΈ NOTE: atomic drivers must fill this out (either themselves or through helpers), for otherwise theGETCONNECTORandGETENCODERIOCTLs will not return correct data to userspace. like, that's not a suggestion, that's the assignment π
link_statusβ connectorlink_statusto keep track of whether the link is GOOD or BAD, so we can notify userspace if retraining is necessary π₯stateβ backpointer to the globaldrm_atomic_commitcommitβ tracks the pending commit to prevent use-after-free conditions π
is only set when crtc is NULL.
tvβ TV connector state πΊself_refresh_awareβ this tracks whether a connector is aware of the self refresh state. it should be set totruefor those connector implementations which understand the self refresh state. this is needed since the crtc registers the self refresh helpers and it doesn't know if the connectors downstream have implemented self refresh entry/exit.
drivers should set this to true in atomic_check if they know how to handle self_refresh requests π§
picture_aspect_ratioβ connector property to control the HDMI infoframe aspect ratio setting.
the DRM_MODE_PICTURE_ASPECT_values much match the values for enum hdmi_picture_aspect β¨
content_typeβ connector property to control the HDMI infoframe content type setting. theDRM_MODE_CONTENT_TYPE_valuesmuch match the values.hdcp_content_typeβ connector property to pass the type of protected content. this is most commonly used for HDCP πscaling_modeβ connector property to control the upscaling, mostly used for built-in panels.content_protectionβ connector property to request content protection. this is most commonly used for HDCP.colorspaceβ state variable for the connector property to request colorspace change on the Sink. this is most commonly used to switch to wider color gamuts like BT2020 πcolor_formatβ state variable for the connector property to request color format change on the Sink. this is most commonly used to switch between RGB to YUV and vice-versa.writeback_jobβ writeback job for writeback connectors.
holds the framebuffer and out-fence for a writeback connector. as the writeback completion may be asynchronous to the normal commit cycle, the writeback job lifetime is managed separately from the normal atomic state by this object.
see also: drm_writeback_queue_job and drm_writeback_signal_completion π¦
max_requested_bpcβ connector property to limit the maximum bit depth of the pixels.max_bpcβ connectormax_bpcbased on the requestedmax_bpcproperty and the connector bpc limitations obtained from edid.privacy_screen_sw_stateβ see :ref:Standard Connector Properties<standard_connector_properties>πhdr_output_metadataβ DRM blob property for HDR output metadata βhdmiβ HDMI-related variable and properties. filled bydrm_atomic_helper_connector_hdmi_check.
π SEE ALSO π
kernel file ./include/drm/drm_connector.h, plus the whole friend group, in order, no skips:
enum drm_connector_status(9), enum drm_connector_registration_state(9), enum drm_connector_tv_mode(9), struct drm_scrambling(9), struct drm_hdmi_dsc_cap(9), struct drm_hdmi_info(9), enum drm_link_status(9), enum drm_panel_orientation(9), enum drm_hdmi_broadcast_rgb(9), struct drm_monitor_range_info(9), struct drm_luminance_range_info(9), enum drm_privacy_screen_status(9), enum drm_colorspace(9), enum drm_output_color_format(9), enum drm_connector_color_format(9), enum drm_bus_flags(9), struct drm_amd_vsdb_info(9), struct drm_display_info(9), struct drm_connector_tv_margins(9), struct drm_tv_connector_state(9), struct drm_connector_hdmi_infoframe(9), struct drm_connector_cec_funcs(9), struct drm_connector_infoframe_funcs(9), struct drm_connector_hdmi_funcs(9), struct drm_connector_funcs(9), struct drm_cmdline_mode(9), struct drm_connector_hdmi_audio(9), struct drm_connector_cec(9), struct drm_connector(9), drm_connector_lookup(9), drm_connector_get(9), drm_connector_put(9), drm_connector_is_unregistered(9), struct drm_tile_group(9), struct drm_connector_list_iter(9), drm_for_each_connector_iter(9), drm_connector_for_each_possible_encoder(9)
that's the whole page bestie, go forth and read the connector state π
mwah π β this one came at you from ./include/drm, dated October 2026, and yes it's still called struct drm_connector_state(9) in case you forgot already π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms