atmel_lcdfb_check_var(9)
π atmel_lcdfb_check_var(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β yes, that's the manual name, we're doing this properly. Today's main character is atmel_lcdfb_check_var, and she's here to validate a var passed in, no cap. π
πΈ NAME πΈ
atmel_lcdfb_check_var β literally just validates a var passed in, that's the whole job π
β¨ SYNOPSIS β¨
int atmel_lcdfb_check_var (struct fb_var_screeninfo *var , struct
fb_info *info );
π¦ ARGUMENTS π¦
varβ the frame buffer variable screen structure π (this is the thing you're asking her to vibe-check)infoβ the frame buffer structure that represents a single frame buffer π«Ά
π₯ DESCRIPTION π₯
So here's the deal π β she checks to see if the hardware actually supports the state requested by the var you passed in. That's it. That's the whole errand.
β οΈ This function does not alter the hardware state!!! Like, for real, not even a little. π¨
Which means: the data stored in struct fb_info and struct atmel_lcdfb_info do not change. And yes, that includes the var inside of struct fb_info. Do NOT change these. π Not a suggestion, bestie, that's the rule.
The cute part? You can call this function on its own if your whole intent is to only test a mode and not actually set it β slay, a dry run β¨. The stuff in modedb.c is an example of exactly this, iykyk.
And if the var you pass in is slightly off from what the hardware can actually support, then we alter the var PASSED in to what we can do. Iconic behavior, honestly π.
Now the boundary conditions, pay attention π§:
- If the hardware doesn't support mode change, a
-EINVALwill be returned by the upper layers. In that case you don't need to implement this function at all. Zero pressure. π - If your hardware doesn't support changing the resolution, then this function isn't needed either. In this case the driver would just provide a
varthat represents the static state the screen is in. Static queen behavior π.
Returns negative errno on error, or zero on success. β
π SEE ALSO π
- Kernel file
./drivers/video/fbdev/atmel_lcdfb.c atmel_lcdfb_alloc_video_memory(9)atmel_lcdfb_set_par(9)atmel_lcdfb_setcolreg(9)
and that's the tea π β this lil group chat lives in ./drivers/video/fbdev, version October 2026, and the whole thing is filed under atmel_lcdfb_check_var(9). go be great, 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