Comment 111 for bug 292214

Revision history for this message
In , Reinhard Tartler (siretart) wrote :

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-mga/+bug/292214/comments/8 has a first analyses of this issue:

  Andy MacLean (0) wrote on 2008-11-07: (permalink)

I have the same issue with a G550 card in dual head mode and managed to change the code to get it all working with some nasty hacks. It looks like it was broken when they changed the driver to use libpciaccess to map memory regions instead of using the old xf86MapPciMem calls. There are two problems:

-> It tries to map the card's IO and iload regions twice, once for each head. libpciaccess doesn't like having two mappings for the same PCI region in the same device so it gives back EINVAL and this causes the breakage. I took out the check in pci_device_map_range in libpciaccess and this worked OK.

-> The new code maps the whole framebuffer into both heads because it uses region->base_addr and region->size instead of pMga->FBAddress and pMga->FbMapSize. This makes both displays draw onto a single monitor and it all looks very silly. I changed that in the mga driver and it works fine now.