diff options
author | James Simmons <jsimmons@infradead.org> | 2005-09-09 16:04:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 16:57:59 -0400 |
commit | 4c7ffe0b9f7f40bd818fe3af51342f64c483908e (patch) | |
tree | 2827dd7904f46cbaff935e221563cd017707f10f /drivers/video/intelfb/intelfbdrv.c | |
parent | d2d58384fc5d4c0fe2d8e34bc2d15a90a9bb372a (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/intelfbdrv.c')
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 21 |
1 files changed, 3 insertions, 18 deletions
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; | |||
242 | static char *mode = NULL; | 238 | static char *mode = NULL; |
243 | 239 | ||
244 | module_param(accel, bool, S_IRUGO); | 240 | module_param(accel, bool, S_IRUGO); |
245 | MODULE_PARM_DESC(accel, "Enable console acceleration"); | 241 | MODULE_PARM_DESC(accel, "Enable hardware acceleration"); |
246 | module_param(vram, int, S_IRUGO); | 242 | module_param(vram, int, S_IRUGO); |
247 | MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); | 243 | MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); |
248 | module_param(voffset, int, S_IRUGO); | 244 | module_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 | ||