aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/arkfb.c9
-rw-r--r--drivers/video/backlight/platform_lcd.c4
-rw-r--r--drivers/video/console/sticore.c30
-rw-r--r--drivers/video/gbefb.c50
-rw-r--r--drivers/video/sh7760fb.c1
-rw-r--r--drivers/video/vt8623fb.c9
6 files changed, 73 insertions, 30 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index 5001bd4ef466..38a1e8308c83 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -1126,11 +1126,8 @@ static int ark_pci_resume (struct pci_dev* dev)
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/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/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/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/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..4a484ee98f8a 100644
--- a/drivers/video/vt8623fb.c
+++ b/drivers/video/vt8623fb.c
@@ -853,11 +853,8 @@ static int vt8623_pci_resume(struct pci_dev* dev)
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;