Re: [PATCH] Add new linearfb driver

From: Geert Uytterhoeven
Date: Wed Aug 25 2010 - 16:22:54 EST


On Wed, Aug 25, 2010 at 16:11, Colin Watson <cjwatson@xxxxxxxxxxxxx> wrote:
> Split out linearfb from efifb so that boot loaders can program it as a
> simple linear framebuffer on non-EFI systems. ÂThis is useful for boot
> loaders with their own graphics drivers, e.g. GRUB 2, since in some
> cases on x86 they can set up non-VESA modes and thus can't program
> vesafb.

Nice! I guess offb and a few other old drivers could use it, too.

> diff --git a/drivers/video/linearfb.c b/drivers/video/linearfb.c
> new file mode 100644
> index 0000000..c93eaac
> --- /dev/null
> +++ b/drivers/video/linearfb.c

> +int linearfb_get_info(struct platform_device *dev, struct fb_info **p_info)
> +{
> + Â Â Â int err;
> + Â Â Â unsigned int size_vmode;
> + Â Â Â unsigned int size_remap;
> + Â Â Â unsigned int size_total;
> + Â Â Â int request_succeeded = 0;
> + Â Â Â struct fb_info *info;
> +
> + Â Â Â if (!screen_info.lfb_depth)
> + Â Â Â Â Â Â Â screen_info.lfb_depth = 32;
> + Â Â Â if (!screen_info.pages)
> + Â Â Â Â Â Â Â screen_info.pages = 1;
> + Â Â Â if (!screen_info.lfb_base) {
> + Â Â Â Â Â Â Â printk(KERN_DEBUG "linearfb: invalid framebuffer address\n");
> + Â Â Â Â Â Â Â return -ENODEV;
> + Â Â Â }

[...]

Wouldn't it be more logical to extract this info somewhere from the
platform_device's
platform_data? Screen_info is such a legacy thing.
That way linearfb can support multiple displays as well.

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/