rivafb_setcolreg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rivafb_setcolreg πŸ’…

okay so real talk, this is rivafb_setcolreg from the Kernel API Manual, section 9 β€” and bestie, the NAME section is literally just the function name and then… nothing. empty. a whole blank. we're working with the vibes alone here πŸ’€ (the description below does the heavy lifting, don't worry).


✨ SYNOPSIS ✨

int rivafb_setcolreg (unsigned regno , unsigned red , unsigned green ,
       unsigned blue , unsigned transp , struct fb_info *info );

that's the whole signature, character for character, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • regno β€” the register index. which slot we're poking at πŸ’…
  • red β€” the red component 🌹
  • green β€” the green component πŸ€
  • blue β€” the blue component πŸ¦‹
  • transp β€” transparency, yes ma'am ✨
  • info β€” a pointer to the fb_info object holding all the info for the current riva board πŸ‘‘

🌸 DESCRIPTION 🌸

so what does it actually do? it sets a single color register. one (1) register. that's it, that's the job πŸ’–

and the values you hand it β€” red, green, blue, transp β€” they've got a 16 bit magnitude. sixteen whole bits of magnitude, bestie, that's the vibe check they pass πŸ”₯

CALLED FROM: fbcmap.c:fb_set_cmap β€” like, that's the caller, that's who's knocking on the door πŸšͺ✨


⭐ RETURN ⭐

it returns != 0 when regno is invalid. so like, nonzero means "no ❀️", zero means "slay πŸ’…". invalid regno = you get a nonzero back, periodt.


🌈 SEE ALSO 🌈

first up, the kernel file itself:

  • ./drivers/video/fbdev/riva/fbdev.c

and the whole friend group πŸ‘―β€β™€οΈ:


πŸ’œ quick reminder bestie: 16 bit magnitude on those color values, and nonzero return = invalid regno. that's the whole tea. don't forget it πŸ“

anyway, that's the page! sourced from ./drivers/video/fbdev/riva, October 2026 edition, handed down from the Kernel API Manual section 9 β€” go forth and set those color registers, icon πŸ‘‘βœ¨πŸ§šπŸ’–

πŸ“¦ where this page comes from