optc35_get_crc(9)
π 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β yourtiming_generatorinstance. 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 viaOTG_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
- 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