aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/Makefile1
-rw-r--r--drivers/video/arkfb.c27
-rw-r--r--drivers/video/aty/atyfb_base.c29
-rw-r--r--drivers/video/aty/radeon_accel.c4
-rw-r--r--drivers/video/aty/radeon_i2c.c3
-rw-r--r--drivers/video/backlight/hp680_bl.c2
-rw-r--r--drivers/video/backlight/platform_lcd.c4
-rw-r--r--drivers/video/backlight/pwm_bl.c10
-rw-r--r--drivers/video/console/.gitignore2
-rw-r--r--drivers/video/console/fbcon.c3
-rw-r--r--drivers/video/console/sticore.c30
-rw-r--r--drivers/video/fsl-diu-fb.c8
-rw-r--r--drivers/video/gbefb.c50
-rw-r--r--drivers/video/hitfb.c2
-rw-r--r--drivers/video/matrox/matroxfb_base.c2
-rw-r--r--drivers/video/pvr2fb.c6
-rw-r--r--drivers/video/s3fb.c18
-rw-r--r--drivers/video/sh7760fb.c1
-rw-r--r--drivers/video/vt8623fb.c29
19 files changed, 145 insertions, 86 deletions
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 0ebc1bfd2514..a6b55297a7fb 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -118,7 +118,6 @@ obj-$(CONFIG_FB_PS3) += ps3fb.o
118obj-$(CONFIG_FB_SM501) += sm501fb.o 118obj-$(CONFIG_FB_SM501) += sm501fb.o
119obj-$(CONFIG_FB_XILINX) += xilinxfb.o 119obj-$(CONFIG_FB_XILINX) += xilinxfb.o
120obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o 120obj-$(CONFIG_FB_SH_MOBILE_LCDC) += sh_mobile_lcdcfb.o
121obj-$(CONFIG_FB_SH7343VOU) += sh7343_voufb.o
122obj-$(CONFIG_FB_OMAP) += omap/ 121obj-$(CONFIG_FB_OMAP) += omap/
123obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o 122obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o
124obj-$(CONFIG_FB_CARMINE) += carminefb.o 123obj-$(CONFIG_FB_CARMINE) += carminefb.o
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index 5001bd4ef466..4bd569e479a7 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -958,20 +958,20 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_
958 /* Prepare PCI device */ 958 /* Prepare PCI device */
959 rc = pci_enable_device(dev); 959 rc = pci_enable_device(dev);
960 if (rc < 0) { 960 if (rc < 0) {
961 dev_err(info->dev, "cannot enable PCI device\n"); 961 dev_err(info->device, "cannot enable PCI device\n");
962 goto err_enable_device; 962 goto err_enable_device;
963 } 963 }
964 964
965 rc = pci_request_regions(dev, "arkfb"); 965 rc = pci_request_regions(dev, "arkfb");
966 if (rc < 0) { 966 if (rc < 0) {
967 dev_err(info->dev, "cannot reserve framebuffer region\n"); 967 dev_err(info->device, "cannot reserve framebuffer region\n");
968 goto err_request_regions; 968 goto err_request_regions;
969 } 969 }
970 970
971 par->dac = ics5342_init(ark_dac_read_regs, ark_dac_write_regs, info); 971 par->dac = ics5342_init(ark_dac_read_regs, ark_dac_write_regs, info);
972 if (! par->dac) { 972 if (! par->dac) {
973 rc = -ENOMEM; 973 rc = -ENOMEM;
974 dev_err(info->dev, "RAMDAC initialization failed\n"); 974 dev_err(info->device, "RAMDAC initialization failed\n");
975 goto err_dac; 975 goto err_dac;
976 } 976 }
977 977
@@ -982,7 +982,7 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_
982 info->screen_base = pci_iomap(dev, 0, 0); 982 info->screen_base = pci_iomap(dev, 0, 0);
983 if (! info->screen_base) { 983 if (! info->screen_base) {
984 rc = -ENOMEM; 984 rc = -ENOMEM;
985 dev_err(info->dev, "iomap for framebuffer failed\n"); 985 dev_err(info->device, "iomap for framebuffer failed\n");
986 goto err_iomap; 986 goto err_iomap;
987 } 987 }
988 988
@@ -1004,19 +1004,19 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_
1004 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); 1004 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8);
1005 if (! ((rc == 1) || (rc == 2))) { 1005 if (! ((rc == 1) || (rc == 2))) {
1006 rc = -EINVAL; 1006 rc = -EINVAL;
1007 dev_err(info->dev, "mode %s not found\n", mode_option); 1007 dev_err(info->device, "mode %s not found\n", mode_option);
1008 goto err_find_mode; 1008 goto err_find_mode;
1009 } 1009 }
1010 1010
1011 rc = fb_alloc_cmap(&info->cmap, 256, 0); 1011 rc = fb_alloc_cmap(&info->cmap, 256, 0);
1012 if (rc < 0) { 1012 if (rc < 0) {
1013 dev_err(info->dev, "cannot allocate colormap\n"); 1013 dev_err(info->device, "cannot allocate colormap\n");
1014 goto err_alloc_cmap; 1014 goto err_alloc_cmap;
1015 } 1015 }
1016 1016
1017 rc = register_framebuffer(info); 1017 rc = register_framebuffer(info);
1018 if (rc < 0) { 1018 if (rc < 0) {
1019 dev_err(info->dev, "cannot register framebugger\n"); 1019 dev_err(info->device, "cannot register framebugger\n");
1020 goto err_reg_fb; 1020 goto err_reg_fb;
1021 } 1021 }
1022 1022
@@ -1090,7 +1090,7 @@ static int ark_pci_suspend (struct pci_dev* dev, pm_message_t state)
1090 struct fb_info *info = pci_get_drvdata(dev); 1090 struct fb_info *info = pci_get_drvdata(dev);
1091 struct arkfb_info *par = info->par; 1091 struct arkfb_info *par = info->par;
1092 1092
1093 dev_info(info->dev, "suspend\n"); 1093 dev_info(info->device, "suspend\n");
1094 1094
1095 acquire_console_sem(); 1095 acquire_console_sem();
1096 mutex_lock(&(par->open_lock)); 1096 mutex_lock(&(par->open_lock));
@@ -1121,16 +1121,13 @@ static int ark_pci_resume (struct pci_dev* dev)
1121 struct fb_info *info = pci_get_drvdata(dev); 1121 struct fb_info *info = pci_get_drvdata(dev);
1122 struct arkfb_info *par = info->par; 1122 struct arkfb_info *par = info->par;
1123 1123
1124 dev_info(info->dev, "resume\n"); 1124 dev_info(info->device, "resume\n");
1125 1125
1126 acquire_console_sem(); 1126 acquire_console_sem();
1127 mutex_lock(&(par->open_lock)); 1127 mutex_lock(&(par->open_lock));
1128 1128
1129 if (par->ref_count == 0) { 1129 if (par->ref_count == 0)
1130 mutex_unlock(&(par->open_lock)); 1130 goto fail;
1131 release_console_sem();
1132 return 0;
1133 }
1134 1131
1135 pci_set_power_state(dev, PCI_D0); 1132 pci_set_power_state(dev, PCI_D0);
1136 pci_restore_state(dev); 1133 pci_restore_state(dev);
@@ -1143,8 +1140,8 @@ static int ark_pci_resume (struct pci_dev* dev)
1143 arkfb_set_par(info); 1140 arkfb_set_par(info);
1144 fb_set_suspend(info, 0); 1141 fb_set_suspend(info, 0);
1145 1142
1146 mutex_unlock(&(par->open_lock));
1147fail: 1143fail:
1144 mutex_unlock(&(par->open_lock));
1148 release_console_sem(); 1145 release_console_sem();
1149 return 0; 1146 return 0;
1150} 1147}
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 620ba8120368..cc6b470073da 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -244,7 +244,7 @@ static int atyfb_sync(struct fb_info *info);
244 */ 244 */
245 245
246static int aty_init(struct fb_info *info); 246static int aty_init(struct fb_info *info);
247static void aty_resume_chip(struct fb_info *info); 247
248#ifdef CONFIG_ATARI 248#ifdef CONFIG_ATARI
249static int store_video_par(char *videopar, unsigned char m64_num); 249static int store_video_par(char *videopar, unsigned char m64_num);
250#endif 250#endif
@@ -2023,6 +2023,20 @@ static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state)
2023 return 0; 2023 return 0;
2024} 2024}
2025 2025
2026static void aty_resume_chip(struct fb_info *info)
2027{
2028 struct atyfb_par *par = info->par;
2029
2030 aty_st_le32(MEM_CNTL, par->mem_cntl, par);
2031
2032 if (par->pll_ops->resume_pll)
2033 par->pll_ops->resume_pll(info, &par->pll);
2034
2035 if (par->aux_start)
2036 aty_st_le32(BUS_CNTL,
2037 aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
2038}
2039
2026static int atyfb_pci_resume(struct pci_dev *pdev) 2040static int atyfb_pci_resume(struct pci_dev *pdev)
2027{ 2041{
2028 struct fb_info *info = pci_get_drvdata(pdev); 2042 struct fb_info *info = pci_get_drvdata(pdev);
@@ -2659,19 +2673,6 @@ aty_init_exit:
2659 return ret; 2673 return ret;
2660} 2674}
2661 2675
2662static void aty_resume_chip(struct fb_info *info)
2663{
2664 struct atyfb_par *par = info->par;
2665
2666 aty_st_le32(MEM_CNTL, par->mem_cntl, par);
2667
2668 if (par->pll_ops->resume_pll)
2669 par->pll_ops->resume_pll(info, &par->pll);
2670
2671 if (par->aux_start)
2672 aty_st_le32(BUS_CNTL, aty_ld_le32(BUS_CNTL, par) | BUS_APER_REG_DIS, par);
2673}
2674
2675#ifdef CONFIG_ATARI 2676#ifdef CONFIG_ATARI
2676static int __devinit store_video_par(char *video_str, unsigned char m64_num) 2677static int __devinit store_video_par(char *video_str, unsigned char m64_num)
2677{ 2678{
diff --git a/drivers/video/aty/radeon_accel.c b/drivers/video/aty/radeon_accel.c
index 3ca27cb13caa..4d13f68436e6 100644
--- a/drivers/video/aty/radeon_accel.c
+++ b/drivers/video/aty/radeon_accel.c
@@ -241,8 +241,8 @@ void radeonfb_engine_reset(struct radeonfb_info *rinfo)
241 INREG(HOST_PATH_CNTL); 241 INREG(HOST_PATH_CNTL);
242 OUTREG(HOST_PATH_CNTL, host_path_cntl); 242 OUTREG(HOST_PATH_CNTL, host_path_cntl);
243 243
244 if (rinfo->family != CHIP_FAMILY_R300 || 244 if (rinfo->family != CHIP_FAMILY_R300 &&
245 rinfo->family != CHIP_FAMILY_R350 || 245 rinfo->family != CHIP_FAMILY_R350 &&
246 rinfo->family != CHIP_FAMILY_RV350) 246 rinfo->family != CHIP_FAMILY_RV350)
247 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset); 247 OUTREG(RBBM_SOFT_RESET, rbbm_soft_reset);
248 248
diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c
index f9e7c29ad9bf..8c8fa35f1b7c 100644
--- a/drivers/video/aty/radeon_i2c.c
+++ b/drivers/video/aty/radeon_i2c.c
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name)
69{ 69{
70 int rc; 70 int rc;
71 71
72 strcpy(chan->adapter.name, name); 72 snprintf(chan->adapter.name, sizeof(chan->adapter.name),
73 "radeonfb %s", name);
73 chan->adapter.owner = THIS_MODULE; 74 chan->adapter.owner = THIS_MODULE;
74 chan->adapter.id = I2C_HW_B_RADEON; 75 chan->adapter.id = I2C_HW_B_RADEON;
75 chan->adapter.algo_data = &chan->algo; 76 chan->adapter.algo_data = &chan->algo;
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index fbea2bd129c7..6fa0b9d5559a 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -18,7 +18,7 @@
18#include <linux/fb.h> 18#include <linux/fb.h>
19#include <linux/backlight.h> 19#include <linux/backlight.h>
20 20
21#include <asm/cpu/dac.h> 21#include <cpu/dac.h>
22#include <asm/hp6xx.h> 22#include <asm/hp6xx.h>
23#include <asm/hd64461.h> 23#include <asm/hd64461.h>
24 24
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index 72d44dbfce82..738694d23889 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -92,7 +92,7 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
92 92
93 plcd->us = dev; 93 plcd->us = dev;
94 plcd->pdata = pdata; 94 plcd->pdata = pdata;
95 plcd->lcd = lcd_device_register("platform-lcd", dev, 95 plcd->lcd = lcd_device_register(dev_name(dev), dev,
96 plcd, &platform_lcd_ops); 96 plcd, &platform_lcd_ops);
97 if (IS_ERR(plcd->lcd)) { 97 if (IS_ERR(plcd->lcd)) {
98 dev_err(dev, "cannot register lcd device\n"); 98 dev_err(dev, "cannot register lcd device\n");
@@ -101,6 +101,8 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
101 } 101 }
102 102
103 platform_set_drvdata(pdev, plcd); 103 platform_set_drvdata(pdev, plcd);
104 platform_lcd_set_power(plcd->lcd, FB_BLANK_NORMAL);
105
104 return 0; 106 return 0;
105 107
106 err_mem: 108 err_mem:
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 6338d0e2fe07..ea07258565f0 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -68,8 +68,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
68 struct pwm_bl_data *pb; 68 struct pwm_bl_data *pb;
69 int ret; 69 int ret;
70 70
71 if (!data) 71 if (!data) {
72 dev_err(&pdev->dev, "failed to find platform data\n");
72 return -EINVAL; 73 return -EINVAL;
74 }
73 75
74 if (data->init) { 76 if (data->init) {
75 ret = data->init(&pdev->dev); 77 ret = data->init(&pdev->dev);
@@ -79,6 +81,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
79 81
80 pb = kzalloc(sizeof(*pb), GFP_KERNEL); 82 pb = kzalloc(sizeof(*pb), GFP_KERNEL);
81 if (!pb) { 83 if (!pb) {
84 dev_err(&pdev->dev, "no memory for state\n");
82 ret = -ENOMEM; 85 ret = -ENOMEM;
83 goto err_alloc; 86 goto err_alloc;
84 } 87 }
@@ -91,7 +94,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
91 dev_err(&pdev->dev, "unable to request PWM for backlight\n"); 94 dev_err(&pdev->dev, "unable to request PWM for backlight\n");
92 ret = PTR_ERR(pb->pwm); 95 ret = PTR_ERR(pb->pwm);
93 goto err_pwm; 96 goto err_pwm;
94 } 97 } else
98 dev_dbg(&pdev->dev, "got pwm for backlight\n");
95 99
96 bl = backlight_device_register(pdev->name, &pdev->dev, 100 bl = backlight_device_register(pdev->name, &pdev->dev,
97 pb, &pwm_backlight_ops); 101 pb, &pwm_backlight_ops);
@@ -183,3 +187,5 @@ module_exit(pwm_backlight_exit);
183 187
184MODULE_DESCRIPTION("PWM based Backlight Driver"); 188MODULE_DESCRIPTION("PWM based Backlight Driver");
185MODULE_LICENSE("GPL"); 189MODULE_LICENSE("GPL");
190MODULE_ALIAS("platform:pwm-backlight");
191
diff --git a/drivers/video/console/.gitignore b/drivers/video/console/.gitignore
new file mode 100644
index 000000000000..0c258b45439c
--- /dev/null
+++ b/drivers/video/console/.gitignore
@@ -0,0 +1,2 @@
1# conmakehash generated file
2promcon_tbl.c
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 3ccfa76d9b2a..33859934a8e4 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1311,6 +1311,9 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
1311 if (!height || !width) 1311 if (!height || !width)
1312 return; 1312 return;
1313 1313
1314 if (sy < vc->vc_top && vc->vc_top == logo_lines)
1315 vc->vc_top = 0;
1316
1314 /* Split blits that cross physical y_wrap boundary */ 1317 /* Split blits that cross physical y_wrap boundary */
1315 1318
1316 y_break = p->vrows - p->yscroll; 1319 y_break = p->vrows - p->yscroll;
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index d7822af0e00a..ef7870f5ea08 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -24,6 +24,7 @@
24#include <asm/hardware.h> 24#include <asm/hardware.h>
25#include <asm/parisc-device.h> 25#include <asm/parisc-device.h>
26#include <asm/cacheflush.h> 26#include <asm/cacheflush.h>
27#include <asm/grfioctl.h>
27 28
28#include "../sticore.h" 29#include "../sticore.h"
29 30
@@ -725,6 +726,7 @@ static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti,
725{ 726{
726 struct sti_cooked_rom *cooked; 727 struct sti_cooked_rom *cooked;
727 struct sti_rom *raw = NULL; 728 struct sti_rom *raw = NULL;
729 unsigned long revno;
728 730
729 cooked = kmalloc(sizeof *cooked, GFP_KERNEL); 731 cooked = kmalloc(sizeof *cooked, GFP_KERNEL);
730 if (!cooked) 732 if (!cooked)
@@ -767,9 +769,35 @@ static int __devinit sti_read_rom(int wordmode, struct sti_struct *sti,
767 sti->graphics_id[1] = raw->graphics_id[1]; 769 sti->graphics_id[1] = raw->graphics_id[1];
768 770
769 sti_dump_rom(raw); 771 sti_dump_rom(raw);
770 772
773 /* check if the ROM routines in this card are compatible */
774 if (wordmode || sti->graphics_id[1] != 0x09A02587)
775 goto ok;
776
777 revno = (raw->revno[0] << 8) | raw->revno[1];
778
779 switch (sti->graphics_id[0]) {
780 case S9000_ID_HCRX:
781 /* HyperA or HyperB ? */
782 if (revno == 0x8408 || revno == 0x840b)
783 goto msg_not_supported;
784 break;
785 case CRT_ID_THUNDER:
786 if (revno == 0x8509)
787 goto msg_not_supported;
788 break;
789 case CRT_ID_THUNDER2:
790 if (revno == 0x850c)
791 goto msg_not_supported;
792 }
793ok:
771 return 1; 794 return 1;
772 795
796msg_not_supported:
797 printk(KERN_ERR "Sorry, this GSC/STI card is not yet supported.\n");
798 printk(KERN_ERR "Please see http://parisc-linux.org/faq/"
799 "graphics-howto.html for more info.\n");
800 /* fall through */
773out_err: 801out_err:
774 kfree(raw); 802 kfree(raw);
775 kfree(cooked); 803 kfree(cooked);
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 9cd36c223d33..bd320a2bfb7c 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1649,8 +1649,10 @@ static int __init fsl_diu_init(void)
1649 } 1649 }
1650 1650
1651 prop = of_get_property(np, "d-cache-size", NULL); 1651 prop = of_get_property(np, "d-cache-size", NULL);
1652 if (prop == NULL) 1652 if (prop == NULL) {
1653 of_node_put(np);
1653 return -ENODEV; 1654 return -ENODEV;
1655 }
1654 1656
1655 /* Freescale PLRU requires 13/8 times the cache size to do a proper 1657 /* Freescale PLRU requires 13/8 times the cache size to do a proper
1656 displacement flush 1658 displacement flush
@@ -1659,8 +1661,10 @@ static int __init fsl_diu_init(void)
1659 coherence_data_size /= 8; 1661 coherence_data_size /= 8;
1660 1662
1661 prop = of_get_property(np, "d-cache-line-size", NULL); 1663 prop = of_get_property(np, "d-cache-line-size", NULL);
1662 if (prop == NULL) 1664 if (prop == NULL) {
1665 of_node_put(np);
1663 return -ENODEV; 1666 return -ENODEV;
1667 }
1664 d_cache_line_size = *prop; 1668 d_cache_line_size = *prop;
1665 1669
1666 of_node_put(np); 1670 of_node_put(np);
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index 2e552d5bbb5d..f89c3cce1e0c 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -87,6 +87,8 @@ static int gbe_revision;
87static int ypan, ywrap; 87static int ypan, ywrap;
88 88
89static uint32_t pseudo_palette[16]; 89static uint32_t pseudo_palette[16];
90static uint32_t gbe_cmap[256];
91static int gbe_turned_on; /* 0 turned off, 1 turned on */
90 92
91static char *mode_option __initdata = NULL; 93static char *mode_option __initdata = NULL;
92 94
@@ -208,6 +210,8 @@ void gbe_turn_off(void)
208 int i; 210 int i;
209 unsigned int val, x, y, vpixen_off; 211 unsigned int val, x, y, vpixen_off;
210 212
213 gbe_turned_on = 0;
214
211 /* check if pixel counter is on */ 215 /* check if pixel counter is on */
212 val = gbe->vt_xy; 216 val = gbe->vt_xy;
213 if (GET_GBE_FIELD(VT_XY, FREEZE, val) == 1) 217 if (GET_GBE_FIELD(VT_XY, FREEZE, val) == 1)
@@ -371,6 +375,22 @@ static void gbe_turn_on(void)
371 } 375 }
372 if (i == 10000) 376 if (i == 10000)
373 printk(KERN_ERR "gbefb: turn on DMA timed out\n"); 377 printk(KERN_ERR "gbefb: turn on DMA timed out\n");
378
379 gbe_turned_on = 1;
380}
381
382static void gbe_loadcmap(void)
383{
384 int i, j;
385
386 for (i = 0; i < 256; i++) {
387 for (j = 0; j < 1000 && gbe->cm_fifo >= 63; j++)
388 udelay(10);
389 if (j == 1000)
390 printk(KERN_ERR "gbefb: cmap FIFO timeout\n");
391
392 gbe->cmap[i] = gbe_cmap[i];
393 }
374} 394}
375 395
376/* 396/*
@@ -382,6 +402,7 @@ static int gbefb_blank(int blank, struct fb_info *info)
382 switch (blank) { 402 switch (blank) {
383 case FB_BLANK_UNBLANK: /* unblank */ 403 case FB_BLANK_UNBLANK: /* unblank */
384 gbe_turn_on(); 404 gbe_turn_on();
405 gbe_loadcmap();
385 break; 406 break;
386 407
387 case FB_BLANK_NORMAL: /* blank */ 408 case FB_BLANK_NORMAL: /* blank */
@@ -796,16 +817,10 @@ static int gbefb_set_par(struct fb_info *info)
796 gbe->gmap[i] = (i << 24) | (i << 16) | (i << 8); 817 gbe->gmap[i] = (i << 24) | (i << 16) | (i << 8);
797 818
798 /* Initialize the color map */ 819 /* Initialize the color map */
799 for (i = 0; i < 256; i++) { 820 for (i = 0; i < 256; i++)
800 int j; 821 gbe_cmap[i] = (i << 8) | (i << 16) | (i << 24);
801
802 for (j = 0; j < 1000 && gbe->cm_fifo >= 63; j++)
803 udelay(10);
804 if (j == 1000)
805 printk(KERN_ERR "gbefb: cmap FIFO timeout\n");
806 822
807 gbe->cmap[i] = (i << 8) | (i << 16) | (i << 24); 823 gbe_loadcmap();
808 }
809 824
810 return 0; 825 return 0;
811} 826}
@@ -855,14 +870,17 @@ static int gbefb_setcolreg(unsigned regno, unsigned red, unsigned green,
855 blue >>= 8; 870 blue >>= 8;
856 871
857 if (info->var.bits_per_pixel <= 8) { 872 if (info->var.bits_per_pixel <= 8) {
858 /* wait for the color map FIFO to have a free entry */ 873 gbe_cmap[regno] = (red << 24) | (green << 16) | (blue << 8);
859 for (i = 0; i < 1000 && gbe->cm_fifo >= 63; i++) 874 if (gbe_turned_on) {
860 udelay(10); 875 /* wait for the color map FIFO to have a free entry */
861 if (i == 1000) { 876 for (i = 0; i < 1000 && gbe->cm_fifo >= 63; i++)
862 printk(KERN_ERR "gbefb: cmap FIFO timeout\n"); 877 udelay(10);
863 return 1; 878 if (i == 1000) {
879 printk(KERN_ERR "gbefb: cmap FIFO timeout\n");
880 return 1;
881 }
882 gbe->cmap[regno] = gbe_cmap[regno];
864 } 883 }
865 gbe->cmap[regno] = (red << 24) | (green << 16) | (blue << 8);
866 } else if (regno < 16) { 884 } else if (regno < 16) {
867 switch (info->var.bits_per_pixel) { 885 switch (info->var.bits_per_pixel) {
868 case 15: 886 case 15:
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 392a8be6aa76..e6467cf9f19f 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -27,7 +27,7 @@
27#include <asm/pgtable.h> 27#include <asm/pgtable.h>
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/hd64461.h> 29#include <asm/hd64461.h>
30#include <asm/cpu/dac.h> 30#include <cpu/dac.h>
31 31
32#define WIDTH 640 32#define WIDTH 640
33 33
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 54e82f35353d..c02136202792 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -2536,7 +2536,7 @@ module_param(fh, int, 0);
2536MODULE_PARM_DESC(fh, "Startup horizontal frequency, 0-999kHz, 1000-INF Hz"); 2536MODULE_PARM_DESC(fh, "Startup horizontal frequency, 0-999kHz, 1000-INF Hz");
2537module_param(fv, int, 0); 2537module_param(fv, int, 0);
2538MODULE_PARM_DESC(fv, "Startup vertical frequency, 0-INF Hz\n" 2538MODULE_PARM_DESC(fv, "Startup vertical frequency, 0-INF Hz\n"
2539"You should specify \"fv:max_monitor_vsync,fh:max_monitor_hsync,maxclk:max_monitor_dotclock\"\n"); 2539"You should specify \"fv:max_monitor_vsync,fh:max_monitor_hsync,maxclk:max_monitor_dotclock\"");
2540module_param(grayscale, int, 0); 2540module_param(grayscale, int, 0);
2541MODULE_PARM_DESC(grayscale, "Sets display into grayscale. Works perfectly with paletized videomode (4, 8bpp), some limitations apply to 16, 24 and 32bpp videomodes (default=nograyscale)"); 2541MODULE_PARM_DESC(grayscale, "Sets display into grayscale. Works perfectly with paletized videomode (4, 8bpp), some limitations apply to 16, 24 and 32bpp videomodes (default=nograyscale)");
2542module_param(cross4MB, int, 0); 2542module_param(cross4MB, int, 0);
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index 8c863a7f654b..0a0fd48a8566 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -58,18 +58,18 @@
58 58
59#ifdef CONFIG_SH_DREAMCAST 59#ifdef CONFIG_SH_DREAMCAST
60#include <asm/machvec.h> 60#include <asm/machvec.h>
61#include <asm/mach/sysasic.h> 61#include <mach-dreamcast/mach/sysasic.h>
62#endif 62#endif
63 63
64#ifdef CONFIG_SH_DMA 64#ifdef CONFIG_SH_DMA
65#include <linux/pagemap.h> 65#include <linux/pagemap.h>
66#include <asm/mach/dma.h> 66#include <mach/dma.h>
67#include <asm/dma.h> 67#include <asm/dma.h>
68#endif 68#endif
69 69
70#ifdef CONFIG_SH_STORE_QUEUES 70#ifdef CONFIG_SH_STORE_QUEUES
71#include <linux/uaccess.h> 71#include <linux/uaccess.h>
72#include <asm/cpu/sq.h> 72#include <cpu/sq.h>
73#endif 73#endif
74 74
75#ifndef PCI_DEVICE_ID_NEC_NEON250 75#ifndef PCI_DEVICE_ID_NEC_NEON250
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 2972f112dbed..8361bd0e3df1 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -903,13 +903,13 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
903 /* Prepare PCI device */ 903 /* Prepare PCI device */
904 rc = pci_enable_device(dev); 904 rc = pci_enable_device(dev);
905 if (rc < 0) { 905 if (rc < 0) {
906 dev_err(info->dev, "cannot enable PCI device\n"); 906 dev_err(info->device, "cannot enable PCI device\n");
907 goto err_enable_device; 907 goto err_enable_device;
908 } 908 }
909 909
910 rc = pci_request_regions(dev, "s3fb"); 910 rc = pci_request_regions(dev, "s3fb");
911 if (rc < 0) { 911 if (rc < 0) {
912 dev_err(info->dev, "cannot reserve framebuffer region\n"); 912 dev_err(info->device, "cannot reserve framebuffer region\n");
913 goto err_request_regions; 913 goto err_request_regions;
914 } 914 }
915 915
@@ -921,7 +921,7 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
921 info->screen_base = pci_iomap(dev, 0, 0); 921 info->screen_base = pci_iomap(dev, 0, 0);
922 if (! info->screen_base) { 922 if (! info->screen_base) {
923 rc = -ENOMEM; 923 rc = -ENOMEM;
924 dev_err(info->dev, "iomap for framebuffer failed\n"); 924 dev_err(info->device, "iomap for framebuffer failed\n");
925 goto err_iomap; 925 goto err_iomap;
926 } 926 }
927 927
@@ -965,19 +965,19 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
965 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); 965 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8);
966 if (! ((rc == 1) || (rc == 2))) { 966 if (! ((rc == 1) || (rc == 2))) {
967 rc = -EINVAL; 967 rc = -EINVAL;
968 dev_err(info->dev, "mode %s not found\n", mode_option); 968 dev_err(info->device, "mode %s not found\n", mode_option);
969 goto err_find_mode; 969 goto err_find_mode;
970 } 970 }
971 971
972 rc = fb_alloc_cmap(&info->cmap, 256, 0); 972 rc = fb_alloc_cmap(&info->cmap, 256, 0);
973 if (rc < 0) { 973 if (rc < 0) {
974 dev_err(info->dev, "cannot allocate colormap\n"); 974 dev_err(info->device, "cannot allocate colormap\n");
975 goto err_alloc_cmap; 975 goto err_alloc_cmap;
976 } 976 }
977 977
978 rc = register_framebuffer(info); 978 rc = register_framebuffer(info);
979 if (rc < 0) { 979 if (rc < 0) {
980 dev_err(info->dev, "cannot register framebuffer\n"); 980 dev_err(info->device, "cannot register framebuffer\n");
981 goto err_reg_fb; 981 goto err_reg_fb;
982 } 982 }
983 983
@@ -1053,7 +1053,7 @@ static int s3_pci_suspend(struct pci_dev* dev, pm_message_t state)
1053 struct fb_info *info = pci_get_drvdata(dev); 1053 struct fb_info *info = pci_get_drvdata(dev);
1054 struct s3fb_info *par = info->par; 1054 struct s3fb_info *par = info->par;
1055 1055
1056 dev_info(info->dev, "suspend\n"); 1056 dev_info(info->device, "suspend\n");
1057 1057
1058 acquire_console_sem(); 1058 acquire_console_sem();
1059 mutex_lock(&(par->open_lock)); 1059 mutex_lock(&(par->open_lock));
@@ -1085,7 +1085,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1085 struct s3fb_info *par = info->par; 1085 struct s3fb_info *par = info->par;
1086 int err; 1086 int err;
1087 1087
1088 dev_info(info->dev, "resume\n"); 1088 dev_info(info->device, "resume\n");
1089 1089
1090 acquire_console_sem(); 1090 acquire_console_sem();
1091 mutex_lock(&(par->open_lock)); 1091 mutex_lock(&(par->open_lock));
@@ -1102,7 +1102,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1102 if (err) { 1102 if (err) {
1103 mutex_unlock(&(par->open_lock)); 1103 mutex_unlock(&(par->open_lock));
1104 release_console_sem(); 1104 release_console_sem();
1105 dev_err(info->dev, "error %d enabling device for resume\n", err); 1105 dev_err(info->device, "error %d enabling device for resume\n", err);
1106 return err; 1106 return err;
1107 } 1107 }
1108 pci_set_master(dev); 1108 pci_set_master(dev);
diff --git a/drivers/video/sh7760fb.c b/drivers/video/sh7760fb.c
index 4d0e28c5790b..8d0212da4514 100644
--- a/drivers/video/sh7760fb.c
+++ b/drivers/video/sh7760fb.c
@@ -152,6 +152,7 @@ static int sh7760fb_setcmap(struct fb_cmap *cmap, struct fb_info *info)
152 col |= ((*g) & 0xff) << 8; 152 col |= ((*g) & 0xff) << 8;
153 col |= ((*b) & 0xff); 153 col |= ((*b) & 0xff);
154 col &= SH7760FB_PALETTE_MASK; 154 col &= SH7760FB_PALETTE_MASK;
155 iowrite32(col, par->base + LDPR(s));
155 156
156 if (s < 16) 157 if (s < 16)
157 ((u32 *) (info->pseudo_palette))[s] = s; 158 ((u32 *) (info->pseudo_palette))[s] = s;
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c
index 536ab11623f0..34aae7a2a62b 100644
--- a/drivers/video/vt8623fb.c
+++ b/drivers/video/vt8623fb.c
@@ -677,13 +677,13 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi
677 677
678 rc = pci_enable_device(dev); 678 rc = pci_enable_device(dev);
679 if (rc < 0) { 679 if (rc < 0) {
680 dev_err(info->dev, "cannot enable PCI device\n"); 680 dev_err(info->device, "cannot enable PCI device\n");
681 goto err_enable_device; 681 goto err_enable_device;
682 } 682 }
683 683
684 rc = pci_request_regions(dev, "vt8623fb"); 684 rc = pci_request_regions(dev, "vt8623fb");
685 if (rc < 0) { 685 if (rc < 0) {
686 dev_err(info->dev, "cannot reserve framebuffer region\n"); 686 dev_err(info->device, "cannot reserve framebuffer region\n");
687 goto err_request_regions; 687 goto err_request_regions;
688 } 688 }
689 689
@@ -696,14 +696,14 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi
696 info->screen_base = pci_iomap(dev, 0, 0); 696 info->screen_base = pci_iomap(dev, 0, 0);
697 if (! info->screen_base) { 697 if (! info->screen_base) {
698 rc = -ENOMEM; 698 rc = -ENOMEM;
699 dev_err(info->dev, "iomap for framebuffer failed\n"); 699 dev_err(info->device, "iomap for framebuffer failed\n");
700 goto err_iomap_1; 700 goto err_iomap_1;
701 } 701 }
702 702
703 par->mmio_base = pci_iomap(dev, 1, 0); 703 par->mmio_base = pci_iomap(dev, 1, 0);
704 if (! par->mmio_base) { 704 if (! par->mmio_base) {
705 rc = -ENOMEM; 705 rc = -ENOMEM;
706 dev_err(info->dev, "iomap for MMIO failed\n"); 706 dev_err(info->device, "iomap for MMIO failed\n");
707 goto err_iomap_2; 707 goto err_iomap_2;
708 } 708 }
709 709
@@ -714,7 +714,7 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi
714 if ((16 <= memsize1) && (memsize1 <= 64) && (memsize1 == memsize2)) 714 if ((16 <= memsize1) && (memsize1 <= 64) && (memsize1 == memsize2))
715 info->screen_size = memsize1 << 20; 715 info->screen_size = memsize1 << 20;
716 else { 716 else {
717 dev_err(info->dev, "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2); 717 dev_err(info->device, "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2);
718 info->screen_size = 16 << 20; 718 info->screen_size = 16 << 20;
719 } 719 }
720 720
@@ -731,19 +731,19 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi
731 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); 731 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8);
732 if (! ((rc == 1) || (rc == 2))) { 732 if (! ((rc == 1) || (rc == 2))) {
733 rc = -EINVAL; 733 rc = -EINVAL;
734 dev_err(info->dev, "mode %s not found\n", mode_option); 734 dev_err(info->device, "mode %s not found\n", mode_option);
735 goto err_find_mode; 735 goto err_find_mode;
736 } 736 }
737 737
738 rc = fb_alloc_cmap(&info->cmap, 256, 0); 738 rc = fb_alloc_cmap(&info->cmap, 256, 0);
739 if (rc < 0) { 739 if (rc < 0) {
740 dev_err(info->dev, "cannot allocate colormap\n"); 740 dev_err(info->device, "cannot allocate colormap\n");
741 goto err_alloc_cmap; 741 goto err_alloc_cmap;
742 } 742 }
743 743
744 rc = register_framebuffer(info); 744 rc = register_framebuffer(info);
745 if (rc < 0) { 745 if (rc < 0) {
746 dev_err(info->dev, "cannot register framebugger\n"); 746 dev_err(info->device, "cannot register framebugger\n");
747 goto err_reg_fb; 747 goto err_reg_fb;
748 } 748 }
749 749
@@ -817,7 +817,7 @@ static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state)
817 struct fb_info *info = pci_get_drvdata(dev); 817 struct fb_info *info = pci_get_drvdata(dev);
818 struct vt8623fb_info *par = info->par; 818 struct vt8623fb_info *par = info->par;
819 819
820 dev_info(info->dev, "suspend\n"); 820 dev_info(info->device, "suspend\n");
821 821
822 acquire_console_sem(); 822 acquire_console_sem();
823 mutex_lock(&(par->open_lock)); 823 mutex_lock(&(par->open_lock));
@@ -848,16 +848,13 @@ static int vt8623_pci_resume(struct pci_dev* dev)
848 struct fb_info *info = pci_get_drvdata(dev); 848 struct fb_info *info = pci_get_drvdata(dev);
849 struct vt8623fb_info *par = info->par; 849 struct vt8623fb_info *par = info->par;
850 850
851 dev_info(info->dev, "resume\n"); 851 dev_info(info->device, "resume\n");
852 852
853 acquire_console_sem(); 853 acquire_console_sem();
854 mutex_lock(&(par->open_lock)); 854 mutex_lock(&(par->open_lock));
855 855
856 if (par->ref_count == 0) { 856 if (par->ref_count == 0)
857 mutex_unlock(&(par->open_lock)); 857 goto fail;
858 release_console_sem();
859 return 0;
860 }
861 858
862 pci_set_power_state(dev, PCI_D0); 859 pci_set_power_state(dev, PCI_D0);
863 pci_restore_state(dev); 860 pci_restore_state(dev);
@@ -870,8 +867,8 @@ static int vt8623_pci_resume(struct pci_dev* dev)
870 vt8623fb_set_par(info); 867 vt8623fb_set_par(info);
871 fb_set_suspend(info, 0); 868 fb_set_suspend(info, 0);
872 869
873 mutex_unlock(&(par->open_lock));
874fail: 870fail:
871 mutex_unlock(&(par->open_lock));
875 release_console_sem(); 872 release_console_sem();
876 873
877 return 0; 874 return 0;