Add chronicle.
[vga2scart.git] / patches / fb-radeon-intel.patch
1 diff -ur ../../../../build_i386_none_686.org/.config ./.config
2 --- ../../../../build_i386_none_686.org/.config 2009-02-09 20:04:19.000000000 +0100
3 +++ ./.config   2009-02-09 20:33:51.000000000 +0100
4 @@ -1,7 +1,7 @@
5  #
6  # Automatically generated make config: don't edit
7  # Linux kernel version: 2.6.26
8 -# Mon Feb  9 20:04:19 2009
9 +# Mon Feb  9 20:33:51 2009
10  #
11  # CONFIG_64BIT is not set
12  CONFIG_X86_32=y
13 @@ -2440,11 +2440,11 @@
14  CONFIG_TCG_INFINEON=m
15  CONFIG_TELCLOCK=m
16  CONFIG_DEVPORT=y
17 -CONFIG_I2C=m
18 +CONFIG_I2C=y
19  CONFIG_I2C_BOARDINFO=y
20  CONFIG_I2C_CHARDEV=m
21  CONFIG_I2C_HELPER_AUTO=y
22 -CONFIG_I2C_ALGOBIT=m
23 +CONFIG_I2C_ALGOBIT=y
24  CONFIG_I2C_ALGOPCA=m
25  
26  #
27 @@ -2998,12 +2998,12 @@
28  #
29  # Graphics support
30  #
31 -CONFIG_AGP=m
32 +CONFIG_AGP=y
33  CONFIG_AGP_ALI=m
34  CONFIG_AGP_ATI=m
35  CONFIG_AGP_AMD=m
36  CONFIG_AGP_AMD64=m
37 -CONFIG_AGP_INTEL=m
38 +CONFIG_AGP_INTEL=y
39  CONFIG_AGP_NVIDIA=m
40  CONFIG_AGP_SIS=m
41  CONFIG_AGP_SWORKS=m
42 @@ -3024,7 +3024,7 @@
43  CONFIG_VIDEO_OUTPUT_CONTROL=m
44  CONFIG_FB=y
45  CONFIG_FIRMWARE_EDID=y
46 -CONFIG_FB_DDC=m
47 +CONFIG_FB_DDC=y
48  CONFIG_FB_CFB_FILLRECT=y
49  CONFIG_FB_CFB_COPYAREA=y
50  CONFIG_FB_CFB_IMAGEBLIT=y
51 @@ -3070,7 +3070,7 @@
52  # CONFIG_FB_I810_GTF is not set
53  CONFIG_FB_LE80578=m
54  CONFIG_FB_CARILLO_RANCH=m
55 -CONFIG_FB_INTEL=m
56 +CONFIG_FB_INTEL=y
57  # CONFIG_FB_INTEL_DEBUG is not set
58  CONFIG_FB_INTEL_I2C=y
59  CONFIG_FB_MATROX=m
60 @@ -3080,8 +3080,8 @@
61  CONFIG_FB_MATROX_I2C=m
62  CONFIG_FB_MATROX_MAVEN=m
63  CONFIG_FB_MATROX_MULTIHEAD=y
64 -CONFIG_FB_RADEON=m
65 -CONFIG_FB_RADEON_I2C=y
66 +CONFIG_FB_RADEON=y
67 +# CONFIG_FB_RADEON_I2C is not set
68  CONFIG_FB_RADEON_BACKLIGHT=y
69  # CONFIG_FB_RADEON_DEBUG is not set
70  CONFIG_FB_ATY128=m
71 @@ -3144,7 +3144,10 @@
72  # CONFIG_FONTS is not set
73  CONFIG_FONT_8x8=y
74  CONFIG_FONT_8x16=y
75 -# CONFIG_LOGO is not set
76 +CONFIG_LOGO=y
77 +CONFIG_LOGO_LINUX_MONO=y
78 +CONFIG_LOGO_LINUX_VGA16=y
79 +CONFIG_LOGO_LINUX_CLUT224=y
80  
81  #
82  # Sound
83 diff -ur ../../../../build_i386_none_686.org/drivers/video/aty/radeon_base.c ./drivers/video/aty/radeon_base.c
84 --- ../../../../build_i386_none_686.org/drivers/video/aty/radeon_base.c 2008-07-13 23:51:29.000000000 +0200
85 +++ ./drivers/video/aty/radeon_base.c   2009-02-10 12:37:43.000000000 +0100
86 @@ -678,6 +678,9 @@
87                 rinfo->pll.ppll_max     = BIOS_IN32(pll_info_block + 0x16);
88  
89                 printk(KERN_INFO "radeonfb: Retrieved PLL infos from BIOS\n");
90 +               printk(KERN_INFO "radeonfb: disregarding BIOS ppll_min of %d\n", rinfo->pll.ppll_min);
91 +               rinfo->pll.ppll_min = 12000;
92 +               printk(KERN_INFO "radeonfb: using ppll_min of %d instead\n", rinfo->pll.ppll_min);
93                 goto found;
94         }
95  
96 @@ -1655,6 +1658,17 @@
97                                         CRTC_CRT_ON;
98         }
99  
100 +       /*
101 +        * if you want to combine interlaced output 
102 +        * with composite sync (not recommended)
103 +        * you must uncomment CRTC_CSYNC_EN flag
104 +        */
105 +#define CRTC_CSYNC_EN (1 << 4)
106 +
107 +       if (mode->vmode & FB_VMODE_INTERLACED) {
108 +           newmode->crtc_gen_cntl |= CRTC_INTERLACE_EN /*| CRTC_CSYNC_EN*/;
109 +       }
110 +
111         newmode->dac_cntl = /* INREG(DAC_CNTL) | */ DAC_MASK_ALL | DAC_VGA_ADR_EN |
112                            DAC_8BIT_EN;
113  
114 diff -ur ../../../../build_i386_none_686.org/drivers/video/intelfb/intelfbdrv.c ./drivers/video/intelfb/intelfbdrv.c
115 --- ../../../../build_i386_none_686.org/drivers/video/intelfb/intelfbdrv.c      2008-07-13 23:51:29.000000000 +0200
116 +++ ./drivers/video/intelfb/intelfbdrv.c        2009-02-10 12:15:47.000000000 +0100
117 @@ -1359,6 +1359,19 @@
118         DBG_MSG("intelfb_set_par (%dx%d-%d)\n", info->var.xres,
119                 info->var.yres, info->var.bits_per_pixel);
120  
121 +       /*
122 +        * we dont restrict this fix to our interlaced
123 +        * 800 x 520 mode. other modes need it too.
124 +        */
125 +       /*if (dinfo->chipset == INTEL_945G
126 +        && info->var.xres == 800
127 +        && info->var.yres == 520
128 +        && var_to_refresh(&info->var) == 25
129 +        && info->var.vmode & FB_VMODE_INTERLACED) {*/
130 +
131 +           WRN_MSG("disabled DPLL_A VCO for interlaced mode 800x520@50i\n");
132 +           OUTREG(DPLL_A, INREG(DPLL_A) & ~DPLL_VCO_ENABLE);
133 +       /*}*/
134         intelfb_blank(FB_BLANK_POWERDOWN, info);
135  
136         if (ACCEL(dinfo, info))
137 diff -ur ../../../../build_i386_none_686.org/drivers/video/intelfb/intelfbhw.c ./drivers/video/intelfb/intelfbhw.c
138 --- ../../../../build_i386_none_686.org/drivers/video/intelfb/intelfbhw.c       2008-07-13 23:51:29.000000000 +0200
139 +++ ./drivers/video/intelfb/intelfbhw.c 2009-02-09 20:33:23.000000000 +0100
140 @@ -353,6 +353,12 @@
141  
142         /* Check if clock is OK. */
143         tmp = 1000000000 / var->pixclock;
144 +
145 +       WRN_MSG("lowered MIN_CLOCK from %d MHz -> ", MIN_CLOCK / 1000);
146 +#undef MIN_CLOCK
147 +#define MIN_CLOCK 12000
148 +       printk("%d MHz\n", MIN_CLOCK / 1000);
149 +
150         if (tmp < MIN_CLOCK) {
151                 WRN_MSG("Pixel clock is too low (%d MHz vs %d MHz).\n",
152                         (tmp + 500) / 1000, MIN_CLOCK / 1000);
153 diff -ur ../../../../build_i386_none_686.org/drivers/video/modedb.c ./drivers/video/modedb.c
154 --- ../../../../build_i386_none_686.org/drivers/video/modedb.c  2008-07-13 23:51:29.000000000 +0200
155 +++ ./drivers/video/modedb.c    2009-02-09 20:33:23.000000000 +0100
156 @@ -264,6 +264,14 @@
157         /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
158         NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
159         0, FB_VMODE_NONINTERLACED
160 +    }, {
161 +       /* 720x576i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
162 +       NULL, 50, 720, 576, 74074, 64, 16, 39, 5, 64, 5, 
163 +       0, FB_VMODE_INTERLACED
164 +    }, {
165 +       /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
166 +       NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5, 
167 +       0, FB_VMODE_INTERLACED
168      },
169  };
170