diff options
author | Adam Jackson <ajax@redhat.com> | 2011-05-10 17:34:23 -0400 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-15 21:18:46 -0700 |
commit | 7757b8092474c4f4ec04f4ebd1272236416154c3 (patch) | |
tree | bfb9877d92c1a8e50eeddcd6ee985e17149deee3 /hw/xfree86/int10 | |
parent | 6f5041d0b8e11e761d6403f1f8f8bb2ba2a9626d (diff) |
pci: Remove xf86MapDomainMemory
This is slightly draconian, but that API is just awful. In all but
one case in the callers it's used to get a map of some legacy VGA
memory, and it would be cleaner for the caller to just call
pci_device_map_legacy.
The sole exception is in the vesa driver, which uses it to avoid having
to look up which device the BAR belongs to. That's similarly trivial to
fix.
Having done that, Linux's PCI layer is now very small indeed.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'hw/xfree86/int10')
-rw-r--r-- | hw/xfree86/int10/generic.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c index 040d999b2..53cd52567 100644 --- a/hw/xfree86/int10/generic.c +++ b/hw/xfree86/int10/generic.c @@ -238,9 +238,7 @@ MapVRam(xf86Int10InfoPtr pInt) int pagesize = getpagesize(); int size = ((VRAM_SIZE + pagesize - 1) / pagesize) * pagesize; - INTPriv(pInt)->vRam = xf86MapDomainMemory(pInt->scrnIndex, VIDMEM_MMIO, - pInt->dev, V_RAM, size); - + pci_device_map_legacy(pInt->dev, V_RAM, size, PCI_DEV_MAP_FLAG_WRITABLE, &(INTPriv(pInt)->vRam)); pInt->io = pci_legacy_open_io(pInt->dev, 0, 64 * 1024); } @@ -251,8 +249,7 @@ UnmapVRam(xf86Int10InfoPtr pInt) int pagesize = getpagesize(); int size = ((VRAM_SIZE + pagesize - 1)/pagesize) * pagesize; - xf86UnMapVidMem(screen, INTPriv(pInt)->vRam, size); - + pci_device_unmap_legacy(pInt->dev, INTPriv(pInt)->vRam, size); pci_device_close_io(pInt->dev, pInt->io); pInt->io = NULL; } |