[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>

authored by Antonino A. Daplas and committed by Linus Torvalds 375726d7 b2846dfa

+11 -11
+1
drivers/video/Kconfig
··· 768 768 select FB_CFB_FILLRECT 769 769 select FB_CFB_COPYAREA 770 770 select FB_CFB_IMAGEBLIT 771 + select FB_SOFT_CURSOR 771 772 help 772 773 This driver supports the on-board graphics built in to the Intel 773 774 830M/845G/852GM/855GM/865G chipsets.
+10 -11
drivers/video/intelfb/intelfbdrv.c
··· 226 226 227 227 static int accel = 1; 228 228 static int vram = 4; 229 - static int hwcursor = 1; 229 + static int hwcursor = 0; 230 230 static int mtrr = 1; 231 231 static int fixed = 0; 232 232 static int noinit = 0; ··· 609 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 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 614 dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); 620 - dinfo->fb.offset = 0; 621 615 dinfo->fbmem_gart = 0; 622 616 } else { 623 617 dinfo->fb.size = MB(vram); ··· 642 648 return -ENODEV; 643 649 } 644 650 651 + if (MB(voffset) < stolen_size) 652 + offset = (stolen_size >> 12); 653 + else 654 + offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; 655 + 645 656 /* set the mem offsets - set them after the already used pages */ 646 657 if (dinfo->accel) { 647 658 dinfo->ring.offset = offset + gtt_info.current_memory; ··· 661 662 + (dinfo->cursor.size >> 12); 662 663 } 663 664 665 + /* Allocate memories (which aren't stolen) */ 664 666 /* Map the fb and MMIO regions */ 665 667 /* ioremap only up to the end of used aperture */ 666 668 dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache 667 - (dinfo->aperture.physical, (dinfo->fb.offset << 12) 669 + (dinfo->aperture.physical, ((offset + dinfo->fb.offset) << 12) 668 670 + dinfo->fb.size); 669 671 if (!dinfo->aperture.virtual) { 670 672 ERR_MSG("Cannot remap FB region.\n"); ··· 682 682 return -ENODEV; 683 683 } 684 684 685 - /* Allocate memories (which aren't stolen) */ 686 685 if (dinfo->accel) { 687 686 if (!(dinfo->gtt_ring_mem = 688 687 agp_allocate_memory(bridge, dinfo->ring.size >> 12, ··· 1483 1484 #endif 1484 1485 1485 1486 if (!dinfo->hwcursor) 1486 - return -ENXIO; 1487 + return soft_cursor(info, cursor); 1487 1488 1488 1489 intelfbhw_cursor_hide(dinfo); 1489 1490