aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/intelfb/intelfbdrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/intelfb/intelfbdrv.c')
-rw-r--r--drivers/video/intelfb/intelfbdrv.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 25f9a9a65c24..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 */
216static struct pci_driver intelfb_driver = { 216static 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)
@@ -238,12 +238,15 @@ static int noregister = 0;
238static int probeonly = 0; 238static int probeonly = 0;
239static int idonly = 0; 239static int idonly = 0;
240static int bailearly = 0; 240static int bailearly = 0;
241static int voffset = 48;
241static char *mode = NULL; 242static char *mode = NULL;
242 243
243module_param(accel, bool, S_IRUGO); 244module_param(accel, bool, S_IRUGO);
244MODULE_PARM_DESC(accel, "Enable console acceleration"); 245MODULE_PARM_DESC(accel, "Enable console acceleration");
245module_param(vram, int, S_IRUGO); 246module_param(vram, int, S_IRUGO);
246MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB"); 247MODULE_PARM_DESC(vram, "System RAM to allocate to framebuffer in MiB");
248module_param(voffset, int, S_IRUGO);
249MODULE_PARM_DESC(voffset, "Offset of framebuffer in MiB");
247module_param(hwcursor, bool, S_IRUGO); 250module_param(hwcursor, bool, S_IRUGO);
248MODULE_PARM_DESC(hwcursor, "Enable HW cursor"); 251MODULE_PARM_DESC(hwcursor, "Enable HW cursor");
249module_param(mtrr, bool, S_IRUGO); 252module_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);