]> git.pld-linux.org Git - packages/kernel.git/blob - linux-tdfxfb-interlace+double.patch
+CONFIG_IP_NF_MATCH_LAYER7=m
[packages/kernel.git] / linux-tdfxfb-interlace+double.patch
1 This patch adds interlace and double-scan mode support to tdfxfb in 2.6.
2 It's a port of my changes (incorporated into 2.4.21) to Linux 2.6.
3
4         -- Jakub Bogusz <qboosh@pld-linux.org>
5
6 --- linux-2.6.0-test3/include/video/tdfx.h.orig 2003-07-14 05:32:41.000000000 +0200
7 +++ linux-2.6.0-test3/include/video/tdfx.h      2003-08-09 21:28:04.000000000 +0200
8 @@ -114,6 +114,7 @@
9  #define VGAINIT1_MASK                   0x1fffff
10  #define VIDCFG_VIDPROC_ENABLE           BIT(0)
11  #define VIDCFG_CURS_X11                 BIT(1)
12 +#define VIDCFG_INTERLACE                BIT(3)
13  #define VIDCFG_HALF_MODE                BIT(4)
14  #define VIDCFG_DESK_ENABLE              BIT(7)
15  #define VIDCFG_CLUT_BYPASS              BIT(10)
16 --- linux-2.6.0-test3/drivers/video/tdfxfb.c.orig       2003-08-09 21:26:11.000000000 +0200
17 +++ linux-2.6.0-test3/drivers/video/tdfxfb.c    2003-08-09 22:52:20.000000000 +0200
18 @@ -508,8 +508,10 @@
19                 return -EINVAL;
20         }
21  
22 -       /* fixme: does Voodoo3 support interlace? Banshee doesn't */
23 -       if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) {
24 +       /* Banshee doesn't support interlace, but Voodoo4/5 and probably Voodoo3 do. */
25 +       /* no direct information about device id now? use max_pixclock for this... */
26 +       if (((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) &&
27 +                       (par->max_pixclock < VOODOO3_MAX_PIXCLOCK)) {
28                 DPRINTK("interlace not supported\n");
29                 return -EINVAL;
30         }
31 @@ -616,10 +618,17 @@
32         hbs = hd;
33         hbe = ht;
34  
35 -       vbs = vd = info->var.yres - 1;
36 -       vs  = vd + info->var.lower_margin;
37 -       ve  = vs + info->var.vsync_len;
38 -       vbe = vt = ve + info->var.upper_margin - 1;
39 +       if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
40 +               vbs = vd = (info->var.yres << 1) - 1;
41 +               vs  = vd + (info->var.lower_margin << 1);
42 +               ve  = vs + (info->var.vsync_len << 1);
43 +               vbe = vt = ve + (info->var.upper_margin << 1) - 1;
44 +       } else {
45 +               vbs = vd = info->var.yres - 1;
46 +               vs  = vd + info->var.lower_margin;
47 +               ve  = vs + info->var.vsync_len;
48 +               vbe = vt = ve + info->var.upper_margin - 1;
49 +       }
50    
51         /* this is all pretty standard VGA register stuffing */
52         reg.misc[0x00] = 0x0f | 
53 @@ -742,8 +751,16 @@
54         reg.gfxpll = do_calc_pll(..., &fout);
55  #endif
56  
57 -       reg.screensize = info->var.xres | (info->var.yres << 12);
58 -       reg.vidcfg &= ~VIDCFG_HALF_MODE;
59 +       if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) {
60 +               reg.screensize = info->var.xres | (info->var.yres << 13);
61 +               reg.vidcfg |= VIDCFG_HALF_MODE;
62 +               reg.crt[0x09] |= 0x80;
63 +       } else {
64 +               reg.screensize = info->var.xres | (info->var.yres << 12);
65 +               reg.vidcfg &= ~VIDCFG_HALF_MODE;
66 +       }
67 +       if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED)
68 +               reg.vidcfg |= VIDCFG_INTERLACE;
69         reg.miscinit0 = tdfx_inl(par, MISCINIT0);
70  
71  #if defined(__BIG_ENDIAN)
This page took 0.058878 seconds and 3 git commands to generate.