aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/aty/radeon_base.c10
-rw-r--r--drivers/video/backlight/backlight.c2
-rw-r--r--drivers/video/backlight/lcd.c2
-rw-r--r--drivers/video/console/Kconfig2
-rw-r--r--drivers/video/kyro/STG4000InitDevice.c5
-rw-r--r--drivers/video/matrox/matroxfb_base.c4
-rw-r--r--drivers/video/matrox/matroxfb_crtc2.h2
-rw-r--r--drivers/video/pvr2fb.c101
-rw-r--r--drivers/video/sis/sis_main.c2
-rw-r--r--drivers/video/sstfb.c2
-rw-r--r--drivers/video/tgafb.c3
11 files changed, 63 insertions, 72 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 2ce050193018..2349e71b0083 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2102,7 +2102,9 @@ static ssize_t radeon_show_one_edid(char *buf, loff_t off, size_t count, const u
2102} 2102}
2103 2103
2104 2104
2105static ssize_t radeon_show_edid1(struct kobject *kobj, char *buf, loff_t off, size_t count) 2105static ssize_t radeon_show_edid1(struct kobject *kobj,
2106 struct bin_attribute *bin_attr,
2107 char *buf, loff_t off, size_t count)
2106{ 2108{
2107 struct device *dev = container_of(kobj, struct device, kobj); 2109 struct device *dev = container_of(kobj, struct device, kobj);
2108 struct pci_dev *pdev = to_pci_dev(dev); 2110 struct pci_dev *pdev = to_pci_dev(dev);
@@ -2113,7 +2115,9 @@ static ssize_t radeon_show_edid1(struct kobject *kobj, char *buf, loff_t off, si
2113} 2115}
2114 2116
2115 2117
2116static ssize_t radeon_show_edid2(struct kobject *kobj, char *buf, loff_t off, size_t count) 2118static ssize_t radeon_show_edid2(struct kobject *kobj,
2119 struct bin_attribute *bin_attr,
2120 char *buf, loff_t off, size_t count)
2117{ 2121{
2118 struct device *dev = container_of(kobj, struct device, kobj); 2122 struct device *dev = container_of(kobj, struct device, kobj);
2119 struct pci_dev *pdev = to_pci_dev(dev); 2123 struct pci_dev *pdev = to_pci_dev(dev);
@@ -2126,7 +2130,6 @@ static ssize_t radeon_show_edid2(struct kobject *kobj, char *buf, loff_t off, si
2126static struct bin_attribute edid1_attr = { 2130static struct bin_attribute edid1_attr = {
2127 .attr = { 2131 .attr = {
2128 .name = "edid1", 2132 .name = "edid1",
2129 .owner = THIS_MODULE,
2130 .mode = 0444, 2133 .mode = 0444,
2131 }, 2134 },
2132 .size = EDID_LENGTH, 2135 .size = EDID_LENGTH,
@@ -2136,7 +2139,6 @@ static struct bin_attribute edid1_attr = {
2136static struct bin_attribute edid2_attr = { 2139static struct bin_attribute edid2_attr = {
2137 .attr = { 2140 .attr = {
2138 .name = "edid2", 2141 .name = "edid2",
2139 .owner = THIS_MODULE,
2140 .mode = 0444, 2142 .mode = 0444,
2141 }, 2143 },
2142 .size = EDID_LENGTH, 2144 .size = EDID_LENGTH,
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index c65e81ff3578..7e06223bca94 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -172,7 +172,7 @@ static struct class backlight_class = {
172 172
173#define DECLARE_ATTR(_name,_mode,_show,_store) \ 173#define DECLARE_ATTR(_name,_mode,_show,_store) \
174{ \ 174{ \
175 .attr = { .name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \ 175 .attr = { .name = __stringify(_name), .mode = _mode }, \
176 .show = _show, \ 176 .show = _show, \
177 .store = _store, \ 177 .store = _store, \
178} 178}
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index 6ef8f0a7a137..648b53c1fdea 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -157,7 +157,7 @@ static struct class lcd_class = {
157 157
158#define DECLARE_ATTR(_name,_mode,_show,_store) \ 158#define DECLARE_ATTR(_name,_mode,_show,_store) \
159{ \ 159{ \
160 .attr = { .name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \ 160 .attr = { .name = __stringify(_name), .mode = _mode }, \
161 .show = _show, \ 161 .show = _show, \
162 .store = _store, \ 162 .store = _store, \
163} 163}
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 63b85bf81a65..d3b8a6be2916 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -6,7 +6,7 @@ menu "Console display driver support"
6 6
7config VGA_CONSOLE 7config VGA_CONSOLE
8 bool "VGA text console" if EMBEDDED || !X86 8 bool "VGA text console" if EMBEDDED || !X86
9 depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH 9 depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BFIN
10 default y 10 default y
11 help 11 help
12 Saying Y here will allow you to use Linux in text mode through a 12 Saying Y here will allow you to use Linux in text mode through a
diff --git a/drivers/video/kyro/STG4000InitDevice.c b/drivers/video/kyro/STG4000InitDevice.c
index ab5285a7f1d6..1d3f2080aa6f 100644
--- a/drivers/video/kyro/STG4000InitDevice.c
+++ b/drivers/video/kyro/STG4000InitDevice.c
@@ -247,7 +247,6 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
247 u32 ulCoreClock; 247 u32 ulCoreClock;
248 u32 tmp; 248 u32 tmp;
249 u32 ulChipSpeed; 249 u32 ulChipSpeed;
250 u8 rev;
251 250
252 STG_WRITE_REG(IntMask, 0xFFFF); 251 STG_WRITE_REG(IntMask, 0xFFFF);
253 252
@@ -276,9 +275,9 @@ int SetCoreClockPLL(volatile STG4000REG __iomem *pSTGReg, struct pci_dev *pDev)
276 PMX2_SOFTRESET_ROM_RST); 275 PMX2_SOFTRESET_ROM_RST);
277 276
278 pci_read_config_word(pDev, PCI_CONFIG_SUBSYS_ID, &sub); 277 pci_read_config_word(pDev, PCI_CONFIG_SUBSYS_ID, &sub);
279 pci_read_config_byte(pDev, PCI_REVISION_ID, &rev);
280 278
281 ulChipSpeed = InitSDRAMRegisters(pSTGReg, (u32)sub, (u32)rev); 279 ulChipSpeed = InitSDRAMRegisters(pSTGReg, (u32)sub,
280 (u32)pDev->revision);
282 281
283 if (ulChipSpeed == 0) 282 if (ulChipSpeed == 0)
284 return -EINVAL; 283 return -EINVAL;
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index c8559a756b75..886e475f22f2 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -1994,7 +1994,6 @@ static void matroxfb_unregister_device(struct matrox_fb_info* minfo) {
1994 1994
1995static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dummy) { 1995static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dummy) {
1996 struct board* b; 1996 struct board* b;
1997 u_int8_t rev;
1998 u_int16_t svid; 1997 u_int16_t svid;
1999 u_int16_t sid; 1998 u_int16_t sid;
2000 struct matrox_fb_info* minfo; 1999 struct matrox_fb_info* minfo;
@@ -2005,11 +2004,10 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
2005#endif 2004#endif
2006 DBG(__FUNCTION__) 2005 DBG(__FUNCTION__)
2007 2006
2008 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
2009 svid = pdev->subsystem_vendor; 2007 svid = pdev->subsystem_vendor;
2010 sid = pdev->subsystem_device; 2008 sid = pdev->subsystem_device;
2011 for (b = dev_list; b->vendor; b++) { 2009 for (b = dev_list; b->vendor; b++) {
2012 if ((b->vendor != pdev->vendor) || (b->device != pdev->device) || (b->rev < rev)) continue; 2010 if ((b->vendor != pdev->vendor) || (b->device != pdev->device) || (b->rev < pdev->revision)) continue;
2013 if (b->svid) 2011 if (b->svid)
2014 if ((b->svid != svid) || (b->sid != sid)) continue; 2012 if ((b->svid != svid) || (b->sid != sid)) continue;
2015 break; 2013 break;
diff --git a/drivers/video/matrox/matroxfb_crtc2.h b/drivers/video/matrox/matroxfb_crtc2.h
index 608e40bb20e9..177177609be7 100644
--- a/drivers/video/matrox/matroxfb_crtc2.h
+++ b/drivers/video/matrox/matroxfb_crtc2.h
@@ -2,8 +2,6 @@
2#define __MATROXFB_CRTC2_H__ 2#define __MATROXFB_CRTC2_H__
3 3
4#include <linux/ioctl.h> 4#include <linux/ioctl.h>
5#include <linux/i2c.h>
6#include <linux/i2c-algo-bit.h>
7#include "matroxfb_base.h" 5#include "matroxfb_base.h"
8 6
9struct matroxfb_dh_fb_info { 7struct matroxfb_dh_fb_info {
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index df2909ae704c..2ba959a83eb0 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -115,11 +115,11 @@ enum { VO_PAL, VO_NTSC, VO_VGA };
115enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 }; 115enum { PAL_ARGB1555, PAL_RGB565, PAL_ARGB4444, PAL_ARGB8888 };
116 116
117struct pvr2_params { unsigned int val; char *name; }; 117struct pvr2_params { unsigned int val; char *name; };
118static struct pvr2_params cables[] __initdata = { 118static struct pvr2_params cables[] __devinitdata = {
119 { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" }, 119 { CT_VGA, "VGA" }, { CT_RGB, "RGB" }, { CT_COMPOSITE, "COMPOSITE" },
120}; 120};
121 121
122static struct pvr2_params outputs[] __initdata = { 122static struct pvr2_params outputs[] __devinitdata = {
123 { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" }, 123 { VO_PAL, "PAL" }, { VO_NTSC, "NTSC" }, { VO_VGA, "VGA" },
124}; 124};
125 125
@@ -147,16 +147,16 @@ static struct pvr2fb_par {
147 147
148static struct fb_info *fb_info; 148static struct fb_info *fb_info;
149 149
150static struct fb_fix_screeninfo pvr2_fix __initdata = { 150static struct fb_fix_screeninfo pvr2_fix __devinitdata = {
151 .id = "NEC PowerVR2", 151 .id = "NEC PowerVR2",
152 .type = FB_TYPE_PACKED_PIXELS, 152 .type = FB_TYPE_PACKED_PIXELS,
153 .visual = FB_VISUAL_TRUECOLOR, 153 .visual = FB_VISUAL_TRUECOLOR,
154 .ypanstep = 1, 154 .ypanstep = 1,
155 .ywrapstep = 1, 155 .ywrapstep = 1,
156 .accel = FB_ACCEL_NONE, 156 .accel = FB_ACCEL_NONE,
157}; 157};
158 158
159static struct fb_var_screeninfo pvr2_var __initdata = { 159static struct fb_var_screeninfo pvr2_var __devinitdata = {
160 .xres = 640, 160 .xres = 640,
161 .yres = 480, 161 .yres = 480,
162 .xres_virtual = 640, 162 .xres_virtual = 640,
@@ -195,10 +195,6 @@ static unsigned int shdma = PVR2_CASCADE_CHAN;
195static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS; 195static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
196#endif 196#endif
197 197
198/* Interface used by the world */
199
200int pvr2fb_setup(char*);
201
202static int pvr2fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green, unsigned int blue, 198static int pvr2fb_setcolreg(unsigned int regno, unsigned int red, unsigned int green, unsigned int blue,
203 unsigned int transp, struct fb_info *info); 199 unsigned int transp, struct fb_info *info);
204static int pvr2fb_blank(int blank, struct fb_info *info); 200static int pvr2fb_blank(int blank, struct fb_info *info);
@@ -227,12 +223,12 @@ static struct fb_ops pvr2fb_ops = {
227#ifdef CONFIG_SH_DMA 223#ifdef CONFIG_SH_DMA
228 .fb_write = pvr2fb_write, 224 .fb_write = pvr2fb_write,
229#endif 225#endif
230 .fb_fillrect = cfb_fillrect, 226 .fb_fillrect = cfb_fillrect,
231 .fb_copyarea = cfb_copyarea, 227 .fb_copyarea = cfb_copyarea,
232 .fb_imageblit = cfb_imageblit, 228 .fb_imageblit = cfb_imageblit,
233}; 229};
234 230
235static struct fb_videomode pvr2_modedb[] __initdata = { 231static struct fb_videomode pvr2_modedb[] __devinitdata = {
236 /* 232 /*
237 * Broadcast video modes (PAL and NTSC). I'm unfamiliar with 233 * Broadcast video modes (PAL and NTSC). I'm unfamiliar with
238 * PAL-M and PAL-N, but from what I've read both modes parallel PAL and 234 * PAL-M and PAL-N, but from what I've read both modes parallel PAL and
@@ -252,7 +248,7 @@ static struct fb_videomode pvr2_modedb[] __initdata = {
252 /* 640x480 @ 60hz (VGA) */ 248 /* 640x480 @ 60hz (VGA) */
253 "vga_640x480", 60, 640, 480, VGA_CLK, 38, 33, 0, 18, 146, 26, 249 "vga_640x480", 60, 640, 480, VGA_CLK, 38, 33, 0, 18, 146, 26,
254 0, FB_VMODE_YWRAP 250 0, FB_VMODE_YWRAP
255 }, 251 },
256}; 252};
257 253
258#define NUM_TOTAL_MODES ARRAY_SIZE(pvr2_modedb) 254#define NUM_TOTAL_MODES ARRAY_SIZE(pvr2_modedb)
@@ -262,7 +258,7 @@ static struct fb_videomode pvr2_modedb[] __initdata = {
262#define DEFMODE_VGA 2 258#define DEFMODE_VGA 2
263 259
264static int defmode = DEFMODE_NTSC; 260static int defmode = DEFMODE_NTSC;
265static char *mode_option __initdata = NULL; 261static char *mode_option __devinitdata = NULL;
266 262
267static inline void pvr2fb_set_pal_type(unsigned int type) 263static inline void pvr2fb_set_pal_type(unsigned int type)
268{ 264{
@@ -293,7 +289,7 @@ static void set_color_bitfields(struct fb_var_screeninfo *var)
293{ 289{
294 switch (var->bits_per_pixel) { 290 switch (var->bits_per_pixel) {
295 case 16: /* RGB 565 */ 291 case 16: /* RGB 565 */
296 pvr2fb_set_pal_type(PAL_RGB565); 292 pvr2fb_set_pal_type(PAL_RGB565);
297 var->red.offset = 11; var->red.length = 5; 293 var->red.offset = 11; var->red.length = 5;
298 var->green.offset = 5; var->green.length = 6; 294 var->green.offset = 5; var->green.length = 6;
299 var->blue.offset = 0; var->blue.length = 5; 295 var->blue.offset = 0; var->blue.length = 5;
@@ -306,7 +302,7 @@ static void set_color_bitfields(struct fb_var_screeninfo *var)
306 var->transp.offset = 0; var->transp.length = 0; 302 var->transp.offset = 0; var->transp.length = 0;
307 break; 303 break;
308 case 32: /* ARGB 8888 */ 304 case 32: /* ARGB 8888 */
309 pvr2fb_set_pal_type(PAL_ARGB8888); 305 pvr2fb_set_pal_type(PAL_ARGB8888);
310 var->red.offset = 16; var->red.length = 8; 306 var->red.offset = 16; var->red.length = 8;
311 var->green.offset = 8; var->green.length = 8; 307 var->green.offset = 8; var->green.length = 8;
312 var->blue.offset = 0; var->blue.length = 8; 308 var->blue.offset = 0; var->blue.length = 8;
@@ -379,13 +375,13 @@ static int pvr2fb_set_par(struct fb_info *info)
379 var->vmode &= FB_VMODE_MASK; 375 var->vmode &= FB_VMODE_MASK;
380 if (var->vmode & FB_VMODE_INTERLACED && video_output != VO_VGA) 376 if (var->vmode & FB_VMODE_INTERLACED && video_output != VO_VGA)
381 par->is_interlaced = 1; 377 par->is_interlaced = 1;
382 /* 378 /*
383 * XXX: Need to be more creative with this (i.e. allow doublecan for 379 * XXX: Need to be more creative with this (i.e. allow doublecan for
384 * PAL/NTSC output). 380 * PAL/NTSC output).
385 */ 381 */
386 if (var->vmode & FB_VMODE_DOUBLE && video_output == VO_VGA) 382 if (var->vmode & FB_VMODE_DOUBLE && video_output == VO_VGA)
387 par->is_doublescan = 1; 383 par->is_doublescan = 1;
388 384
389 par->hsync_total = var->left_margin + var->xres + var->right_margin + 385 par->hsync_total = var->left_margin + var->xres + var->right_margin +
390 var->hsync_len; 386 var->hsync_len;
391 par->vsync_total = var->upper_margin + var->yres + var->lower_margin + 387 par->vsync_total = var->upper_margin + var->yres + var->lower_margin +
@@ -408,7 +404,7 @@ static int pvr2fb_set_par(struct fb_info *info)
408 } else { 404 } else {
409 /* VGA mode */ 405 /* VGA mode */
410 /* XXX: What else needs to be checked? */ 406 /* XXX: What else needs to be checked? */
411 /* 407 /*
412 * XXX: We have a little freedom in VGA modes, what ranges 408 * XXX: We have a little freedom in VGA modes, what ranges
413 * should be here (i.e. hsync/vsync totals, etc.)? 409 * should be here (i.e. hsync/vsync totals, etc.)?
414 */ 410 */
@@ -419,8 +415,8 @@ static int pvr2fb_set_par(struct fb_info *info)
419 /* Calculate the remainding offsets */ 415 /* Calculate the remainding offsets */
420 par->diwstart_h = par->borderstart_h + var->left_margin; 416 par->diwstart_h = par->borderstart_h + var->left_margin;
421 par->diwstart_v = par->borderstart_v + var->upper_margin; 417 par->diwstart_v = par->borderstart_v + var->upper_margin;
422 par->borderstop_h = par->diwstart_h + var->xres + 418 par->borderstop_h = par->diwstart_h + var->xres +
423 var->right_margin; 419 var->right_margin;
424 par->borderstop_v = par->diwstart_v + var->yres + 420 par->borderstop_v = par->diwstart_v + var->yres +
425 var->lower_margin; 421 var->lower_margin;
426 422
@@ -465,12 +461,12 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
465 set_color_bitfields(var); 461 set_color_bitfields(var);
466 462
467 if (var->vmode & FB_VMODE_YWRAP) { 463 if (var->vmode & FB_VMODE_YWRAP) {
468 if (var->xoffset || var->yoffset < 0 || 464 if (var->xoffset || var->yoffset < 0 ||
469 var->yoffset >= var->yres_virtual) { 465 var->yoffset >= var->yres_virtual) {
470 var->xoffset = var->yoffset = 0; 466 var->xoffset = var->yoffset = 0;
471 } else { 467 } else {
472 if (var->xoffset > var->xres_virtual - var->xres || 468 if (var->xoffset > var->xres_virtual - var->xres ||
473 var->yoffset > var->yres_virtual - var->yres || 469 var->yoffset > var->yres_virtual - var->yres ||
474 var->xoffset < 0 || var->yoffset < 0) 470 var->xoffset < 0 || var->yoffset < 0)
475 var->xoffset = var->yoffset = 0; 471 var->xoffset = var->yoffset = 0;
476 } 472 }
@@ -478,7 +474,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
478 var->xoffset = var->yoffset = 0; 474 var->xoffset = var->yoffset = 0;
479 } 475 }
480 476
481 /* 477 /*
482 * XXX: Need to be more creative with this (i.e. allow doublecan for 478 * XXX: Need to be more creative with this (i.e. allow doublecan for
483 * PAL/NTSC output). 479 * PAL/NTSC output).
484 */ 480 */
@@ -507,7 +503,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
507 var->vsync_len = par->borderstop_v + 503 var->vsync_len = par->borderstop_v +
508 (par->vsync_total - par->borderstop_v); 504 (par->vsync_total - par->borderstop_v);
509 } 505 }
510 506
511 hsync_total = var->left_margin + var->xres + var->right_margin + 507 hsync_total = var->left_margin + var->xres + var->right_margin +
512 var->hsync_len; 508 var->hsync_len;
513 vtotal = var->upper_margin + var->yres + var->lower_margin + 509 vtotal = var->upper_margin + var->yres + var->lower_margin +
@@ -531,7 +527,7 @@ static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
531 } 527 }
532 } 528 }
533 } 529 }
534 530
535 /* Check memory sizes */ 531 /* Check memory sizes */
536 line_length = get_line_length(var->xres_virtual, var->bits_per_pixel); 532 line_length = get_line_length(var->xres_virtual, var->bits_per_pixel);
537 if (line_length * var->yres_virtual > info->fix.smem_len) 533 if (line_length * var->yres_virtual > info->fix.smem_len)
@@ -552,7 +548,7 @@ static void pvr2_update_display(struct fb_info *info)
552 DISP_DIWADDRS); 548 DISP_DIWADDRS);
553} 549}
554 550
555/* 551/*
556 * Initialize the video mode. Currently, the 16bpp and 24bpp modes aren't 552 * Initialize the video mode. Currently, the 16bpp and 24bpp modes aren't
557 * very stable. It's probably due to the fact that a lot of the 2D video 553 * very stable. It's probably due to the fact that a lot of the 2D video
558 * registers are still undocumented. 554 * registers are still undocumented.
@@ -592,18 +588,18 @@ static void pvr2_init_display(struct fb_info *info)
592 /* display window start position */ 588 /* display window start position */
593 fb_writel(par->diwstart_h, DISP_DIWHSTRT); 589 fb_writel(par->diwstart_h, DISP_DIWHSTRT);
594 fb_writel((par->diwstart_v << 16) | par->diwstart_v, DISP_DIWVSTRT); 590 fb_writel((par->diwstart_v << 16) | par->diwstart_v, DISP_DIWVSTRT);
595 591
596 /* misc. settings */ 592 /* misc. settings */
597 fb_writel((0x16 << 16) | par->is_lowres, DISP_DIWCONF); 593 fb_writel((0x16 << 16) | par->is_lowres, DISP_DIWCONF);
598 594
599 /* clock doubler (for VGA), scan doubler, display enable */ 595 /* clock doubler (for VGA), scan doubler, display enable */
600 fb_writel(((video_output == VO_VGA) << 23) | 596 fb_writel(((video_output == VO_VGA) << 23) |
601 (par->is_doublescan << 1) | 1, DISP_DIWMODE); 597 (par->is_doublescan << 1) | 1, DISP_DIWMODE);
602 598
603 /* bits per pixel */ 599 /* bits per pixel */
604 fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE); 600 fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE);
605 601
606 /* video enable, color sync, interlace, 602 /* video enable, color sync, interlace,
607 * hsync and vsync polarity (currently unused) */ 603 * hsync and vsync polarity (currently unused) */
608 fb_writel(0x100 | ((par->is_interlaced /*|4*/) << 4), DISP_SYNCCONF); 604 fb_writel(0x100 | ((par->is_interlaced /*|4*/) << 4), DISP_SYNCCONF);
609} 605}
@@ -657,7 +653,7 @@ static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id)
657static int pvr2_init_cable(void) 653static int pvr2_init_cable(void)
658{ 654{
659 if (cable_type < 0) { 655 if (cable_type < 0) {
660 fb_writel((fb_readl(PCTRA) & 0xfff0ffff) | 0x000a0000, 656 fb_writel((fb_readl(PCTRA) & 0xfff0ffff) | 0x000a0000,
661 PCTRA); 657 PCTRA);
662 cable_type = (fb_readw(PDTRA) >> 8) & 3; 658 cable_type = (fb_readw(PDTRA) >> 8) & 3;
663 } 659 }
@@ -687,7 +683,7 @@ static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
687 pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL); 683 pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL);
688 if (!pages) 684 if (!pages)
689 return -ENOMEM; 685 return -ENOMEM;
690 686
691 down_read(&current->mm->mmap_sem); 687 down_read(&current->mm->mmap_sem);
692 ret = get_user_pages(current, current->mm, (unsigned long)buf, 688 ret = get_user_pages(current, current->mm, (unsigned long)buf,
693 nr_pages, WRITE, 0, pages, NULL); 689 nr_pages, WRITE, 0, pages, NULL);
@@ -700,7 +696,7 @@ static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
700 } 696 }
701 697
702 dma_configure_channel(shdma, 0x12c1); 698 dma_configure_channel(shdma, 0x12c1);
703 699
704 dst = (unsigned long)fb_info->screen_base + *ppos; 700 dst = (unsigned long)fb_info->screen_base + *ppos;
705 start = (unsigned long)page_address(pages[0]); 701 start = (unsigned long)page_address(pages[0]);
706 end = (unsigned long)page_address(pages[nr_pages]); 702 end = (unsigned long)page_address(pages[nr_pages]);
@@ -744,7 +740,7 @@ out_unmap:
744 kfree(pages); 740 kfree(pages);
745 741
746 return ret; 742 return ret;
747} 743}
748#endif /* CONFIG_SH_DMA */ 744#endif /* CONFIG_SH_DMA */
749 745
750/** 746/**
@@ -765,21 +761,21 @@ out_unmap:
765 * in for flexibility anyways. Who knows, maybe someone has tv-out on a 761 * in for flexibility anyways. Who knows, maybe someone has tv-out on a
766 * PCI-based version of these things ;-) 762 * PCI-based version of these things ;-)
767 */ 763 */
768static int __init pvr2fb_common_init(void) 764static int __devinit pvr2fb_common_init(void)
769{ 765{
770 struct pvr2fb_par *par = currentpar; 766 struct pvr2fb_par *par = currentpar;
771 unsigned long modememused, rev; 767 unsigned long modememused, rev;
772 768
773 fb_info->screen_base = ioremap_nocache(pvr2_fix.smem_start, 769 fb_info->screen_base = ioremap_nocache(pvr2_fix.smem_start,
774 pvr2_fix.smem_len); 770 pvr2_fix.smem_len);
775 771
776 if (!fb_info->screen_base) { 772 if (!fb_info->screen_base) {
777 printk(KERN_ERR "pvr2fb: Failed to remap smem space\n"); 773 printk(KERN_ERR "pvr2fb: Failed to remap smem space\n");
778 goto out_err; 774 goto out_err;
779 } 775 }
780 776
781 par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start, 777 par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start,
782 pvr2_fix.mmio_len); 778 pvr2_fix.mmio_len);
783 if (!par->mmio_base) { 779 if (!par->mmio_base) {
784 printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n"); 780 printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
785 goto out_err; 781 goto out_err;
@@ -820,7 +816,7 @@ static int __init pvr2fb_common_init(void)
820 printk("fb%d: %s (rev %ld.%ld) frame buffer device, using %ldk/%ldk of video memory\n", 816 printk("fb%d: %s (rev %ld.%ld) frame buffer device, using %ldk/%ldk of video memory\n",
821 fb_info->node, fb_info->fix.id, (rev >> 4) & 0x0f, rev & 0x0f, 817 fb_info->node, fb_info->fix.id, (rev >> 4) & 0x0f, rev & 0x0f,
822 modememused >> 10, (unsigned long)(fb_info->fix.smem_len >> 10)); 818 modememused >> 10, (unsigned long)(fb_info->fix.smem_len >> 10));
823 printk("fb%d: Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n", 819 printk("fb%d: Mode %dx%d-%d pitch = %ld cable: %s video output: %s\n",
824 fb_info->node, fb_info->var.xres, fb_info->var.yres, 820 fb_info->node, fb_info->var.xres, fb_info->var.yres,
825 fb_info->var.bits_per_pixel, 821 fb_info->var.bits_per_pixel,
826 get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel), 822 get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel),
@@ -878,8 +874,8 @@ static int __init pvr2fb_dc_init(void)
878 video_output = VO_NTSC; 874 video_output = VO_NTSC;
879 } 875 }
880 } 876 }
881 877
882 /* 878 /*
883 * Nothing exciting about the DC PVR2 .. only a measly 8MiB. 879 * Nothing exciting about the DC PVR2 .. only a measly 8MiB.
884 */ 880 */
885 pvr2_fix.smem_start = 0xa5000000; /* RAM starts here */ 881 pvr2_fix.smem_start = 0xa5000000; /* RAM starts here */
@@ -903,7 +899,7 @@ static int __init pvr2fb_dc_init(void)
903 return pvr2fb_common_init(); 899 return pvr2fb_common_init();
904} 900}
905 901
906static void pvr2fb_dc_exit(void) 902static void __exit pvr2fb_dc_exit(void)
907{ 903{
908 if (fb_info->screen_base) { 904 if (fb_info->screen_base) {
909 iounmap(fb_info->screen_base); 905 iounmap(fb_info->screen_base);
@@ -987,13 +983,13 @@ static int __init pvr2fb_pci_init(void)
987 return pci_register_driver(&pvr2fb_pci_driver); 983 return pci_register_driver(&pvr2fb_pci_driver);
988} 984}
989 985
990static void pvr2fb_pci_exit(void) 986static void __exit pvr2fb_pci_exit(void)
991{ 987{
992 pci_unregister_driver(&pvr2fb_pci_driver); 988 pci_unregister_driver(&pvr2fb_pci_driver);
993} 989}
994#endif /* CONFIG_PCI */ 990#endif /* CONFIG_PCI */
995 991
996static int __init pvr2_get_param(const struct pvr2_params *p, const char *s, 992static int __devinit pvr2_get_param(const struct pvr2_params *p, const char *s,
997 int val, int size) 993 int val, int size)
998{ 994{
999 int i; 995 int i;
@@ -1021,7 +1017,7 @@ static int __init pvr2_get_param(const struct pvr2_params *p, const char *s,
1021 */ 1017 */
1022 1018
1023#ifndef MODULE 1019#ifndef MODULE
1024int __init pvr2fb_setup(char *options) 1020static int __init pvr2fb_setup(char *options)
1025{ 1021{
1026 char *this_opt; 1022 char *this_opt;
1027 char cable_arg[80]; 1023 char cable_arg[80];
@@ -1061,7 +1057,7 @@ static struct pvr2_board {
1061 int (*init)(void); 1057 int (*init)(void);
1062 void (*exit)(void); 1058 void (*exit)(void);
1063 char name[16]; 1059 char name[16];
1064} board_list[] = { 1060} board_driver[] = {
1065#ifdef CONFIG_SH_DREAMCAST 1061#ifdef CONFIG_SH_DREAMCAST
1066 { pvr2fb_dc_init, pvr2fb_dc_exit, "Sega DC PVR2" }, 1062 { pvr2fb_dc_init, pvr2fb_dc_exit, "Sega DC PVR2" },
1067#endif 1063#endif
@@ -1071,7 +1067,7 @@ static struct pvr2_board {
1071 { 0, }, 1067 { 0, },
1072}; 1068};
1073 1069
1074int __init pvr2fb_init(void) 1070static int __init pvr2fb_init(void)
1075{ 1071{
1076 int i, ret = -ENODEV; 1072 int i, ret = -ENODEV;
1077 int size; 1073 int size;
@@ -1095,8 +1091,8 @@ int __init pvr2fb_init(void)
1095 1091
1096 currentpar = (struct pvr2fb_par *)(fb_info + 1); 1092 currentpar = (struct pvr2fb_par *)(fb_info + 1);
1097 1093
1098 for (i = 0; i < ARRAY_SIZE(board_list); i++) { 1094 for (i = 0; i < ARRAY_SIZE(board_driver); i++) {
1099 struct pvr2_board *pvr_board = board_list + i; 1095 struct pvr2_board *pvr_board = board_driver + i;
1100 1096
1101 if (!pvr_board->init) 1097 if (!pvr_board->init)
1102 continue; 1098 continue;
@@ -1118,13 +1114,13 @@ static void __exit pvr2fb_exit(void)
1118{ 1114{
1119 int i; 1115 int i;
1120 1116
1121 for (i = 0; i < ARRAY_SIZE(board_list); i++) { 1117 for (i = 0; i < ARRAY_SIZE(board_driver); i++) {
1122 struct pvr2_board *pvr_board = board_list + i; 1118 struct pvr2_board *pvr_board = board_driver + i;
1123 1119
1124 if (pvr_board->exit) 1120 if (pvr_board->exit)
1125 pvr_board->exit(); 1121 pvr_board->exit();
1126 } 1122 }
1127 1123
1128#ifdef CONFIG_SH_STORE_QUEUES 1124#ifdef CONFIG_SH_STORE_QUEUES
1129 sq_unmap(pvr2fb_map); 1125 sq_unmap(pvr2fb_map);
1130#endif 1126#endif
@@ -1139,4 +1135,3 @@ module_exit(pvr2fb_exit);
1139MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, M. R. Brown <mrbrown@0xd6.org>"); 1135MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, M. R. Brown <mrbrown@0xd6.org>");
1140MODULE_DESCRIPTION("Framebuffer driver for NEC PowerVR 2 based graphics boards"); 1136MODULE_DESCRIPTION("Framebuffer driver for NEC PowerVR 2 based graphics boards");
1141MODULE_LICENSE("GPL"); 1137MODULE_LICENSE("GPL");
1142
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index a30e1e13d8be..93d07ef85276 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -5789,7 +5789,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5789 ivideo->warncount = 0; 5789 ivideo->warncount = 0;
5790 ivideo->chip_id = pdev->device; 5790 ivideo->chip_id = pdev->device;
5791 ivideo->chip_vendor = pdev->vendor; 5791 ivideo->chip_vendor = pdev->vendor;
5792 pci_read_config_byte(pdev, PCI_REVISION_ID, &ivideo->revision_id); 5792 ivideo->revision_id = pdev->revision;
5793 ivideo->SiS_Pr.ChipRevision = ivideo->revision_id; 5793 ivideo->SiS_Pr.ChipRevision = ivideo->revision_id;
5794 pci_read_config_word(pdev, PCI_COMMAND, &reg16); 5794 pci_read_config_word(pdev, PCI_COMMAND, &reg16);
5795 ivideo->sisvga_enabled = reg16 & 0x01; 5795 ivideo->sisvga_enabled = reg16 & 0x01;
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 62fa5500361d..5eff28ce4f4d 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -1348,7 +1348,7 @@ static int __devinit sstfb_probe(struct pci_dev *pdev,
1348 f_ddprintk("found device : %s\n", spec->name); 1348 f_ddprintk("found device : %s\n", spec->name);
1349 1349
1350 par->dev = pdev; 1350 par->dev = pdev;
1351 pci_read_config_byte(pdev, PCI_REVISION_ID, &par->revision); 1351 par->revision = pdev->revision;
1352 1352
1353 fix->mmio_start = pci_resource_start(pdev,0); 1353 fix->mmio_start = pci_resource_start(pdev,0);
1354 fix->mmio_len = 0x400000; 1354 fix->mmio_len = 0x400000;
diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c
index f0fde6ea7c36..5c0dab628099 100644
--- a/drivers/video/tgafb.c
+++ b/drivers/video/tgafb.c
@@ -1625,8 +1625,7 @@ tgafb_register(struct device *dev)
1625 par->tga_regs_base = mem_base + TGA_REGS_OFFSET; 1625 par->tga_regs_base = mem_base + TGA_REGS_OFFSET;
1626 par->tga_type = tga_type; 1626 par->tga_type = tga_type;
1627 if (tga_bus_pci) 1627 if (tga_bus_pci)
1628 pci_read_config_byte(to_pci_dev(dev), PCI_REVISION_ID, 1628 par->tga_chip_rev = (to_pci_dev(dev))->revision;
1629 &par->tga_chip_rev);
1630 if (tga_bus_tc) 1629 if (tga_bus_tc)
1631 par->tga_chip_rev = TGA_READ_REG(par, TGA_START_REG) & 0xff; 1630 par->tga_chip_rev = TGA_READ_REG(par, TGA_START_REG) & 0xff;
1632 1631