aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/intelfb/intelfbdrv.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 94f35a635ccd..7a5750b449a8 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -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 }