drm_connector_init(9)
π
drm_connector_init(9) β the Kernel API Manual page that's here to init your preallocated connector β¨
Okay so bestie, welcome to the drm_connector_init(9) glow-up from the Kernel API Manual. This is the page where we set up a preallocated connector and make it feel like the main character. No cap, it's giving "one function, big responsibility." π
β¨ NAME β¨
drm_connector_init β init a preallocated connector. That's the whole assignment, and it ate. π
π¦ SYNOPSIS π¦
int drm_connector_init (struct drm_device *dev , struct drm_connector
*connector , const struct drm_connector_funcs *funcs , int
connector_type );
π ARGUMENTS π
devβ the DRM device. The whole setup's home base, iykyk. πconnectorβ the connector to init. This is the one getting the makeover. β¨funcsβ callbacks for this connector. The little behavior squad that comes with it. π«Άconnector_typeβ user visible type of the connector. Yes, "user visible" is in the original, so we're keeping it exactly like that. π
πΈ DESCRIPTION πΈ
Initialises a preallocated connector. Connectors should be subclassed as part of driver connector objects. That's the vibe: the connector isn't out here doing solo main-character nonsense β it gets subclassed as part of driver connector objects. π
At driver unload time the driver's drm_connector_funcs.destroy hook should call drm_connector_cleanup and free the connector structure. Like, that's the cleanup check, bestie. Don't leave your connector looking a mess. π§Ή
π¨ Important: the connector structure should not be allocated with devm_kzalloc. The original says it, we're saying it louder: not it. π
ββοΈ
π NOTE π
Consider usingdrmm_connector_initinstead ofdrm_connector_initto let the DRM managed resource infrastructure take care of cleanup and deallocation. So likeβ¦ if you want the managed-resource infrastructure to handle the cleanup and deallocation for you, that's the option. Slay. β¨
β RETURN β
Zero on success, error code on failure. Short king return values, but iconic. π
π SEE ALSO π
Okay so this list is long, but we do not skip. Every single reference from the original is here, in order, because accuracy is the moment. π
- Kernel file
./drivers/gpu/drm/drm_connector.c,overview(9) drm_get_connector_type_name(9)drm_connector_get_cmdline_mode(9)drm_connector_dynamic_init(9)drm_connector_init_with_ddc(9)drmm_connector_init(9)drmm_connector_hdmi_init(9)drm_connector_attach_edid_property(9)drm_connector_attach_encoder(9)drm_connector_has_possible_encoder(9)drm_connector_cec_phys_addr_invalidate(9)drm_connector_cec_phys_addr_set(9)drm_connector_cleanup(9)drm_connector_register(9)drm_connector_dynamic_register(9)drm_connector_unregister(9)drm_get_connector_status_name(9)drm_get_connector_force_name(9)drm_connector_list_iter_begin(9)drm_connector_list_iter_next(9)drm_connector_list_iter_end(9)drm_get_subpixel_order_name(9)drm_display_info_set_bus_formats(9)drm_get_tv_mode_from_name(9)drm_get_colorspace_name(9)standard connector properties(9)drm_mode_create_dvi_i_properties(9)drm_connector_attach_dp_subconnector_property(9)HDMI connector properties(9)Analog TV Connector Properties(9)drm_connector_attach_content_type_property(9)drm_connector_attach_tv_margin_properties(9)drm_mode_create_tv_margin_properties(9)drm_mode_create_tv_properties_legacy(9)drm_mode_create_tv_properties(9)drm_mode_create_scaling_mode_property(9)Variable refresh properties(9)drm_connector_attach_vrr_capable_property(9)drm_connector_attach_scaling_mode_property(9)drm_mode_create_aspect_ratio_property(9)standard connector properties(9)drm_mode_create_hdmi_colorspace_property(9)drm_mode_create_dp_colorspace_property(9)drm_mode_create_content_type_property(9)drm_mode_create_suggested_offset_properties(9)drm_connector_set_path_property(9)drm_connector_set_tile_property(9)drm_connector_set_link_status_property(9)drm_connector_attach_max_bpc_property(9)drm_connector_attach_hdr_output_metadata_property(9)drm_connector_attach_broadcast_rgb_property(9)drm_connector_attach_colorspace_property(9)Color format(9)drm_connector_attach_color_format_property(9)drm_connector_atomic_hdr_metadata_equal(9)drm_connector_set_vrr_capable_property(9)drm_connector_set_panel_orientation(9)drm_connector_set_panel_orientation_with_quirk(9)drm_connector_set_orientation_from_panel(9)drm_connector_create_privacy_screen_properties(9)drm_connector_attach_privacy_screen_properties(9)drm_connector_attach_privacy_screen_provider(9)drm_connector_update_privacy_screen(9)drm_connector_find_by_fwnode(9)drm_connector_oob_hotplug_event(9)drm_connector_get_color_format(9)Tile group(9)drm_mode_put_tile_group(9)drm_mode_get_tile_group(9)drm_mode_create_tile_group(9)drm_connector_attach_panel_type_property(9)
Also yes, standard connector properties(9) really does show up twice up there β the original listed it twice, so we're keeping it twice. Periodt. πββοΈ
Mwah π and that's the page! This little love letter came from the source/version ./drivers/gpu/drm, dated October 2026, and it's still out here being drm_connector_init(9). Go init something preallocated, bestie. π¦β¨
π¦ 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