From: Geert U. <ge...@li...> - 2001-06-13 16:06:09
|
On Wed, 13 Jun 2001, James Simmons wrote: > > So i suppose saying fbset -depth 15 could be done to switch the fb to > > RGBA5551 mode ? > > > > BTW, what is fbset -depth 24 supposed to do, especially if the chip only > > support 8, 16, and 32 bpp ? > > fb_set_var should be done in two parts. The first part checks the purposed > var and sees if the hardware can support it. The second part should set > the resolution if the mode is supported. This is what I have done for the > new api. Basically we have something like this: > > int fb_set_var(struct fb_var_screeninfo *var, struct fb_info *info) > { > int oldbpp, err; > > if (memcmp(&info->var, var, sizeof(var))) { > if ((err = info->fbops->fb_check_var(var, info))) > return err; This is not correct, since it first overwrites the old var, then checks whether the new one is valid. If that test fails, you're left with an invalid var in info->var. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |