atmel_lcdfb_check_var(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 -EINVAL will 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 var that represents the static state the screen is in. Static queen behavior 🌈.

Returns negative errno on error, or zero on success. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘


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