configure.ac | 2 - src/via_ums.c | 92 ++++------------------------------------------------------ 2 files changed, 8 insertions(+), 86 deletions(-)
New commits: commit 44d394650794fdd1c1987ea446d3073e3ad81767 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 4 14:46:03 2017 -0700 Version bumped to 0.6.129 Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/configure.ac b/configure.ac index fdfe444..515c648 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.6.128], + [0.6.129], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) commit 1608e6f8e74a28f14b3b963f5a5281f2fec71afe Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 4 14:41:13 2017 -0700 Removed video RAM size detection code from umsPreInit viaProbeVRAM function now handles the same functionality. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.c b/src/via_ums.c index c7a58fd..d2f6b4e 100644 --- a/src/via_ums.c +++ b/src/via_ums.c @@ -958,14 +958,8 @@ exit: Bool umsPreInit(ScrnInfoPtr pScrn) { - MessageType from = X_PROBED; - VIAPtr pVia = VIAPTR(pScrn); - CARD8 videoRam; vgaHWPtr hwp; -#ifdef HAVE_PCIACCESS - struct pci_device *vgaDevice = pci_device_find_by_slot(0, 0, 0, 3); - struct pci_device *bridge = pci_device_find_by_slot(0, 0, 0, 0); -#endif + VIAPtr pVia = VIAPTR(pScrn); int bMemSize = 0; if (!xf86LoadSubModule(pScrn, "vgahw")) @@ -987,79 +981,6 @@ umsPreInit(ScrnInfoPtr pScrn) return FALSE; } - switch (pVia->Chipset) { - case VIA_CLE266: -#ifdef HAVE_PCIACCESS - pci_device_cfg_read_u8(bridge, &videoRam, 0xE1); -#else - videoRam = pciReadByte(pciTag(0, 0, 0), 0xE1) & 0x70; -#endif - pScrn->videoRam = (1 << ((videoRam & 0x70) >> 4)) << 10; - break; - case VIA_KM400: -#ifdef HAVE_PCIACCESS - /* P4M800 Host Bridge PCI Device ID */ - if (DEVICE_ID(bridge) == 0x0296) { - pci_device_cfg_read_u8(vgaDevice, &videoRam, 0xA1); - } else { - pci_device_cfg_read_u8(bridge, &videoRam, 0xE1); - } -#else - /* P4M800 Host Bridge PCI Device ID */ - if (pciReadWord(pciTag(0, 0, 0), 0x02) == 0x0296) { - videoRam = pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70; - } else { - videoRam = pciReadByte(pciTag(0, 0, 0), 0xE1) & 0x70; - } -#endif - pScrn->videoRam = (1 << ((videoRam & 0x70) >> 4)) << 10; - break; - case VIA_PM800: - case VIA_P4M800PRO: - case VIA_K8M800: -#ifdef HAVE_PCIACCESS - pci_device_cfg_read_u8(vgaDevice, &videoRam, 0xA1); -#else - videoRam = pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70; -#endif - pScrn->videoRam = (1 << ((videoRam & 0x70) >> 4)) << 10; - break; - case VIA_P4M890: - case VIA_K8M890: - case VIA_P4M900: - case VIA_CX700: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: -#ifdef HAVE_PCIACCESS - pci_device_cfg_read_u8(vgaDevice, &videoRam, 0xA1); -#else - videoRam = pciReadByte(pciTag(0, 0, 3), 0xA1) & 0x70; -#endif - pScrn->videoRam = (1 << ((videoRam & 0x70) >> 4)) << 12; - break; - default: - if (pScrn->videoRam < 16384 || pScrn->videoRam > 65536) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Using old memory-detection method.\n"); - bMemSize = hwp->readSeq(hwp, 0x39); - if (bMemSize > 16 && bMemSize <= 128) - pScrn->videoRam = (bMemSize + 1) << 9; - else if (bMemSize > 0 && bMemSize < 31) - pScrn->videoRam = bMemSize << 12; - else { - from = X_DEFAULT; - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Memory size detection failed: using 16 MB.\n"); - pScrn->videoRam = 16 << 10; - } - } else { - from = X_DEFAULT; - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "No memory-detection done. Use VideoRAM option.\n"); - } - } - /* * PCI BAR are limited to 256 MB. */ commit 2c5b75a2e3cd1760a264df19f72dac3ecc9d3416 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 4 14:32:10 2017 -0700 Improved video RAM size detection log message Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.c b/src/via_ums.c index 88aebd3..c7a58fd 100644 --- a/src/via_ums.c +++ b/src/via_ums.c @@ -944,11 +944,17 @@ viaProbeVRAM(ScrnInfoPtr pScrn) break; } + if (status) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "Detected Video RAM Size: %d KB\n", pScrn->videoRam); + } + exit: DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting viaProbeVRAM.\n")); return status; } + Bool umsPreInit(ScrnInfoPtr pScrn) { @@ -1063,11 +1069,6 @@ umsPreInit(ScrnInfoPtr pScrn) pScrn->videoRam = (256 << 10); } - if (from == X_PROBED) { - xf86DrvMsg(pScrn->scrnIndex, from, - "Probed amount of VideoRAM = %d kB\n", pScrn->videoRam); - } - /* Split the FB for SAMM. */ /* FIXME: For now, split the FB into two equal sections. * This should be user-adjustable via a config option. */ _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel