diff options
| author | Antonino A. Daplas <adaplas@gmail.com> | 2005-09-28 17:19:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-29 11:54:20 -0400 |
| commit | 375726d7ed08bd8cf2fe3cfe6b164ffb37fa7e90 (patch) | |
| tree | 2b022133a66d947e5cdecfa6f9027d914d17ee3c | |
| parent | b2846dfa4aa1bbbf3f9977d67566952d7f621009 (diff) | |
[PATCH] intelfb: Fix regression (blank display) from ioremap patch
- Workaround for the ioremap patch that produces a blank display on some
chipsets
- Make hwcursor = 0 the default. The hardware cursor does not work with all
hardware.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/video/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 21 |
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 773ae11b4a19..1cd942abb580 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
| @@ -768,6 +768,7 @@ config FB_INTEL | |||
| 768 | select FB_CFB_FILLRECT | 768 | select FB_CFB_FILLRECT |
| 769 | select FB_CFB_COPYAREA | 769 | select FB_CFB_COPYAREA |
| 770 | select FB_CFB_IMAGEBLIT | 770 | select FB_CFB_IMAGEBLIT |
| 771 | select FB_SOFT_CURSOR | ||
| 771 | help | 772 | help |
| 772 | This driver supports the on-board graphics built in to the Intel | 773 | This driver supports the on-board graphics built in to the Intel |
| 773 | 830M/845G/852GM/855GM/865G chipsets. | 774 | 830M/845G/852GM/855GM/865G chipsets. |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index bf62e6ed0382..80a09344f1aa 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
| @@ -226,7 +226,7 @@ MODULE_DEVICE_TABLE(pci, intelfb_pci_table); | |||
| 226 | 226 | ||
| 227 | static int accel = 1; | 227 | static int accel = 1; |
| 228 | static int vram = 4; | 228 | static int vram = 4; |
| 229 | static int hwcursor = 1; | 229 | static int hwcursor = 0; |
| 230 | static int mtrr = 1; | 230 | static int mtrr = 1; |
| 231 | static int fixed = 0; | 231 | static int fixed = 0; |
| 232 | static int noinit = 0; | 232 | static int noinit = 0; |
| @@ -609,15 +609,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 609 | dinfo->accel = 0; | 609 | dinfo->accel = 0; |
| 610 | } | 610 | } |
| 611 | 611 | ||
| 612 | if (MB(voffset) < stolen_size) | ||
| 613 | offset = (stolen_size >> 12); | ||
| 614 | else | ||
| 615 | offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; | ||
| 616 | |||
| 617 | /* Framebuffer parameters - Use all the stolen memory if >= vram */ | 612 | /* Framebuffer parameters - Use all the stolen memory if >= vram */ |
| 618 | if (ROUND_UP_TO_PAGE(stolen_size) >= ((offset << 12) + MB(vram))) { | 613 | if (ROUND_UP_TO_PAGE(stolen_size) >= MB(vram)) { |
| 619 | dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); | 614 | dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); |
| 620 | dinfo->fb.offset = 0; | ||
| 621 | dinfo->fbmem_gart = 0; | 615 | dinfo->fbmem_gart = 0; |
| 622 | } else { | 616 | } else { |
| 623 | dinfo->fb.size = MB(vram); | 617 | dinfo->fb.size = MB(vram); |
| @@ -648,6 +642,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 648 | return -ENODEV; | 642 | return -ENODEV; |
| 649 | } | 643 | } |
| 650 | 644 | ||
| 645 | if (MB(voffset) < stolen_size) | ||
| 646 | offset = (stolen_size >> 12); | ||
| 647 | else | ||
| 648 | offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; | ||
| 649 | |||
| 651 | /* set the mem offsets - set them after the already used pages */ | 650 | /* set the mem offsets - set them after the already used pages */ |
| 652 | if (dinfo->accel) { | 651 | if (dinfo->accel) { |
| 653 | dinfo->ring.offset = offset + gtt_info.current_memory; | 652 | dinfo->ring.offset = offset + gtt_info.current_memory; |
| @@ -662,10 +661,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 662 | + (dinfo->cursor.size >> 12); | 661 | + (dinfo->cursor.size >> 12); |
| 663 | } | 662 | } |
| 664 | 663 | ||
| 664 | /* Allocate memories (which aren't stolen) */ | ||
| 665 | /* Map the fb and MMIO regions */ | 665 | /* Map the fb and MMIO regions */ |
| 666 | /* ioremap only up to the end of used aperture */ | 666 | /* ioremap only up to the end of used aperture */ |
| 667 | dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache | 667 | dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache |
| 668 | (dinfo->aperture.physical, (dinfo->fb.offset << 12) | 668 | (dinfo->aperture.physical, ((offset + dinfo->fb.offset) << 12) |
| 669 | + dinfo->fb.size); | 669 | + dinfo->fb.size); |
| 670 | if (!dinfo->aperture.virtual) { | 670 | if (!dinfo->aperture.virtual) { |
| 671 | ERR_MSG("Cannot remap FB region.\n"); | 671 | ERR_MSG("Cannot remap FB region.\n"); |
| @@ -682,7 +682,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 682 | return -ENODEV; | 682 | return -ENODEV; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | /* Allocate memories (which aren't stolen) */ | ||
| 686 | if (dinfo->accel) { | 685 | if (dinfo->accel) { |
| 687 | if (!(dinfo->gtt_ring_mem = | 686 | if (!(dinfo->gtt_ring_mem = |
| 688 | agp_allocate_memory(bridge, dinfo->ring.size >> 12, | 687 | agp_allocate_memory(bridge, dinfo->ring.size >> 12, |
| @@ -1484,7 +1483,7 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
| 1484 | #endif | 1483 | #endif |
| 1485 | 1484 | ||
| 1486 | if (!dinfo->hwcursor) | 1485 | if (!dinfo->hwcursor) |
| 1487 | return -ENXIO; | 1486 | return soft_cursor(info, cursor); |
| 1488 | 1487 | ||
| 1489 | intelfbhw_cursor_hide(dinfo); | 1488 | intelfbhw_cursor_hide(dinfo); |
| 1490 | 1489 | ||
