diff options
author | Sylvain Meyer <sylvain.meyer@worldonline.fr> | 2005-06-21 20:17:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:07:40 -0400 |
commit | 27aef2d49f9d82c58e65d72abcd636168ec19ac9 (patch) | |
tree | c9dbbec06c9d6892e3cbfbed6a7d2281225737c2 /drivers/video | |
parent | f18cd8f7053a1e6755d1c1396884b2bfa1577e54 (diff) |
[PATCH] intelfb: Add voffset option to avoid conficts with Xorg i810 driver
- Add voffset option to avoid conficts with Xorg i810 driver
Signed-off-by: Sylvain Meyer <sylvain.meyer@worldonline.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 16 |
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; | |||
238 | static int probeonly = 0; | 238 | static int probeonly = 0; |
239 | static int idonly = 0; | 239 | static int idonly = 0; |
240 | static int bailearly = 0; | 240 | static int bailearly = 0; |
241 | static int voffset = 48; | ||
241 | static char *mode = NULL; | 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 | } |