Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 602167 Details for
Bug 748375
MGA 550 use only mirror
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch resolving the issue (see Comment 9)
mga-1.4.13-dualhead-fix.patch (text/plain), 6.18 KB, created by
Gianni Giardina
on 2012-08-03 16:22:29 UTC
(
hide
)
Description:
Patch resolving the issue (see Comment 9)
Filename:
MIME Type:
Creator:
Gianni Giardina
Created:
2012-08-03 16:22:29 UTC
Size:
6.18 KB
patch
obsolete
>diff -r -up xf86-video-mga-xf86-video-mga-1.4.13.orig/src/mga.h xf86-video-mga-xf86-video-mga-1.4.13/src/mga.h >--- xf86-video-mga-xf86-video-mga-1.4.13.orig/src/mga.h 2010-08-10 16:58:41.000000000 +0200 >+++ xf86-video-mga-xf86-video-mga-1.4.13/src/mga.h 2012-02-10 21:30:57.000000000 +0100 >@@ -337,6 +337,10 @@ typedef struct { > int mastervideoRam; > int slavevideoRam; > Bool directRenderingEnabled; >+ unsigned char * mappedIOBase; >+ int mappedIOUsage; >+ unsigned char * mappedILOADBase; >+ int mappedILOADUsage; > ScrnInfoPtr pScrn_1; > ScrnInfoPtr pScrn_2; > } MGAEntRec, *MGAEntPtr; >diff -r -up xf86-video-mga-xf86-video-mga-1.4.13.orig/src/mga_driver.c xf86-video-mga-xf86-video-mga-1.4.13/src/mga_driver.c >--- xf86-video-mga-xf86-video-mga-1.4.13.orig/src/mga_driver.c 2010-08-10 16:58:41.000000000 +0200 >+++ xf86-video-mga-xf86-video-mga-1.4.13/src/mga_driver.c 2012-02-11 14:09:45.000000000 +0100 >@@ -2815,30 +2815,45 @@ MGAMapMem(ScrnInfoPtr pScrn) > #ifdef XSERVER_LIBPCIACCESS > struct pci_device *const dev = pMga->PciInfo; > struct pci_mem_region *region; >- void **memory[2]; >- int i, err; >+ int err; > #endif > > > if (!pMga->FBDev) { > #ifdef XSERVER_LIBPCIACCESS >- memory[pMga->io_bar] = &pMga->IOBase; >- memory[pMga->framebuffer_bar] = &pMga->FbBase; >+ err = pci_device_map_range(dev, >+ pMga->FbAddress, pMga->FbMapSize, >+ PCI_DEV_MAP_FLAG_WRITABLE, >+ (void **)&pMga->FbBase); > >- for (i = 0; i < 2; i++) { >- region = &dev->regions[i]; >- err = pci_device_map_range(dev, >- region->base_addr, region->size, >- PCI_DEV_MAP_FLAG_WRITABLE, >- memory[i]); >+ if (err) { >+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, >+ "Unable to map BAR %i. %s (%d)\n", >+ pMga->framebuffer_bar, strerror(err), err); >+ return FALSE; >+ } > >- if (err) { >- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, >- "Unable to map BAR %i. %s (%d)\n", >- i, strerror(err), err); >- return FALSE; >- } >- } >+ /* do a new mapping or reuse a previuos one */ >+ if (pMga->entityPrivate == NULL || pMga->entityPrivate->mappedIOUsage == 0) { >+ region = &dev->regions[pMga->io_bar]; >+ err = pci_device_map_range(dev, >+ region->base_addr, region->size, >+ PCI_DEV_MAP_FLAG_WRITABLE, >+ (void **)&pMga->IOBase); >+ >+ if (err) { >+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, >+ "Unable to map BAR %i (IO region). %s (%d)\n", >+ pMga->io_bar, strerror(err), err); >+ return FALSE; >+ } >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedIOBase = pMga->IOBase; >+ } else { >+ pMga->IOBase = pMga->entityPrivate->mappedIOBase; >+ } >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedIOUsage ++; > #else > /* > * For Alpha, we need to map SPARSE memory, since we need >@@ -2879,17 +2894,26 @@ MGAMapMem(ScrnInfoPtr pScrn) > pMga->ILOADBase = NULL; > if (pMga->iload_bar != -1) { > #ifdef XSERVER_LIBPCIACCESS >- region = &dev->regions[pMga->iload_bar]; >- err = pci_device_map_range(dev, >- region->base_addr, region->size, >- PCI_DEV_MAP_FLAG_WRITABLE, >- (void *) &pMga->ILOADBase); >- if (err) { >- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, >- "Unable to map BAR 2 (ILOAD region). %s (%d)\n", >- strerror(err), err); >- return FALSE; >+ /* do a new mapping or reuse a previuos one */ >+ if (pMga->entityPrivate == NULL || pMga->entityPrivate->mappedILOADUsage == 0) { >+ region = &dev->regions[pMga->iload_bar]; >+ err = pci_device_map_range(dev, >+ region->base_addr, region->size, >+ PCI_DEV_MAP_FLAG_WRITABLE, >+ (void **) &pMga->ILOADBase); >+ if (err) { >+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, >+ "Unable to map BAR %i (ILOAD region). %s (%d)\n", >+ pMga->iload_bar, strerror(err), err); >+ return FALSE; >+ } >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedILOADBase = pMga->ILOADBase; >+ } else { >+ pMga->ILOADBase = pMga->entityPrivate->mappedILOADBase; > } >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedILOADUsage ++; > #else > pMga->ILOADBase = xf86MapPciMem(pScrn->scrnIndex, > VIDMEM_MMIO | VIDMEM_MMIO_32BIT | >@@ -2899,7 +2923,6 @@ MGAMapMem(ScrnInfoPtr pScrn) > #endif > } > >- > return TRUE; > } > >@@ -2919,10 +2942,20 @@ MGAUnmapMem(ScrnInfoPtr pScrn) > > if (!pMga->FBDev) { > #ifdef XSERVER_LIBPCIACCESS >- pci_device_unmap_range(dev, pMga->IOBase, >- dev->regions[pMga->io_bar].size); >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedIOUsage --; >+ >+ /* undo the mapping or just its reuse */ >+ if (pMga->entityPrivate == NULL || pMga->entityPrivate->mappedIOUsage == 0) { >+ pci_device_unmap_range(dev, pMga->IOBase, >+ dev->regions[pMga->io_bar].size); >+ >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedIOBase = NULL; >+ } >+ > pci_device_unmap_range(dev, pMga->FbBase, >- dev->regions[pMga->framebuffer_bar].size); >+ pMga->FbMapSize); > #else > xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pMga->IOBase, 0x4000); > xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pMga->FbBase, pMga->FbMapSize); >@@ -2935,8 +2968,17 @@ MGAUnmapMem(ScrnInfoPtr pScrn) > > if ((pMga->iload_bar != -1) && (pMga->ILOADBase != NULL)) { > #ifdef XSERVER_LIBPCIACCESS >- pci_device_unmap_range(dev, pMga->ILOADBase, >- dev->regions[pMga->iload_bar].size); >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedILOADUsage --; >+ >+ /* undo the mapping or just its reuse */ >+ if (pMga->entityPrivate == NULL || pMga->entityPrivate->mappedILOADUsage == 0) { >+ pci_device_unmap_range(dev, pMga->ILOADBase, >+ dev->regions[pMga->iload_bar].size); >+ >+ if (pMga->entityPrivate != NULL) >+ pMga->entityPrivate->mappedILOADBase = NULL; >+ } > #else > xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pMga->ILOADBase, 0x800000); > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 748375
: 602167