rivafb_setcolreg(9)
π 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 thefb_infoobject 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 π―ββοΈ:
rivafb_load_cursor_image(9)riva_wclut(9)riva_rclut(9)riva_save_state(9)riva_load_state(9)riva_load_video_mode(9)rivafb_do_maximize(9)riva_get_cmap_len(9)rivafb_pan_display(9)rivafb_fillrect(9)rivafb_copyarea(9)rivafb_imageblit(9)rivafb_cursor(9)
π 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
- 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