2002-10-30 16:50:08

by Denis Oliver Kropp

[permalink] [raw]
Subject: [PATCH] 2.5.44 - neofb-0.4


Changes:

- Toshiba Libretto support
- allow modes larger than LCD size if LCD is disabled
- keep BIOS settings if internal/external display haven't been enabled explicitly

(all changes by Thomas J. Moore <[email protected]>)


--
Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"

Convergence GmbH


Attachments:
(No filename) (489.00 B)
linux-2.4.20-rc1-neofb-0.4.patch (6.81 kB)
Download all attachments

2002-10-31 03:52:46

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] 2.5.44 - neofb-0.4

Em Wed, Oct 30, 2002 at 05:56:21PM +0100, Denis Oliver Kropp escreveu:
> diff -Naur linux-2.4.20-rc1/drivers/video/neofb.c linux-2.4.20-rc1-neofb-0.4/drivers/video/neofb.c
> --- linux-2.4.20-rc1/drivers/video/neofb.c 2002-10-30 15:20:39.000000000 +0100
> +++ linux-2.4.20-rc1-neofb-0.4/drivers/video/neofb.c 2002-10-30 15:49:30.000000000 +0100
> static int disabled = 0;
> static int internal = 0;
> static int external = 0;
> +static int libretto = 0;
> static int nostretch = 0;
> static int nopciburst = 0;

Could you just leave those globas uninitialized? That way it goes to the .bss
that will get zeroed anyway and the image will be slightly smaller.

> +static struct fb_var_screeninfo __devinitdata neofb_var800x480x8 = {
> + accel_flags: FB_ACCELF_TEXT,
> + xres: 800,
> + yres: 480,
> + xres_virtual: 800,
> + yres_virtual: 30000,
> + bits_per_pixel: 8,
> + pixclock: 25000,
> + left_margin: 88,
> + right_margin: 40,
> + upper_margin: 23,
> + lower_margin: 1,
> + hsync_len: 128,
> + vsync_len: 4,
> + sync: FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
> + vmode: FB_VMODE_NONINTERLACED
> +};

Please use ANSI C designated elements style, also supported by gcc and
that was the reason for massive conversion all over the kernel, it should
look like this:

static struct fb_var_screeninfo __devinitdata neofb_var800x480x8 = {
.accel_flags = FB_ACCELF_TEXT,
.xres = 800,
.yres = 480,
<snip>

> static struct fb_var_screeninfo __devinitdata neofb_var1024x768x8 = {
> accel_flags: FB_ACCELF_TEXT,
> xres: 1024,

ditto