diff options
Diffstat (limited to 'drivers/video/intelfb/intelfbdrv.c')
| -rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 549e22939260..298bc9cd99e7 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
| @@ -214,7 +214,7 @@ static struct fb_ops intel_fb_ops = { | |||
| 214 | 214 | ||
| 215 | /* PCI driver module table */ | 215 | /* PCI driver module table */ |
| 216 | static struct pci_driver intelfb_driver = { | 216 | static struct pci_driver intelfb_driver = { |
| 217 | .name = "Intel(R) " SUPPORTED_CHIPSETS " Framebuffer Driver", | 217 | .name = "intelfb", |
| 218 | .id_table = intelfb_pci_table, | 218 | .id_table = intelfb_pci_table, |
| 219 | .probe = intelfb_pci_register, | 219 | .probe = intelfb_pci_register, |
| 220 | .remove = __devexit_p(intelfb_pci_unregister) | 220 | .remove = __devexit_p(intelfb_pci_unregister) |
| @@ -228,22 +228,25 @@ MODULE_DESCRIPTION( | |||
| 228 | MODULE_LICENSE("Dual BSD/GPL"); | 228 | MODULE_LICENSE("Dual BSD/GPL"); |
| 229 | MODULE_DEVICE_TABLE(pci, intelfb_pci_table); | 229 | MODULE_DEVICE_TABLE(pci, intelfb_pci_table); |
| 230 | 230 | ||
| 231 | static int accel __initdata = 1; | 231 | static int accel = 1; |
| 232 | static int vram __initdata = 4; | 232 | static int vram = 4; |
| 233 | static int hwcursor __initdata = 1; | 233 | static int hwcursor = 1; |
| 234 | static int mtrr __initdata = 1; | 234 | static int mtrr = 1; |
| 235 | static int fixed __initdata = 0; | 235 | static int fixed = 0; |
| 236 | static int noinit __initdata = 0; | 236 | static int noinit = 0; |
| 237 | static int noregister __initdata = 0; | 237 | static int noregister = 0; |
| 238 | static int probeonly __initdata = 0; | 238 | static int probeonly = 0; |
| 239 | static int idonly __initdata = 0; | 239 | static int idonly = 0; |
| 240 | static int bailearly __initdata = 0; | 240 | static int bailearly = 0; |
| 241 | static char *mode __initdata = NULL; | 241 | static int voffset = 48; |
| 242 | static char *mode = NULL; | ||
| 242 | 243 | ||
| 243 | module_param(accel, bool, S_IRUGO); | 244 | module_param(accel, bool, S_IRUGO); |
| 244 | MODULE_PARM_DESC(accel, "Enable console acceleration"); | 245 | MODULE_PARM_DESC(accel, "Enable console acceleration"); |
| 245 | module_param(vram, int, S_IRUGO); | 246 | module_param(vram, int, S_IRUGO); |
| 246 | MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); | 247 | MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); |
| 248 | module_param(voffset, int, S_IRUGO); | ||
| 249 | MODULE_PARM_DESC(voffset, "Offset of framebuffer in MiB"); | ||
| 247 | module_param(hwcursor, bool, S_IRUGO); | 250 | module_param(hwcursor, bool, S_IRUGO); |
| 248 | MODULE_PARM_DESC(hwcursor, "Enable HW cursor"); | 251 | MODULE_PARM_DESC(hwcursor, "Enable HW cursor"); |
| 249 | module_param(mtrr, bool, S_IRUGO); | 252 | module_param(mtrr, bool, S_IRUGO); |
| @@ -503,6 +506,7 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 503 | struct agp_bridge_data *bridge; | 506 | struct agp_bridge_data *bridge; |
| 504 | int aperture_bar = 0; | 507 | int aperture_bar = 0; |
| 505 | int mmio_bar = 1; | 508 | int mmio_bar = 1; |
| 509 | int offset; | ||
| 506 | 510 | ||
| 507 | DBG_MSG("intelfb_pci_register\n"); | 511 | DBG_MSG("intelfb_pci_register\n"); |
| 508 | 512 | ||
| @@ -659,17 +663,21 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 659 | return -ENODEV; | 663 | return -ENODEV; |
| 660 | } | 664 | } |
| 661 | 665 | ||
| 666 | if (MB(voffset) < stolen_size) | ||
| 667 | offset = (stolen_size >> 12); | ||
| 668 | else | ||
| 669 | offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; | ||
| 670 | |||
| 662 | /* set the mem offsets - set them after the already used pages */ | 671 | /* set the mem offsets - set them after the already used pages */ |
| 663 | if (dinfo->accel) { | 672 | if (dinfo->accel) { |
| 664 | dinfo->ring.offset = (stolen_size >> 12) | 673 | dinfo->ring.offset = offset + gtt_info.current_memory; |
| 665 | + gtt_info.current_memory; | ||
| 666 | } | 674 | } |
| 667 | if (dinfo->hwcursor) { | 675 | if (dinfo->hwcursor) { |
| 668 | dinfo->cursor.offset = (stolen_size >> 12) + | 676 | dinfo->cursor.offset = offset + |
| 669 | + gtt_info.current_memory + (dinfo->ring.size >> 12); | 677 | + gtt_info.current_memory + (dinfo->ring.size >> 12); |
| 670 | } | 678 | } |
| 671 | if (dinfo->fbmem_gart) { | 679 | if (dinfo->fbmem_gart) { |
| 672 | dinfo->fb.offset = (stolen_size >> 12) + | 680 | dinfo->fb.offset = offset + |
| 673 | + gtt_info.current_memory + (dinfo->ring.size >> 12) | 681 | + gtt_info.current_memory + (dinfo->ring.size >> 12) |
| 674 | + (dinfo->cursor.size >> 12); | 682 | + (dinfo->cursor.size >> 12); |
| 675 | } | 683 | } |
| @@ -1083,6 +1091,7 @@ intelfb_set_fbinfo(struct intelfb_info *dinfo) | |||
| 1083 | 1091 | ||
| 1084 | info->pixmap.size = 64*1024; | 1092 | info->pixmap.size = 64*1024; |
| 1085 | info->pixmap.buf_align = 8; | 1093 | info->pixmap.buf_align = 8; |
| 1094 | info->pixmap.access_align = 32; | ||
| 1086 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | 1095 | info->pixmap.flags = FB_PIXMAP_SYSTEM; |
| 1087 | 1096 | ||
| 1088 | if (intelfb_init_var(dinfo)) | 1097 | if (intelfb_init_var(dinfo)) |
| @@ -1293,7 +1302,7 @@ intelfb_set_par(struct fb_info *info) | |||
| 1293 | 1302 | ||
| 1294 | intelfb_blank(FB_BLANK_POWERDOWN, info); | 1303 | intelfb_blank(FB_BLANK_POWERDOWN, info); |
| 1295 | 1304 | ||
| 1296 | if (dinfo->accel) | 1305 | if (ACCEL(dinfo, info)) |
| 1297 | intelfbhw_2d_stop(dinfo); | 1306 | intelfbhw_2d_stop(dinfo); |
| 1298 | 1307 | ||
| 1299 | memcpy(hw, &dinfo->save_state, sizeof(*hw)); | 1308 | memcpy(hw, &dinfo->save_state, sizeof(*hw)); |
| @@ -1309,7 +1318,7 @@ intelfb_set_par(struct fb_info *info) | |||
| 1309 | 1318 | ||
| 1310 | update_dinfo(dinfo, &info->var); | 1319 | update_dinfo(dinfo, &info->var); |
| 1311 | 1320 | ||
| 1312 | if (dinfo->accel) | 1321 | if (ACCEL(dinfo, info)) |
| 1313 | intelfbhw_2d_start(dinfo); | 1322 | intelfbhw_2d_start(dinfo); |
| 1314 | 1323 | ||
| 1315 | intelfb_pan_display(&info->var, info); | 1324 | intelfb_pan_display(&info->var, info); |
