aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Kconfig7
-rw-r--r--drivers/video/asiliantfb.c21
-rw-r--r--drivers/video/aty/radeon_pm.c19
-rw-r--r--drivers/video/au1100fb.c3
-rw-r--r--drivers/video/console/vgacon.c67
-rw-r--r--drivers/video/fbmem.c2
-rw-r--r--drivers/video/gbefb.c5
-rw-r--r--drivers/video/neofb.c17
-rw-r--r--drivers/video/nvidia/nvidia.c2
-rw-r--r--drivers/video/s3c2410fb.c1
10 files changed, 86 insertions, 58 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 3e153d313bb0..f5079c78ba4e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -520,16 +520,11 @@ config FB_GBE
520config FB_GBE_MEM 520config FB_GBE_MEM
521 int "Video memory size in MB" 521 int "Video memory size in MB"
522 depends on FB_GBE 522 depends on FB_GBE
523 default 8 523 default 4
524 help 524 help
525 This is the amount of memory reserved for the framebuffer, 525 This is the amount of memory reserved for the framebuffer,
526 which can be any value between 1MB and 8MB. 526 which can be any value between 1MB and 8MB.
527 527
528config BUS_I2C
529 bool
530 depends on (FB = y) && VISWS
531 default y
532
533config FB_SUN3 528config FB_SUN3
534 bool "Sun3 framebuffer support" 529 bool "Sun3 framebuffer support"
535 depends on (FB = y) && (SUN3 || SUN3X) && BROKEN 530 depends on (FB = y) && (SUN3 || SUN3X) && BROKEN
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
index 69f75547865d..c924d81f7978 100644
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -322,32 +322,29 @@ static int asiliantfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
322 writeb(green, mmio_base + 0x791); 322 writeb(green, mmio_base + 0x791);
323 writeb(blue, mmio_base + 0x791); 323 writeb(blue, mmio_base + 0x791);
324 324
325 switch(p->var.bits_per_pixel) { 325 if (regno < 16) {
326 case 15: 326 switch(p->var.red.offset) {
327 if (regno < 16) { 327 case 10: /* RGB 555 */
328 ((u32 *)(p->pseudo_palette))[regno] = 328 ((u32 *)(p->pseudo_palette))[regno] =
329 ((red & 0xf8) << 7) | 329 ((red & 0xf8) << 7) |
330 ((green & 0xf8) << 2) | 330 ((green & 0xf8) << 2) |
331 ((blue & 0xf8) >> 3); 331 ((blue & 0xf8) >> 3);
332 } 332 break;
333 break; 333 case 11: /* RGB 565 */
334 case 16:
335 if (regno < 16) {
336 ((u32 *)(p->pseudo_palette))[regno] = 334 ((u32 *)(p->pseudo_palette))[regno] =
337 ((red & 0xf8) << 8) | 335 ((red & 0xf8) << 8) |
338 ((green & 0xfc) << 3) | 336 ((green & 0xfc) << 3) |
339 ((blue & 0xf8) >> 3); 337 ((blue & 0xf8) >> 3);
340 } 338 break;
341 break; 339 case 16: /* RGB 888 */
342 case 24:
343 if (regno < 24) {
344 ((u32 *)(p->pseudo_palette))[regno] = 340 ((u32 *)(p->pseudo_palette))[regno] =
345 (red << 16) | 341 (red << 16) |
346 (green << 8) | 342 (green << 8) |
347 (blue); 343 (blue);
344 break;
348 } 345 }
349 break;
350 } 346 }
347
351 return 0; 348 return 0;
352} 349}
353 350
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index 556895e99645..1f8d805c61e5 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -1321,8 +1321,6 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo)
1321 mdelay( 15); 1321 mdelay( 15);
1322} 1322}
1323 1323
1324#ifdef CONFIG_PPC_OF
1325
1326static void radeon_pm_reset_pad_ctlr_strength(struct radeonfb_info *rinfo) 1324static void radeon_pm_reset_pad_ctlr_strength(struct radeonfb_info *rinfo)
1327{ 1325{
1328 u32 tmp, tmp2; 1326 u32 tmp, tmp2;
@@ -1836,6 +1834,8 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo)
1836 radeon_pm_m10_enable_lvds_spread_spectrum(rinfo); 1834 radeon_pm_m10_enable_lvds_spread_spectrum(rinfo);
1837} 1835}
1838 1836
1837#ifdef CONFIG_PPC_OF
1838
1839static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo) 1839static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo)
1840{ 1840{
1841 OUTREG(MC_CNTL, rinfo->save_regs[46]); 1841 OUTREG(MC_CNTL, rinfo->save_regs[46]);
@@ -2728,13 +2728,23 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk)
2728 printk("radeonfb: Dynamic Clock Power Management disabled\n"); 2728 printk("radeonfb: Dynamic Clock Power Management disabled\n");
2729 } 2729 }
2730 2730
2731#if defined(CONFIG_PM)
2731 /* Check if we can power manage on suspend/resume. We can do 2732 /* Check if we can power manage on suspend/resume. We can do
2732 * D2 on M6, M7 and M9, and we can resume from D3 cold a few other 2733 * D2 on M6, M7 and M9, and we can resume from D3 cold a few other
2733 * "Mac" cards, but that's all. We need more infos about what the 2734 * "Mac" cards, but that's all. We need more infos about what the
2734 * BIOS does tho. Right now, all this PM stuff is pmac-only for that 2735 * BIOS does tho. Right now, all this PM stuff is pmac-only for that
2735 * reason. --BenH 2736 * reason. --BenH
2736 */ 2737 */
2737#if defined(CONFIG_PM) && defined(CONFIG_PPC_PMAC) 2738 /* Special case for Samsung P35 laptops
2739 */
2740 if ((rinfo->pdev->vendor == PCI_VENDOR_ID_ATI) &&
2741 (rinfo->pdev->device == PCI_CHIP_RV350_NP) &&
2742 (rinfo->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG) &&
2743 (rinfo->pdev->subsystem_device == 0xc00c)) {
2744 rinfo->reinit_func = radeon_reinitialize_M10;
2745 rinfo->pm_mode |= radeon_pm_off;
2746 }
2747#if defined(CONFIG_PPC_PMAC)
2738 if (_machine == _MACH_Pmac && rinfo->of_node) { 2748 if (_machine == _MACH_Pmac && rinfo->of_node) {
2739 if (rinfo->is_mobility && rinfo->pm_reg && 2749 if (rinfo->is_mobility && rinfo->pm_reg &&
2740 rinfo->family <= CHIP_FAMILY_RV250) 2750 rinfo->family <= CHIP_FAMILY_RV250)
@@ -2778,7 +2788,8 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk)
2778 OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000); 2788 OUTREG(TV_DAC_CNTL, INREG(TV_DAC_CNTL) | 0x07000000);
2779#endif 2789#endif
2780 } 2790 }
2781#endif /* defined(CONFIG_PM) && defined(CONFIG_PPC_PMAC) */ 2791#endif /* defined(CONFIG_PPC_PMAC) */
2792#endif /* defined(CONFIG_PM) */
2782} 2793}
2783 2794
2784void radeonfb_pm_exit(struct radeonfb_info *rinfo) 2795void radeonfb_pm_exit(struct radeonfb_info *rinfo)
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index 2406899f1207..3d04b2def0f1 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -49,6 +49,7 @@
49#include <linux/interrupt.h> 49#include <linux/interrupt.h>
50#include <linux/ctype.h> 50#include <linux/ctype.h>
51#include <linux/dma-mapping.h> 51#include <linux/dma-mapping.h>
52#include <linux/platform_device.h>
52 53
53#include <asm/mach-au1x00/au1000.h> 54#include <asm/mach-au1x00/au1000.h>
54 55
@@ -406,7 +407,7 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
406 407
407 vma->vm_flags |= VM_IO; 408 vma->vm_flags |= VM_IO;
408 409
409 if (io_remap_page_range(vma, vma->vm_start, off, 410 if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
410 vma->vm_end - vma->vm_start, 411 vma->vm_end - vma->vm_start,
411 vma->vm_page_prot)) { 412 vma->vm_page_prot)) {
412 return -EAGAIN; 413 return -EAGAIN;
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 12d9329d1408..5a86978537d2 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -509,57 +509,60 @@ static int vgacon_doresize(struct vc_data *c,
509{ 509{
510 unsigned long flags; 510 unsigned long flags;
511 unsigned int scanlines = height * c->vc_font.height; 511 unsigned int scanlines = height * c->vc_font.height;
512 u8 scanlines_lo, r7, vsync_end, mode, max_scan; 512 u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan;
513 513
514 spin_lock_irqsave(&vga_lock, flags); 514 spin_lock_irqsave(&vga_lock, flags);
515 515
516 outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg);
517 max_scan = inb_p(vga_video_port_val);
518
519 if (max_scan & 0x80)
520 scanlines <<= 1;
521
522 vgacon_xres = width * VGA_FONTWIDTH; 516 vgacon_xres = width * VGA_FONTWIDTH;
523 vgacon_yres = height * c->vc_font.height; 517 vgacon_yres = height * c->vc_font.height;
524 outb_p(VGA_CRTC_MODE, vga_video_port_reg); 518 if (vga_video_type >= VIDEO_TYPE_VGAC) {
525 mode = inb_p(vga_video_port_val); 519 outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg);
520 max_scan = inb_p(vga_video_port_val);
526 521
527 if (mode & 0x04) 522 if (max_scan & 0x80)
528 scanlines >>= 1; 523 scanlines <<= 1;
529 524
530 scanlines -= 1; 525 outb_p(VGA_CRTC_MODE, vga_video_port_reg);
531 scanlines_lo = scanlines & 0xff; 526 mode = inb_p(vga_video_port_val);
532 527
533 outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg); 528 if (mode & 0x04)
534 r7 = inb_p(vga_video_port_val) & ~0x42; 529 scanlines >>= 1;
535 530
536 if (scanlines & 0x100) 531 scanlines -= 1;
537 r7 |= 0x02; 532 scanlines_lo = scanlines & 0xff;
538 if (scanlines & 0x200)
539 r7 |= 0x40;
540 533
541 /* deprotect registers */ 534 outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
542 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg); 535 r7 = inb_p(vga_video_port_val) & ~0x42;
543 vsync_end = inb_p(vga_video_port_val); 536
544 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg); 537 if (scanlines & 0x100)
545 outb_p(vsync_end & ~0x80, vga_video_port_val); 538 r7 |= 0x02;
539 if (scanlines & 0x200)
540 r7 |= 0x40;
541
542 /* deprotect registers */
543 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
544 vsync_end = inb_p(vga_video_port_val);
545 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
546 outb_p(vsync_end & ~0x80, vga_video_port_val);
547 }
546 548
547 outb_p(VGA_CRTC_H_DISP, vga_video_port_reg); 549 outb_p(VGA_CRTC_H_DISP, vga_video_port_reg);
548 outb_p(width - 1, vga_video_port_val); 550 outb_p(width - 1, vga_video_port_val);
549 outb_p(VGA_CRTC_OFFSET, vga_video_port_reg); 551 outb_p(VGA_CRTC_OFFSET, vga_video_port_reg);
550 outb_p(width >> 1, vga_video_port_val); 552 outb_p(width >> 1, vga_video_port_val);
551 553
552 outb_p(VGA_CRTC_V_DISP_END, vga_video_port_reg); 554 if (vga_video_type >= VIDEO_TYPE_VGAC) {
553 outb_p(scanlines_lo, vga_video_port_val); 555 outb_p(VGA_CRTC_V_DISP_END, vga_video_port_reg);
554 outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg); 556 outb_p(scanlines_lo, vga_video_port_val);
555 outb_p(r7,vga_video_port_val); 557 outb_p(VGA_CRTC_OVERFLOW, vga_video_port_reg);
558 outb_p(r7,vga_video_port_val);
556 559
557 /* reprotect registers */ 560 /* reprotect registers */
558 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg); 561 outb_p(VGA_CRTC_V_SYNC_END, vga_video_port_reg);
559 outb_p(vsync_end, vga_video_port_val); 562 outb_p(vsync_end, vga_video_port_val);
563 }
560 564
561 spin_unlock_irqrestore(&vga_lock, flags); 565 spin_unlock_irqrestore(&vga_lock, flags);
562
563 return 0; 566 return 0;
564} 567}
565 568
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index d2dede6ed3e5..996c7b58564e 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1550,6 +1550,7 @@ int fb_get_options(char *name, char **option)
1550 return retval; 1550 return retval;
1551} 1551}
1552 1552
1553#ifndef MODULE
1553/** 1554/**
1554 * video_setup - process command line options 1555 * video_setup - process command line options
1555 * @options: string of options 1556 * @options: string of options
@@ -1593,6 +1594,7 @@ static int __init video_setup(char *options)
1593 return 0; 1594 return 0;
1594} 1595}
1595__setup("video=", video_setup); 1596__setup("video=", video_setup);
1597#endif
1596 1598
1597 /* 1599 /*
1598 * Visible symbols for modules 1600 * Visible symbols for modules
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index 38d22729b129..5e25b9860196 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -656,12 +656,15 @@ static int gbefb_set_par(struct fb_info *info)
656 switch (bytesPerPixel) { 656 switch (bytesPerPixel) {
657 case 1: 657 case 1:
658 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8); 658 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8);
659 info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
659 break; 660 break;
660 case 2: 661 case 2:
661 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5); 662 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5);
663 info->fix.visual = FB_VISUAL_TRUECOLOR;
662 break; 664 break;
663 case 4: 665 case 4:
664 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8); 666 SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8);
667 info->fix.visual = FB_VISUAL_TRUECOLOR;
665 break; 668 break;
666 } 669 }
667 SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH); 670 SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH);
@@ -1243,7 +1246,7 @@ static int __devexit gbefb_remove(struct platform_device* p_dev)
1243 (void *)gbe_tiles.cpu, gbe_tiles.dma); 1246 (void *)gbe_tiles.cpu, gbe_tiles.dma);
1244 release_mem_region(GBE_BASE, sizeof(struct sgi_gbe)); 1247 release_mem_region(GBE_BASE, sizeof(struct sgi_gbe));
1245 iounmap(gbe); 1248 iounmap(gbe);
1246 gbefb_remove_sysfs(dev); 1249 gbefb_remove_sysfs(&p_dev->dev);
1247 framebuffer_release(info); 1250 framebuffer_release(info);
1248 1251
1249 return 0; 1252 return 0;
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 747602aa5615..a2e201dc40f7 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -843,6 +843,9 @@ static int neofb_set_par(struct fb_info *info)
843 843
844 par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */ 844 par->SysIfaceCntl2 = 0xc0; /* VESA Bios sets this to 0x80! */
845 845
846 /* Initialize: by default, we want display config register to be read */
847 par->PanelDispCntlRegRead = 1;
848
846 /* Enable any user specified display devices. */ 849 /* Enable any user specified display devices. */
847 par->PanelDispCntlReg1 = 0x00; 850 par->PanelDispCntlReg1 = 0x00;
848 if (par->internal_display) 851 if (par->internal_display)
@@ -1334,6 +1337,18 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
1334 struct neofb_par *par = info->par; 1337 struct neofb_par *par = info->par;
1335 int seqflags, lcdflags, dpmsflags, reg; 1338 int seqflags, lcdflags, dpmsflags, reg;
1336 1339
1340
1341 /*
1342 * Reload the value stored in the register, if sensible. It might have
1343 * been changed via FN keystroke.
1344 */
1345 if (par->PanelDispCntlRegRead) {
1346 neoUnlock();
1347 par->PanelDispCntlReg1 = vga_rgfx(NULL, 0x20) & 0x03;
1348 neoLock(&par->state);
1349 }
1350 par->PanelDispCntlRegRead = !blank_mode;
1351
1337 switch (blank_mode) { 1352 switch (blank_mode) {
1338 case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */ 1353 case FB_BLANK_POWERDOWN: /* powerdown - both sync lines down */
1339 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ 1354 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
@@ -1366,7 +1381,7 @@ static int neofb_blank(int blank_mode, struct fb_info *info)
1366 case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */ 1381 case FB_BLANK_NORMAL: /* just blank screen (backlight stays on) */
1367 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */ 1382 seqflags = VGA_SR01_SCREEN_OFF; /* Disable sequencer */
1368 lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */ 1383 lcdflags = par->PanelDispCntlReg1 & 0x02; /* LCD normal */
1369 dpmsflags = 0; /* no hsync/vsync suppression */ 1384 dpmsflags = 0x00; /* no hsync/vsync suppression */
1370 break; 1385 break;
1371 case FB_BLANK_UNBLANK: /* unblank */ 1386 case FB_BLANK_UNBLANK: /* unblank */
1372 seqflags = 0; /* Enable sequencer */ 1387 seqflags = 0; /* Enable sequencer */
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index dbcb8962e57d..a7c4e5e8ead6 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -138,6 +138,8 @@ static struct pci_device_id nvidiafb_pci_tbl[] = {
138 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 138 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
139 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X, 139 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X,
140 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 140 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
141 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000,
142 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
141 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO, 143 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO,
142 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, 144 PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
143 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO, 145 {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO,
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index d574dd3c9c8a..9451932fbaf2 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -82,7 +82,6 @@
82#include <linux/fb.h> 82#include <linux/fb.h>
83#include <linux/init.h> 83#include <linux/init.h>
84#include <linux/dma-mapping.h> 84#include <linux/dma-mapping.h>
85#include <linux/string.h>
86#include <linux/interrupt.h> 85#include <linux/interrupt.h>
87#include <linux/workqueue.h> 86#include <linux/workqueue.h>
88#include <linux/wait.h> 87#include <linux/wait.h>