|
From: Geert U. <ge...@li...> - 2002-02-15 16:07:07
|
On 15 Feb 2002, Emmanuel Michon wrote:
> all fb implementations I find so far fill the disp
> field:
> fb_info.disp = &disp; /* used during initialization */
> with a
> static struct display disp;
>
> and enable only one framebuffer device.
E.g. atyfb doesn't use a static struct display, but
disp = &info->disp
> I'm writing code that allows one fb per pci device; and I
> have to support multiple ones. Should I extend fb_info like this:
>
> struct moreinfo {
> struct fb_info fb;
> static struct display disp;
> struct pci_dev *pdev;
> };
>
> static int vfb_getcolreg(u_int regno, u_int *red, u_int *green, u_int *blue,
> u_int *transp, struct fb_info *info)
> {
> struct moreinfo *my=(struct moreinfo *)info;
> ...
> }
>
> and set during init:
> my->fb.disp=&my->disp;
Exactly.
> or is it enough to have one real struct display for all of them?
No, each head needs its own struct display.
> Seems disp has a dispsw member that has to change on a per fb basis.
Yes, since dispsw depends on the video mode. If you support multiple devices,
they can be in different video modes.
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
|