drm_crtc_add_crc_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_crtc_add_crc_entry(9) πŸ’–

okay so bestie, we're in the Kernel API Manual today and the star of the show is drm_crtc_add_crc_entry(9) ✨ it's giving "tiny function, huge responsibilities" ngl 🫢


🌸 NAME 🌸

drm_crtc_add_crc_entry β€” Add entry with CRC information for a frame πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_crtc_add_crc_entry (struct drm_crtc *crtc , bool has_frame ,
       uint32_t frame , uint32_t *crcs );

like, look at her. four args. no notes. πŸ’…


✨ ARGUMENTS ✨

  • crtc β€” the CRTC that this frame belongs to πŸ‘‘ like whose frame is this anyway
  • has_frame β€” a bool telling us whether this entry actually has a frame number to go with it 🫢 sometimes yes, sometimes no, we don't judge
  • frame β€” the number of the frame these CRCs are all about πŸ”₯ (uint32_t, in case you were wondering)
  • crcs β€” array of CRC values πŸ’– and its length has to match #drm_crtc_crc.values_cnt, no cap, that's the vibe check πŸ“

🌈 DESCRIPTION 🌈

so for each and every frame, the driver goes and polls the source of CRCs for new data πŸ’« and then it calls this function to add them to the buffer β€” the very same buffer that userspace reads from. that's it. that's the whole gig. iconic honestly πŸŽ€

like it's literally the handoff: driver gets the numbers, this function tucks them into the buffer, userspace comes along and reads them. middle manager energy but make it kernel 🧚


πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./drivers/gpu/drm/drm_debugfs_crc.c πŸ“
  • CRC ABI(9) ⭐

bestie reminder: crcs length must match #drm_crtc_crc.values_cnt β€” don't come for me if you skip that πŸ™ˆ

and that's the page!! mwah πŸ’‹ this little writeup lives in ./drivers/gpu/drm, dated October 2026, and it's filed under drm_crtc_add_crc_entry(9) β€” slay, go read some CRC ABI now, ily πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from