|
From: Geert U. <ge...@li...> - 2003-01-09 09:33:50
|
On Thu, 9 Jan 2003, James Simmons wrote:
> > How is a driver supposed to set the default mode on init lately ?
> >
> > Looking at rivafb, it fills info->var from fb_find_mode with the mode
> > option if any, but then does nothing with it (and does nothing if
> > no mode option is passed).
> >
> > On radeonfb, I fill a var with the default mode obtained
> > from EDID or the option if any. Then, I basically do
> >
> > info->var = var;
> > var.activate = FB_ACTIVATE_NOW;
> > fb_set_var(&var, info);
> >
> > before calling register_framebuffer.
> >
> > What is the right way to do ?
>
> Sorry about the confusion. The answer depends on the driver. For the
> rivafb driver because it has a VGA core we have it NOT switch to a
> graphics state. The reason is
>
>
> 1) If we run a /dev/fb app was can save the hardware text mode state and
> restore it on closing /dev/fb. You can see this in rivafb_open and
> rivafb_release.
>
> 2) We can test loading it as a module as see debugging info while still
> having a VGA text mode. Makes life a little easier. The other thing
> I like to do is run mdacon and just the fbdev driver by itself. I can
> then test the fbdev driver. When I get really brave I test fbcon.c and
> can debug it.
>
> Now for graphics hardware built in that has no hardware text mode. It is
> better to set the video mode right away.
Note: on some platforms graphics chips with VGA cores are _not_ initialized to
VGA mode by the firmware. So great care should be taken when not explicitly
switching to graphics mode on those platforms.
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
|