drm_edid_read_custom(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_edid_read_custom ✨

okay bestie, buckle up β€” this is a page out of the Kernel API Manual, section 9, and it's all about reading EDID data with your own little read function. very DIY, very main character πŸ’…


πŸŽ€ NAME πŸŽ€

drm_edid_read_custom β€” read EDID data using a given EDID block read function, no cap


πŸ¦‹ SYNOPSIS πŸ¦‹

const struct drm_edid * drm_edid_read_custom (struct drm_connector
*connector , read_block_fn read_block , void *context );

like, literally three args and you're out 🫢


🌸 ARGUMENTS 🌸

  • connector β€” the connector you're working with. that's your girl.
  • read_block β€” the EDID block read function. your custom little guy for grabbing blocks.
  • context β€” private data that gets passed straight through to the block read function. it's giving ✨handoff✨

πŸ’– DESCRIPTION πŸ’–

okay so picture this: the I2C adapter hooked up to the DDC bus is hiding behind some device that exposes a different interface for reading EDID blocks. rude, honestly. but that's exactly when you reach for this function β€” it lets you pull EDID data using a custom block read function. slay πŸŽ€

but ngl, here comes the lecture: in the general case the DDC bus is accessible by the kernel at the I2C level, so drivers must make all reasonable efforts to expose it as an I2C adapter and use drm_edid_read or drm_edid_read_ddc instead of abusing this function. like… abusing. their words. i'm just the messenger 😭

the EDID may be overridden using debugfs override_edid or firmware EDID (drm_edid_load_firmware and the drm.edid_firmware parameter) β€” in this priority order. having either of them bypasses actual EDID reads. bye, real hardware πŸ‘‹

⚠️ bestie listen. the returned pointer must be freed using drm_edid_free. don't be the girl who leaks. we don't do that here πŸ’€

πŸ”₯ RETURN πŸ”₯

pointer to EDID β€” or NULL if probe/read failed. iconic either way πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/gpu/drm/drm_edid.c plus the whole friend group, fr fr:

drm_edid_header_is_valid(9), drm_edid_is_valid(9), drm_edid_valid(9), drm_do_probe_ddc_edid(9), drm_edid_override_connector_update(9), drm_edid_raw(9), drm_edid_alloc(9), drm_edid_dup(9), drm_edid_free(9), drm_probe_ddc(9), drm_get_edid(9), drm_edid_read_ddc(9), drm_edid_read(9), drm_edid_get_product_id(9), drm_edid_print_product_id(9), drm_edid_get_panel_id(9), drm_edid_read_base_block(9), drm_get_edid_switcheroo(9), drm_edid_read_switcheroo(9), drm_edid_duplicate(9), edid_get_quirks(9), drm_match_cea_mode(9), drm_display_mode_from_cea_vic(9), drm_edid_match(9), drm_edid_get_monitor_name(9), drm_edid_to_sad(9), drm_edid_to_speaker_allocation(9), drm_av_sync_delay(9), drm_detect_hdmi_monitor(9), drm_detect_monitor_audio(9), drm_default_rgb_quant_range(9), drm_edid_connector_update(9), drm_edid_connector_add_modes(9), drm_connector_update_edid_property(9), drm_add_edid_modes(9), drm_add_modes_noedid(9), drm_hdmi_avi_infoframe_from_display_mode(9), drm_hdmi_avi_infoframe_quant_range(9), drm_hdmi_vendor_infoframe_from_display_mode(9), drm_edid_is_digital(9)


mwah πŸ’‹ this one lives in ./drivers/gpu/drm, dated October 2026, and it's the drm_edid_read_custom(9) page. now go free that pointer, bestie 🫢✨

πŸ“¦ where this page comes from