xserver-xorg-video-openchrome: Changes to 'upstream-experimental'
ChangeLog | 12
Makefile.am | 2
NEWS | 48 +
README | 67 +
configure.ac | 25
release_notes-0.3.0 | 70 -
src/Makefile.am | 5
src/via.h | 18
src/via_accel.c | 4
src/via_dri.c | 25
src/via_driver.c | 368 ++++++++--
src/via_driver.h | 15
src/via_id.c | 14
src/via_memcpy.c | 6
src/via_swov.c | 3
src/via_video.c | 1846 ++++++++++++++++++++++++++--------------------------
16 files changed, 1424 insertions(+), 1104 deletions(-)
New commits:
commit 21a6bbd9fc25b65d09971abc2d8295b06fdb0148
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Wed Mar 19 22:51:39 2008 +0000
Prepare for next release...
git-svn-id: http://svn.openchrome.org/svn/trunk@558 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/Makefile.am b/Makefile.am
index 50af7d5..a3c5a91 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,4 +21,4 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man libxvmc
-EXTRA_DIST = release_notes-0.3.0 COPYING
+EXTRA_DIST = COPYING NEWS README
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..b6455ac
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,48 @@
+openchrome 0.2.902 (19/03/2008)
+-------------------------------
+* Enhancements and bug fixes:
+- libpciaccess support.
+- Fix Xv on LCD for VM800/CN700/P4M800pro.
+- Fix P4M900 fifo setting.
+- Various code clean up.
+
+* New boards:
+- ASRock P4VM900-SATA2, Asustek P5VD2-VM SE, Biostar P4M800 Pro-M7,
+ Clevo M54xSR, Clevo M660SR, Medion Notebook MD96483, Mitac 8515,
+ Mitac 8624, MSI Fuzzy CX700/CX700D, Packard Bell EasyNote XS
+ (aka Everex Cloudbook CE1200V), VIA Epia SN.
+
+* Notes:
+- The "HWCursor" option has been removed. Hardware-accelerated cursor is on by
+ default, so this option was useless. Use the "SWCursor" option if you want to
+ disable HW cursor.
+- AGPDMA has been disabled for K8M800 and VM800/CN700/P4M800pro in this release
+ because it causes screen repaint and lockup issues. The problem has been
+ tracked down to a bug in kernel drm. All kernel >= 2.6.22 are affected. This
+ bug will be fixed in the upcoming 2.6.25-rc7. It is also fixed in current
+ drm git tree. If you're using one of the affected kernels, you'll have to
+ either keep AGPDMA disabled or build the modules from the fixed drm git
+ tree. This option brings extra performance for some operations. To use it,
+ add 'Option "EnableAGPDMA"' in the Device section of the xorg configuration.
+
+
+openchrome 0.2.901 (02/01/2008)
+--------------------
+* Enhancements :
+- New pci ids : FIC CE260, Hasee F700C, MSI P4M900M / P4M900M2-F/L,
+ PCChips V21G, Biostar P4M900M-M7 SE.
+- Identify the driver as Openchrome, with CHROME as a shorthand.
+- Report chipset too in case of an unknown card id.
+- Improve P4M890 memory detection.
+- Add VT1625 720x480Under, 720x480Fit and 720x480Over NTSC modes.
+- Add VT1625 720x576 PAL mode.
+
+* Fixes :
+- Panel on CX700 needs VBE.
+- K8M890 can use DDR667.
+- Never enable IRQ on KM400, KM400A owner will still need to enable manually.
+- Various code cleanups.
+
+openchrome 0.2.900 (20/10/2007)
+--------------------
+- First openchrome official release.
diff --git a/README b/README
new file mode 100644
index 0000000..027df97
--- /dev/null
+++ b/README
@@ -0,0 +1,67 @@
+xf86-video-openchrome
+---------------------
+(http://www.openchrome.org)
+
+SUPPORTED CHIPSETS :
+--------------------
+- CLE266 (VT3122)
+- KM400/P4M800 (VT3205)
+- K8M800 (VT3204)
+- PM800/PM880/CN400 (VT3259)
+- VM800/CN700/P4M800Pro (VT3314)
+- CX700 (VT3324)
+- P4M890 (VT3327)
+- K8M890 (VT3336)
+- P4M900/VN896 (VT3364)
+
+
+SUPPORTED FEATURES :
+--------------------
+- Free modesetting for Unichrome and Unichrome Pro chipset.
+- VBE modesetting for everything not natively supported.
+- TV-out support.
+- EXA acceleration.
+- Hardware MPEG2 acceleration.
+
+
+IMPORTANT NOTE :
+----------------
+- The driver name is now 'openchrome', and this is what you need to use in
+ your xorg.conf now (instead of 'via'). The XvMC libraries have also been
+ renamed, to 'libchromeXvMC.so' and 'libchromeXvMCPro.so'.
+
+
+KNOWN BUGS/LIMITATIONS :
+------------------------
+* Laptop panel
+- Laptop displays for anything other than CLE266 and KM400/P4M800 are only
+ supported thru VBE calls.
+- Virtual terminal is broken on some laptop displays. Use a vesa framebuffer to
+ work around that (append vga=791 to your kernel command line, for example).
+
+* XvMC
+- The hardware MPEG4 acceleration that is present on some chipsets is not
+ implemented.
+- No XvMC support for CX700 (new, unsupported engine).
+- No XvMC support for K8M890, P4M890 and P4M900/VN896 (need to get dri working
+ for them first).
+
+* TV output
+- TV modes are hardcoded and must be choosen inside a list depending on the TV
+ encoder.
+- Outputs are dependent on each other and will use the least common
+ denominator. If you're using both VGA/LCD output and TV output, the VGA/LCD
+ output will be limited by the TV encoder (720x576@50Hz for example).
+ In other words, there is no dual screen support.
+
+* Misc.
+- Add-on and integrated TMDS encoders are not supported, except thru VBE.
+
+* Chrome9
+- Chrome9 chipsets' family (P4M900 and K8M890) currently doesn't
+ support neither AGP DMA nor 3D acceleration.
+
+
+Please note that 3D acceleration is provided by Mesa (http://mesa3d.org) and is
+not directly related to openchrome.
+
diff --git a/release_notes-0.3.0 b/release_notes-0.3.0
deleted file mode 100644
index c50758b..0000000
--- a/release_notes-0.3.0
+++ /dev/null
@@ -1,70 +0,0 @@
-xf86-video-openchrome-0.3.0
-
-This is the first official openchrome driver release.
-(http://www.openchrome.org)
-
-SUPPORTED CHIPSETS :
---------------------
-- CLE266 (VT3122)
-- KM400/P4M800 (VT3205)
-- K8M800 (VT3204)
-- PM800/PM880/CN400 (VT3259)
-- VM800/CN700/P4M800Pro (VT3314)
-- CX700 (VT3324)
-- P4M890 (VT3327)
-- K8M890 (VT3336)
-- P4M900/VN896 (VT3364)
-
-
-SUPPORTED FEATURES :
---------------------
-- Free modesetting for Unichrome and Unichrome Pro chipset.
-- VBE modesetting for everything not natively supported.
-- TV-out support.
-- EXA acceleration.
-- Hardware MPEG2 acceleration.
-
-
-IMPORTANT NOTE :
-----------------
-- The driver name is now 'openchrome', and this is what you need to use in
- your xorg.conf now (instead of 'via'). The XvMC libraries have also been
- renamed, to 'libchromeXvMC.so' and 'libchromeXvMCPro.so'.
-
-
-KNOWN BUGS/LIMITATIONS :
-------------------------
-* Laptop panel
-- Laptop displays for anything other than CLE266 and KM400/P4M800 are only
- supported thru VBE calls.
-- Xv is not working on laptop displays for VM800/CN700/P4M800PRO. It is however
- working on VGA.
-- Virtual terminal is broken on some laptop displays. Use a vesa framebuffer to
- work around that (append vga=791 to your kernel command line, for example).
-
-* XvMC
-- The hardware MPEG4 acceleration that is present on some chipsets is not
- implemented.
-- No XvMC support for CX700 (new, unsupported engine).
-- No XvMC support for K8M890, P4M890 and P4M900/VN896 (need to get dri working
- for them first).
-
-* TV output
-- TV modes are hardcoded and must be choosen inside a list depending on the TV
- encoder.
-- Outputs are dependent on each other and will use the least common
- denominator. If you're using both VGA/LCD output and TV output, the VGA/LCD
- output will be limited by the TV encoder (720x576@50Hz for example).
- In other words, there is no dual screen support.
-
-* Misc.
-- Add-on and integrated TMDS encoders are not supported, except thru VBE.
-
-* Chrome9
-- Chrome9 chipsets' family (P4M900 and K8M890) currently doesn't
- support neither AGP DMA nor 3D acceleration.
-
-
-Please note that 3D acceleration is provided by Mesa (http://mesa3d.org) and is
-not directly related to openchrome.
-
commit fa2a82ade736813eb6d74b1c78674db53213b128
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Wed Mar 19 22:30:53 2008 +0000
Disable AGPDMA for VM800 by default
git-svn-id: http://svn.openchrome.org/svn/trunk@557 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/via_driver.c b/src/via_driver.c
index acdbba1..5bd4371 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -820,6 +820,9 @@ VIASetupDefaultOptions(ScrnInfoPtr pScrn)
pVia->agpEnable = FALSE;
pVia->DRIIrqEnable = FALSE;
break;
+ case VIA_VM800:
+ pVia->agpEnable = FALSE;
+ break;
case VIA_K8M890:
pVia->VideoEngine = VIDEO_ENGINE_CME;
pVia->agpEnable = FALSE;
commit b562407252a382b288483aa26f906d5ef3ec4203
Author: gabriel <gabriel@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Wed Mar 19 19:46:45 2008 +0000
Fix pause address register for CX700
git-svn-id: http://svn.openchrome.org/svn/trunk@556 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/via_dri.c b/src/via_dri.c
index 3f026e0..3c010d4 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -193,7 +193,6 @@ VIADRIRingBufferInit(ScrnInfoPtr pScrn)
switch (pVia->ChipId) {
case PCI_CHIP_VT3314:
case PCI_CHIP_VT3259:
- case PCI_CHIP_VT3324:
pVIADRI->reg_pause_addr = 0x40c;
break;
default:
commit f90404d1bc9baa653acc612062974f2174667ec7
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Tue Mar 18 23:39:13 2008 +0000
fix bug report link and remove a superfluous newline from the generated svnrelease.h
git-svn-id: http://svn.openchrome.org/svn/trunk@555 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/configure.ac b/configure.ac
index 701d4b1..aece250 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
0.2.901,
- [https://www.openchrome.org/trac/report],
+ [http://www.openchrome.org/trac/report/1],
xf86-video-openchrome)
AC_CONFIG_SRCDIR([Makefile.am])
diff --git a/src/Makefile.am b/src/Makefile.am
index 777c284..b1d18f3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,5 +102,5 @@ svnversion.h: $(openchrome_drv_la_SOURCES)
@echo "created $@"
dist-hook:
- echo '#define BUILDCOMMENT "(openchrome '$(VERSION)' release)\n"' \
+ echo '#define BUILDCOMMENT "(openchrome '$(VERSION)' release)"' \
> svnrelease.h
commit e9377122193136d551a4a95a8165cdedc85f2b49
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Mon Mar 17 22:13:38 2008 +0000
Create src/svnrelease.h on make dist
git-svn-id: http://svn.openchrome.org/svn/trunk@554 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/Makefile.am b/src/Makefile.am
index ab99988..777c284 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,7 +25,7 @@
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
EXTRA_DIST = svnversion.h
-CONFIG_CLEAN_FILES= svnversion.h
+CONFIG_CLEAN_FILES= svnversion.h svnrelease.h
AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
openchrome_drv_la_LTLIBRARIES = openchrome_drv.la
openchrome_drv_la_LDFLAGS = -module -avoid-version
@@ -101,3 +101,6 @@ svnversion.h: $(openchrome_drv_la_SOURCES)
@mv $@.tmp $@
@echo "created $@"
+dist-hook:
+ echo '#define BUILDCOMMENT "(openchrome '$(VERSION)' release)\n"' \
+ > svnrelease.h
commit 5ecf80b083f8e5d268530e853afc9420856d212b
Author: ben <ben@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Sun Mar 16 15:55:51 2008 +0000
Some comment and whitespace tweaks, in both trunk and randr branch.
git-svn-id: http://svn.openchrome.org/svn/trunk@553 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/via_driver.c b/src/via_driver.c
index 2234790..acdbba1 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1518,7 +1518,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
ViaCheckCardId(pScrn);
- /* Read memory bandwidth from registers */
+ /* Read memory bandwidth from registers. */
pVia->MemClk = hwp->readCrtc(hwp, 0x3D) >> 4;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Detected MemClk %d\n", pVia->MemClk));
@@ -1530,7 +1530,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
pBIOSInfo->Bandwidth = ViaGetMemoryBandwidth(pScrn);
if (pBIOSInfo->TVType == TVTYPE_NONE) {
- /* Use jumper to determine TV type */
+ /* Use jumper to determine TV type. */
if (hwp->readCrtc(hwp, 0x3B) & 0x02) {
pBIOSInfo->TVType = TVTYPE_PAL;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -1548,9 +1548,9 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
- /* Split FB for SAMM */
- /* FIXME: For now, split FB into two equal sections. This should
- * be able to be adjusted by user with a config option. */
+ /* Split the FB for SAMM. */
+ /* FIXME: For now, split the FB into two equal sections.
+ * This should be user-adjustable via a config option. */
if (pVia->IsSecondary) {
DevUnion *pPriv;
VIAEntPtr pVIAEnt;
@@ -1615,7 +1615,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
pVia->pVbe = NULL;
if (pVia->useVBEModes) {
- /* VBE doesn't properly initialise int10 itself */
+ /* VBE doesn't properly initialise int10 itself. */
if (xf86LoadSubModule(pScrn, "int10")
&& xf86LoadSubModule(pScrn, "vbe")) {
xf86LoaderReqSymLists(vbeSymbols, NULL);
@@ -1637,14 +1637,13 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
}
} else {
- /* Add own Modes */
+ /* Add own modes. */
ViaModesAttach(pScrn, pScrn->monitor);
/*
- * Setup the ClockRanges, which describe what clock ranges are available,
- * and what sort of modes they can be used for.
+ * Set up ClockRanges, which describe what clock ranges are
+ * available, and what sort of modes they can be used for.
*/
-
clockRanges = xnfalloc(sizeof(ClockRange));
clockRanges->next = NULL;
clockRanges->minClock = 20000;
@@ -1665,7 +1664,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
* Max Height: 4096 (and beyond)
*
* CLE266A: primary AdjustFrame can use only 24 bits, so we are limited
- * to 12x11 bits; 4080x2048 (~2:1), 3344x2508 (4:3) or 2896x2896 (1:1).
+ * to 12x11 bits; 4080x2048 (~2:1), 3344x2508 (4:3), or 2896x2896 (1:1).
* Test CLE266Cx, KM400, KM400A, K8M800, PM800, CN400 please.
*
* We should be able to limit the memory available for a mode to 32 MB,
@@ -1673,7 +1672,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
* properly (apertureSize).
*/
- /* Select valid modes from those available */
+ /* Select valid modes from those available. */
i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, /* availModes */
pScrn->display->modes, /* modeNames */
clockRanges, /* list of clock ranges */
@@ -1721,7 +1720,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
xf86LoaderReqSymLists(fbSymbols, NULL);
#else
- /* load bpp-specific modules */
+ /* Load bpp-specific modules. */
switch (pScrn->bitsPerPixel) {
case 8:
mod = "cfb";
@@ -1808,7 +1807,7 @@ VIAEnterVT(int scrnIndex, int flags)
vgaHWPtr hwp = VGAHWPTR(pScrn);
Bool ret;
- /* FIXME: Rebind AGP memory here */
+ /* FIXME: Rebind AGP memory here. */
DEBUG(xf86DrvMsg(scrnIndex, X_INFO, "VIAEnterVT\n"));
if (pVia->pVbe) {
@@ -1825,11 +1824,11 @@ VIAEnterVT(int scrnIndex, int flags)
VIASaveScreen(pScrn->pScreen, SCREEN_SAVER_ON);
- /* Patch for APM suspend resume, HWCursor has garbage */
+ /* A patch for APM suspend/resume, when HWCursor has garbage. */
if (pVia->hwcursor)
ViaCursorRestore(pScrn);
- /* restore video status */
+ /* Restore video status. */
if (!pVia->IsSecondary)
viaRestoreVideo(pScrn);
@@ -1880,9 +1879,7 @@ VIALeaveVT(int scrnIndex, int flags)
viaAccelSync(pScrn);
- /*
- * A soft reset helps fix 3D hang on VT switch.
- */
+ /* A soft reset helps to avoid a 3D hang on VT switch. */
if (pVia->Chipset != VIA_K8M890 && pVia->Chipset != VIA_P4M900)
hwp->writeSeq(hwp, 0x1A, pVia->SavedReg.SR1A | 0x40);
@@ -1896,8 +1893,7 @@ VIALeaveVT(int scrnIndex, int flags)
if (pVia->VQEnable)
viaDisableVQ(pScrn);
- /* Save video status and turn off all video activities */
-
+ /* Save video status and turn off all video activities. */
if (!pVia->IsSecondary)
viaSaveVideo(pScrn);
@@ -1948,7 +1944,7 @@ VIASave(ScrnInfoPtr pScrn)
else
vgaHWSave(pScrn, &hwp->SavedReg, VGA_SR_MODE);
- /* Unlock extended regs */
+ /* Unlock and save extended registers. */
hwp->writeSeq(hwp, 0x10, 0x01);
Regs->SR14 = hwp->readSeq(hwp, 0x14);
@@ -2009,7 +2005,7 @@ VIASave(ScrnInfoPtr pScrn)
if (pBIOSInfo->TVI2CDev)
ViaTVSave(pScrn);
- /* Save LCD control regs */
+ /* Save LCD control registers. */
for (i = 0; i < 68; i++)
Regs->CRTCRegs[i] = hwp->readCrtc(hwp, i + 0x50);
@@ -2042,7 +2038,7 @@ VIARestore(ScrnInfoPtr pScrn)
vgaHWProtect(pScrn, TRUE);
- /* Unlock extended regs */
+ /* Unlock extended registers. */
hwp->writeSeq(hwp, 0x10, 0x01);
hwp->writeCrtc(hwp, 0x6A, 0x00);
@@ -2052,13 +2048,13 @@ VIARestore(ScrnInfoPtr pScrn)
if (pBIOSInfo->TVI2CDev)
ViaTVRestore(pScrn);
- /* Restore the standard vga regs */
+ /* Restore the standard VGA registers. */
if (xf86IsPrimaryPci(pVia->PciInfo))
vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_ALL);
else
vgaHWRestore(pScrn, &hwp->SavedReg, VGA_SR_MODE);
- /* Restore extended regs */
+ /* Restore extended registers. */
hwp->writeSeq(hwp, 0x14, Regs->SR14);
hwp->writeSeq(hwp, 0x15, Regs->SR15);
hwp->writeSeq(hwp, 0x16, Regs->SR16);
@@ -2101,7 +2097,7 @@ VIARestore(ScrnInfoPtr pScrn)
break;
}
- /* Reset dotclocks */
+ /* Reset dotclocks. */
ViaSeqMask(hwp, 0x40, 0x06, 0x06);
ViaSeqMask(hwp, 0x40, 0x00, 0x06);
@@ -2114,7 +2110,7 @@ VIARestore(ScrnInfoPtr pScrn)
hwp->writeCrtc(hwp, 0x49, Regs->CR49);
- /* Restore LCD control regs */
+ /* Restore LCD control registers. */
for (i = 0; i < 68; i++)
hwp->writeCrtc(hwp, i + 0x50, Regs->CRTCRegs[i]);
@@ -2132,7 +2128,7 @@ VIARestore(ScrnInfoPtr pScrn)
ViaDisablePrimaryFIFO(pScrn);
- /* Reset clock */
+ /* Reset clock. */
tmp = hwp->readMiscOut(hwp);
hwp->writeMiscOut(hwp, tmp);
@@ -2213,12 +2209,12 @@ VIAMapMMIO(ScrnInfoPtr pScrn)
return FALSE;
}
- /* Memory mapped IO for Video Engine */
+ /* Memory mapped IO for video engine. */
pVia->VidMapBase = pVia->MapBase + 0x200;
- /* Memory mapped IO for Mpeg Engine */
+ /* Memory mapped IO for mpeg engine. */
pVia->MpegMapBase = pVia->MapBase + 0xc00;
- /* Set up MMIO vgaHW */
+ /* Set up MMIO vgaHW. */
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
CARD8 val;
@@ -2231,10 +2227,10 @@ VIAMapMMIO(ScrnInfoPtr pScrn)
val = hwp->readMiscOut(hwp);
hwp->writeMiscOut(hwp, val | 0x01);
- /* Unlock Extended IO Space */
+ /* Unlock extended IO space. */
hwp->writeSeq(hwp, 0x10, 0x01);
- /* Enable MMIO */
+ /* Enable MMIO. */
if (pVia->IsSecondary)
ViaSeqMask(hwp, 0x1A, 0x38, 0x38);
else
@@ -2262,13 +2258,13 @@ VIAMapFB(ScrnInfoPtr pScrn)
if (pVia->videoRambytes) {
+#ifndef XSERVER_LIBPCIACCESS
/*
* FIXME: This is a hack to get rid of offending wrongly sized
* MTRR regions set up by the VIA BIOS. Should be taken care of
* in the OS support layer.
*/
-#ifndef XSERVER_LIBPCIACCESS
unsigned char *tmp;
tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO, pVia->PciTag,
@@ -2276,18 +2272,18 @@ VIAMapFB(ScrnInfoPtr pScrn)
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) tmp, pVia->videoRambytes);
/*
- * And, as if this wasn't enough, 2.6 series kernels doesn't
- * remove MTRR regions on the first attempt. Try again.
+ * And, as if this wasn't enough, 2.6 series kernels don't
+ * remove MTRR regions on the first attempt. So try again.
*/
tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO, pVia->PciTag,
pVia->FrameBufferBase, pVia->videoRambytes);
xf86UnMapVidMem(pScrn->scrnIndex, (pointer) tmp, pVia->videoRambytes);
-#endif
/*
* End of hack.
*/
+#endif
#ifdef XSERVER_LIBPCIACCESS
err = pci_device_map_range(pVia->PciInfo, pVia->FrameBufferBase,
@@ -2340,7 +2336,7 @@ VIAUnmapMem(ScrnInfoPtr pScrn)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIAUnmapMem\n"));
- /* Disable MMIO */
+ /* Disable MMIO. */
ViaSeqMask(VGAHWPTR(pScrn), 0x1A, 0x00, 0x60);
#ifdef XSERVER_LIBPCIACCESS
@@ -2493,7 +2489,7 @@ VIALoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
hwp->writeCrtc(hwp, 0x6A, CR6A);
/* Screen 0 palette was changed by mode setting of Screen 1,
- * so load again */
+ * so load it again. */
for (i = 0; i < numColors; i++) {
index = indices[i];
hwp->writeDacWriteAddr(hwp, index);
@@ -2544,7 +2540,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
pVia->FirstInit = FALSE;
- /* Darken the screen for aesthetic reasons and set the viewport */
+ /* Darken the screen for aesthetic reasons and set the viewport. */
VIASaveScreen(pScreen, SCREEN_SAVER_ON);
pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
@@ -2595,7 +2591,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
}
}
#ifdef USE_FB
- /* must be after RGB ordering fixed */
+ /* Must be after RGB ordering is fixed. */
fbPictureInit(pScreen, 0, 0);
#endif
@@ -2605,7 +2601,9 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
miInitializeBackingStore(pScreen);
xf86SetBackingStore(pScreen);
- /*xf86SetSilkenMouse(pScreen); */
+#if 0
+ xf86SetSilkenMouse(pScreen);
+#endif
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "- Backing store set up\n"));
if (!pVia->shadowFB) /* hardware cursor needs to wrap this layer */
@@ -2801,16 +2799,14 @@ VIAWriteMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
if (!ViaVbeSetMode(pScrn, mode))
return FALSE;
/*
- * FIXME: pVia->IsSecondary is not working here.
- * We should be able to detect when the display
- * is using the secondary head.
- * TODO: This should be enabled for others
- * chipsets as well
+ * FIXME: pVia->IsSecondary is not working here. We should be able
+ * to detect when the display is using the secondary head.
+ * TODO: This should be enabled for other chipsets as well.
*/
if (pVia->Chipset == VIA_P4M900 && pVia->pBIOSInfo->PanelActive) {
/*
* Since we are using virtual, we need to adjust
- * the offset to match the framebuffer alignment
+ * the offset to match the framebuffer alignment.
*/
if (pScrn->displayWidth != mode->HDisplay)
ViaModeSecondaryVGAOffset(pScrn);
@@ -2839,22 +2835,22 @@ VIACloseScreen(int scrnIndex, ScreenPtr pScreen)
VIAPtr pVia = VIAPTR(pScrn);
DEBUG(xf86DrvMsg(scrnIndex, X_INFO, "VIACloseScreen\n"));
- /* Is the display currently visible ? */
- if (pScrn->vtSema) {
+ /* Is the display currently visible? */
+ if (pScrn->vtSema) {
#ifdef XF86DRI
if (pVia->directRenderingEnabled)
DRILock(screenInfo.screens[scrnIndex], 0);
#endif
- /* Wait Hardware Engine idle to exit graphical mode */
+ /* Wait for hardware engine to idle before exiting graphical mode. */
viaAccelSync(pScrn);
- /* A soft reset Fixes 3D Hang after X restart */
+ /* A soft reset avoids a 3D hang after X restart. */
if (pVia->Chipset != VIA_K8M890 && pVia->Chipset != VIA_P4M900)
hwp->writeSeq(hwp, 0x1A, pVia->SavedReg.SR1A | 0x40);
if (!pVia->IsSecondary) {
- /* Turn off all video activities */
+ /* Turn off all video activities. */
viaExitVideo(pScrn);
VIAHideCursor(pScrn);
@@ -2933,7 +2929,7 @@ VIAAdjustFrame(int scrnIndex, int x, int y, int flags)
Base = (y * pScrn->displayWidth + x) * (pScrn->bitsPerPixel / 8);
- /* now program the start address registers */
+ /* Now program the start address registers. */
if (pVia->IsSecondary) {
Base = (Base + pScrn->fbOffset) >> 3;
ViaCrtcMask(hwp, 0x62, (Base & 0x7F) << 1, 0xFE);
@@ -3004,11 +3000,11 @@ VIADPMS(ScrnInfoPtr pScrn, int mode, int flags)
return;
}
- /* Clear DPMS setting */
+ /* Clear DPMS setting. */
val = hwp->readCrtc(hwp, 0x36);
val &= 0xCF;
- /* Turn Off CRT, if user doesn't want crt on */
+ /* Turn CRT off, if user doesn't want it on. */
if (!pVia->IsSecondary && !pBIOSInfo->CrtActive)
val |= 0x30;
@@ -3081,12 +3077,10 @@ VIAInitialize3DEngine(ScrnInfoPtr pScrn)
VIASETREG(VIA_REG_TRANSPACE, 0x64000000);
VIASETREG(VIA_REG_TRANSET, 0x00fe0000);
-
if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev >= 3)
VIASETREG(VIA_REG_TRANSPACE, 0x40008c0f);
else
VIASETREG(VIA_REG_TRANSPACE, 0x4000800f);
-
VIASETREG(VIA_REG_TRANSPACE, 0x44000000);
VIASETREG(VIA_REG_TRANSPACE, 0x45080C04);
VIASETREG(VIA_REG_TRANSPACE, 0x46800408);
commit c8ade6270a65234a69341d914852eacac0fdcfdb
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Sat Mar 15 02:17:07 2008 +0000
yet another tiny sync with randr
git-svn-id: http://svn.openchrome.org/svn/trunk@551 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/via_driver.c b/src/via_driver.c
index 74243ea..2234790 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1665,7 +1665,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags)
* Max Height: 4096 (and beyond)
*
* CLE266A: primary AdjustFrame can use only 24 bits, so we are limited
- * to 12x11 bits; 4080x2048 (~2:1), 3344x2508 (4:3), or 2896x2896 (1:1).
+ * to 12x11 bits; 4080x2048 (~2:1), 3344x2508 (4:3) or 2896x2896 (1:1).
* Test CLE266Cx, KM400, KM400A, K8M800, PM800, CN400 please.
*
* We should be able to limit the memory available for a mode to 32 MB,
@@ -3081,6 +3081,7 @@ VIAInitialize3DEngine(ScrnInfoPtr pScrn)
VIASETREG(VIA_REG_TRANSPACE, 0x64000000);
VIASETREG(VIA_REG_TRANSET, 0x00fe0000);
+
if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev >= 3)
VIASETREG(VIA_REG_TRANSPACE, 0x40008c0f);
else
commit 6bf80787439e9a4fc5e47ac17d17c25152fa0599
Author: schlobinux <schlobinux@e8d65cb0-85f4-0310-8831-c60e2a5ce829>
Date: Sat Mar 15 02:01:06 2008 +0000
merge changeset 436 and a fix from randr
git-svn-id: http://svn.openchrome.org/svn/trunk@549 e8d65cb0-85f4-0310-8831-c60e2a5ce829
diff --git a/src/via_driver.c b/src/via_driver.c
index bd5be61..74243ea 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -3081,10 +3081,11 @@ VIAInitialize3DEngine(ScrnInfoPtr pScrn)
VIASETREG(VIA_REG_TRANSPACE, 0x64000000);
VIASETREG(VIA_REG_TRANSET, 0x00fe0000);
- if (pVia->ChipRev >= 3)
+ if (pVia->Chipset == VIA_CLE266 && pVia->ChipRev >= 3)
VIASETREG(VIA_REG_TRANSPACE, 0x40008c0f);
else
VIASETREG(VIA_REG_TRANSPACE, 0x4000800f);
+
VIASETREG(VIA_REG_TRANSPACE, 0x44000000);
VIASETREG(VIA_REG_TRANSPACE, 0x45080C04);
VIASETREG(VIA_REG_TRANSPACE, 0x46800408);
diff --git a/src/via_video.c b/src/via_video.c
index 3bac647..7a65c3a 100644
--- a/src/via_video.c
+++ b/src/via_video.c
@@ -57,7 +57,7 @@
/*
* D E F I N E
*/
-#define OFF_DELAY 200 /* milliseconds */
+#define OFF_DELAY 200 /* milliseconds */
#define FREE_DELAY 60000
#define PARAMSIZE 1024
#define SLICESIZE 65536
@@ -136,11 +136,11 @@ static XF86VideoEncodingRec DummyEncoding[1] = {
#define NUM_FORMATS_G 9
static XF86VideoFormatRec FormatsG[NUM_FORMATS_G] = {
- {8, TrueColor}, /* Dithered */
- {8, PseudoColor}, /* Using .. */
+ {8, TrueColor}, /* Dithered */
+ {8, PseudoColor}, /* Using .. */
{8, StaticColor},
{8, GrayScale},
- {8, StaticGray}, /* .. TexelLUT */
+ {8, StaticGray}, /* .. TexelLUT */
{16, TrueColor},
{24, TrueColor},
{16, DirectColor},
@@ -164,83 +164,83 @@ static XF86ImageRec ImagesG[NUM_IMAGES_G] = {
XVIMAGE_YUY2,
XVIMAGE_YV12,
{
- /*
- * Below, a dummy picture type that is used in XvPutImage only to do
- * an overlay update. Introduced for the XvMC client lib.
- * Defined to have a zero data size.
- */
-
- FOURCC_XVMC,
- XvYUV,
- LSBFirst,
- {'V', 'I', 'A', 0x00,
- 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0xAA, 0x00,
- 0x38, 0x9B, 0x71},
- 12,
- XvPlanar,
- 1,
- 0, 0, 0, 0,
- 8, 8, 8,
- 1, 2, 2,
- 1, 2, 2,
- {'Y', 'V', 'U',
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- XvTopToBottom},
- { /* RGB 555 */
- FOURCC_RV15,
- XvRGB,
- LSBFirst,
- {'R', 'V', '1', '5',
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00},
- 16,
- XvPacked,
- 1,
- 15, 0x7C00, 0x03E0, 0x001F,
- 0, 0, 0,
- 0, 0, 0,
- 0, 0, 0,
- {'R', 'V', 'B', 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0},
- XvTopToBottom},
- { /* RGB 565 */
- FOURCC_RV16,
- XvRGB,
- LSBFirst,
- {'R', 'V', '1', '6',
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00},
- 16,
- XvPacked,
- 1,
- 16, 0xF800, 0x07E0, 0x001F,
- 0, 0, 0,
- 0, 0, 0,
- 0, 0, 0,
- {'R', 'V', 'B', 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0},
- XvTopToBottom},
- { /* RGB 888 */
- FOURCC_RV32,
- XvRGB,
- LSBFirst,
- {'R', 'V', '3', '2',
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00},
- 32,
- XvPacked,
- 1,
- 24, 0xff0000, 0x00ff00, 0x0000ff,
- 0, 0, 0,
- 0, 0, 0,
- 0, 0, 0,
- {'R', 'V', 'B', 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0},
- XvTopToBottom}
+ /*
+ * Below, a dummy picture type that is used in XvPutImage only to do
+ * an overlay update. Introduced for the XvMC client lib.
+ * Defined to have a zero data size.
+ */
+
+ FOURCC_XVMC,
+ XvYUV,
+ LSBFirst,
+ { 'V', 'I', 'A', 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0xAA, 0x00,
+ 0x38, 0x9B, 0x71},
+ 12,
+ XvPlanar,
+ 1,
+ 0, 0, 0, 0,
+ 8, 8, 8,
+ 1, 2, 2,
+ 1, 2, 2,
+ { 'Y', 'V', 'U',
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ XvTopToBottom},
+ { /* RGB 555 */
+ FOURCC_RV15,
+ XvRGB,
+ LSBFirst,
+ { 'R', 'V', '1', '5',
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00},
+ 16,
+ XvPacked,
+ 1,
+ 15, 0x7C00, 0x03E0, 0x001F,
+ 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+ { 'R', 'V', 'B', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ XvTopToBottom},
+ { /* RGB 565 */
+ FOURCC_RV16,
+ XvRGB,
+ LSBFirst,
+ { 'R', 'V', '1', '6',
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00},
+ 16,
+ XvPacked,
+ 1,
+ 16, 0xF800, 0x07E0, 0x001F,
+ 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+ { 'R', 'V', 'B', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ XvTopToBottom},
+ { /* RGB 888 */
+ FOURCC_RV32,
+ XvRGB,
+ LSBFirst,
+ { 'R', 'V', '3', '2',
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00},
+ 32,
+ XvPacked,
+ 1,
+ 24, 0xff0000, 0x00ff00, 0x0000ff,
+ 0, 0, 0,
+ 0, 0, 0,
+ 0, 0, 0,
+ { 'R', 'V', 'B', 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ XvTopToBottom}
Reply to: