optc35_get_crc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… optc35_get_crc(9) β€” like, the Kernel API Manual but make it make sense πŸŽ€

okay so bestie, welcome to optc35_get_crc, a lil function from the Kernel API Manual and honestly? she's giving "quietly essential." let's get into it ✨


✨ NAME ✨

optc35_get_crc β€” grab the CRC result for each color component, one at a time, no cap πŸ’…


🌸 SYNOPSIS 🌸

bool optc35_get_crc (struct timing_generator *optc , uint8_t idx ,
uint32_t *r_cr , uint32_t *g_y , uint32_t *b_cb );

like, that's the whole signature. she takes four args and returns a bool. periodt 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • optc β€” your timing_generator instance. the main character, honestly πŸ‘‘
  • idx β€” the index of the crc engine you wanna get the CRC from. which one? this one πŸ”₯
  • r_cr β€” the primary CRC signature for red data. red girlie πŸ’‹
  • g_y β€” the primary CRC signature for green data. green flag behavior 🌱
  • b_cb β€” the primary CRC signature for blue data. blue era πŸ’™

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? this function reads the CRC signature straight out of the OPTC registers. and here's the cute part β€” there are three registers keeping the CRC result per color component (RGB). three registers. one for each vibe. 🌈

now, it's different depending on your DCN version, so pay attention bestie:

  • If CRC32 registers (OTG_CRC0_DATA_R32/G32/B32) are available, read from the 32-bit CRC registers. also!! DCN 3.6+ supports both CRC-32 and CRC-16 polynomials, and you select between them via OTG_CRC_POLY_SEL. iconic, honestly ✨
  • Otherwise, read from the legacy 16-bit CRC registers (OTG_CRC0_DATA_RG/B) β€” and lowkey those only support the CRC-16 polynomial. no choices, no options, just vibes πŸ’€
ngl this is the whole "if you have the fancy registers use 'em, otherwise fall back" situation, so don't assume you're always getting 32-bit data, mkay? πŸ™ˆ

⭐ RETURN ⭐

  • If CRC is disabled β†’ return false 😭 (no data for you)
  • Otherwise β†’ return true, and the CRC results land in the parameters. slay πŸ’…

πŸŽ€ SEE ALSO πŸŽ€

  • Kernel file ./drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c β€” go read the source, iykyk πŸ“–
  • optc35_set_odm_combine(9) β€” her sibling, also worth a look πŸ‘€

and that's the page!! mwah πŸ’‹ this was optc35_get_crc(9) from the Kernel API Manual, brought to you by the file path ./drivers/gpu/drm/amd/display/... and dated October 2026 β€” see you in the group chat, bestie πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from