From: James S. <jsi...@tr...> - 2001-06-13 15:47:45
|
> 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; if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) { oldbpp = info->var.bits_per_pixel; info->var = *var; if (info->fbops->fb_set_par) info->fbops->fb_set_par(info); if (info->cursor.enable) { info->cursor.set = FB_CUR_SETALL; info->fbops->fb_cursor(info, &info->cursor); } if (oldbpp != var->bits_per_pixel) { if ((err = fb_alloc_cmap(&info->cmap, 0, 0))) return err; fb_set_cmap(&info->cmap, 1, info); } } var->activate = 0; } return 0; } > should only fbset -depth 32 be supported ? If that is all the card can support then yes. Say you pass a var that is correct in everyway except for the depth then you could have the check_var funciton alter the var and pass it back to userland (by changing var.activate). This way if userland does a FB_ACTIVATE_TEST check_var only gets called when testing the mode. Yes it is for 2.5.X but current drivers could follow a similar layout now. It will also save much work in porting stuff over when 2.5.X comes out. > Also, i am experiencing some (maybe hardware) bugs, and would like to reset > the graphic chip. Is there an existing way to do this kind of stuff via ioctl > ore such (sure i could do it by hand under root, but i don't think fbcon/fbdev > would be really happy with it). Not really. You could make it reset the card when unloading the module. Log in remotely or use a serial console to do this. In theory when you run the program reset. It should reset your console back to the default mode. Unfortunely the console system doesn't work that way :-( |