aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/intelfb
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2005-09-09 16:04:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:59 -0400
commit4c7ffe0b9f7f40bd818fe3af51342f64c483908e (patch)
tree2827dd7904f46cbaff935e221563cd017707f10f /drivers/video/intelfb
parentd2d58384fc5d4c0fe2d8e34bc2d15a90a9bb372a (diff)
[PATCH] fbdev: prevent drivers that have hardware cursors from calling software cursor code
This patch removes drivers that have hardware cursors from calling the software cursor code. Also if the driver sets a no hardware cursor flag then the driver reports a error it someone attempts to use the cursor. Signed-off-by: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/intelfb')
-rw-r--r--drivers/video/intelfb/intelfb.h1
-rw-r--r--drivers/video/intelfb/intelfbdrv.c21
-rw-r--r--drivers/video/intelfb/intelfbhw.c4
3 files changed, 3 insertions, 23 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index 6680ec9ba69e..011e11626558 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -234,7 +234,6 @@ struct intelfb_info {
234 234
235 /* palette */ 235 /* palette */
236 u32 pseudo_palette[17]; 236 u32 pseudo_palette[17];
237 struct { u8 red, green, blue, pad; } palette[256];
238 237
239 /* chip info */ 238 /* chip info */
240 int pci_chipset; 239 int pci_chipset;
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index a112a1786855..bf62e6ed0382 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -117,14 +117,10 @@
117#include <linux/slab.h> 117#include <linux/slab.h>
118#include <linux/delay.h> 118#include <linux/delay.h>
119#include <linux/fb.h> 119#include <linux/fb.h>
120#include <linux/console.h>
121#include <linux/selection.h>
122#include <linux/ioport.h> 120#include <linux/ioport.h>
123#include <linux/init.h> 121#include <linux/init.h>
124#include <linux/pci.h> 122#include <linux/pci.h>
125#include <linux/vmalloc.h> 123#include <linux/vmalloc.h>
126#include <linux/kd.h>
127#include <linux/vt_kern.h>
128#include <linux/pagemap.h> 124#include <linux/pagemap.h>
129#include <linux/version.h> 125#include <linux/version.h>
130 126
@@ -242,7 +238,7 @@ static int voffset = 48;
242static char *mode = NULL; 238static char *mode = NULL;
243 239
244module_param(accel, bool, S_IRUGO); 240module_param(accel, bool, S_IRUGO);
245MODULE_PARM_DESC(accel, "Enable console acceleration"); 241MODULE_PARM_DESC(accel, "Enable hardware acceleration");
246module_param(vram, int, S_IRUGO); 242module_param(vram, int, S_IRUGO);
247MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); 243MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
248module_param(voffset, int, S_IRUGO); 244module_param(voffset, int, S_IRUGO);
@@ -498,7 +494,7 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
498{ 494{
499 struct fb_info *info; 495 struct fb_info *info;
500 struct intelfb_info *dinfo; 496 struct intelfb_info *dinfo;
501 int i, j, err, dvo; 497 int i, err, dvo;
502 int aperture_size, stolen_size; 498 int aperture_size, stolen_size;
503 struct agp_kern_info gtt_info; 499 struct agp_kern_info gtt_info;
504 int agp_memtype; 500 int agp_memtype;
@@ -845,13 +841,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
845 if (bailearly == 5) 841 if (bailearly == 5)
846 bailout(dinfo); 842 bailout(dinfo);
847 843
848 for (i = 0; i < 16; i++) {
849 j = color_table[i];
850 dinfo->palette[i].red = default_red[j];
851 dinfo->palette[i].green = default_grn[j];
852 dinfo->palette[i].blue = default_blu[j];
853 }
854
855 if (bailearly == 6) 844 if (bailearly == 6)
856 bailout(dinfo); 845 bailout(dinfo);
857 846
@@ -1363,10 +1352,6 @@ intelfb_setcolreg(unsigned regno, unsigned red, unsigned green,
1363 green >>= 8; 1352 green >>= 8;
1364 blue >>= 8; 1353 blue >>= 8;
1365 1354
1366 dinfo->palette[regno].red = red;
1367 dinfo->palette[regno].green = green;
1368 dinfo->palette[regno].blue = blue;
1369
1370 intelfbhw_setcolreg(dinfo, regno, red, green, blue, 1355 intelfbhw_setcolreg(dinfo, regno, red, green, blue,
1371 transp); 1356 transp);
1372 } 1357 }
@@ -1499,7 +1484,7 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1499#endif 1484#endif
1500 1485
1501 if (!dinfo->hwcursor) 1486 if (!dinfo->hwcursor)
1502 return soft_cursor(info, cursor); 1487 return -ENXIO;
1503 1488
1504 intelfbhw_cursor_hide(dinfo); 1489 intelfbhw_cursor_hide(dinfo);
1505 1490
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index f5bed581dc45..5bafc3c54db7 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -29,14 +29,10 @@
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/fb.h> 31#include <linux/fb.h>
32#include <linux/console.h>
33#include <linux/selection.h>
34#include <linux/ioport.h> 32#include <linux/ioport.h>
35#include <linux/init.h> 33#include <linux/init.h>
36#include <linux/pci.h> 34#include <linux/pci.h>
37#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
38#include <linux/kd.h>
39#include <linux/vt_kern.h>
40#include <linux/pagemap.h> 36#include <linux/pagemap.h>
41#include <linux/version.h> 37#include <linux/version.h>
42 38