Paulo Cesar Pereira de Andrade wrote:
Xavier Bachelot wrote:
Hi again,
Hope I did not go over any mailing list limit, and this information
is useful. Also the Xorg version is the one from Mandriva 2008, but
we tried "cooker" version. And without the option TTLLCD (available
on the latest binary only driver), the display would look like
http://www.youtube.com/watch?v=wG9dV3l0oeA
Try the attached guess work patch. Not sure it'll do any good, but at
least should show you what to tweak to get openchrome working on the
VX800. Most notably the fifo settings are probably completely borked.
Gabriel or Jon would have more insight.
Regards,
Xavier
Logfile Xorg.openchrome.quanta-with-via-driver-in-another-vt.log.gz
from A Xserver started from a console, while another X Server
(with via driver) was active in another VT.
Attaching gdb:
-%<-
# gdb /usr/bin/Xorg 3691
GNU gdb 6.6-3mdv2008.0 (Mandriva Linux release 2008.0)
[blahblah]
0xb7c0513d in viaFlushPCI (buf=0x8239688)
at via_accel.c:110
110 while (!(VIAGETREG(VIA_REG_STATUS) &
VIA_VR_QUEUE_BUSY)
(gdb) bt
#0 0xb7bca13d in viaFlushPCI (buf=0x8239690) at via_accel.c:110
#1 0xb7bc7fb8 in viaAccelFillRect (pScrn=0x82382c8, x=0, y=0, w=640,
h=480,
color=0) at via_accel.c:2584
#2 0xb7bd1542 in VIAScreenInit (scrnIndex=0, pScreen=0x823b760, argc=12,
argv=0xbff9d4f4) at via_driver.c:2684
#3 0x080706ba in AddScreen ()
#4 0x080a3834 in InitOutput ()
#5 0x08070e52 in main ()
(gdb) n
-%<-
and it would loop forever. If not attaching gdb, the computer would just
completely lock when trying to kill the X Server with the openchrome
driver.
When testing with a "init 3" boot, I got the same result, so I patched
via_accel.c as:
-%<-
--- via_accel.c 2008-04-16 14:17:34.000000000 -0300
+++ via_accel.c 2007-09-22 01:38:41.000000000 -0300
@@ -106,7 +106,8 @@
*/
if (pVia->Chipset != VIA_P4M890 &&
pVia->Chipset != VIA_K8M890 &&
- pVia->Chipset != VIA_P4M900) {
+ pVia->Chipset != VIA_P4M900 &&
+ pVia->Chipset != VIA_VX800) {
while (!(VIAGETREG(VIA_REG_STATUS) &
VIA_VR_QUEUE_BUSY)
&& (loop++ < MAXLOOP)) ;
}
-%<-
Logfile Xorg.openchrome.quanta.log.gz is when running with that patch,
and gdb:
-%<-
# gdb /usr/bin/Xorg `pidof X`
GNU gdb 6.6-3mdv2008.0 (Mandriva Linux release 2008.0)
[blahblah]
0xb7b817d3 in viaAccelSync (pScrn=0x82382b8)
at via_accel.c:419
419 default:
(gdb) c
Continuing.
Program received signal SIGINT, Interrupt.
[Switching to Thread -1211427136 (LWP 13382)]
0xb7b8513d in viaFlushPCI (buf=0x8239680) at via_accel.c:110
110 pVia->Chipset != VIA_VX800) {
(gdb) bt
#0 0xb7b8513d in viaFlushPCI (buf=0x8239680) at via_accel.c:110
#1 0xb7b81d69 in viaSubsequentSolidFillRect (pScrn=0x82382b8, x=0, y=0,
w=640, h=480) at via_accel.c:663
#2 0xb7a00334 in XAAFillSolidRects () from
/usr/lib/xorg/modules//libxaa.so
#3 0xb7a0d5f8 in XAAPaintWindow () from /usr/lib/xorg/modules//libxaa.so
#4 0x0817926d in ?? ()
#5 0x08174862 in ?? ()
#6 0x08103b1e in compPaintWindowBackground ()
#7 0x08139bd5 in miClearToBackground ()
#8 0x08085d3a in ProcClearToBackground ()
#9 0x081533bd in ?? ()
#10 0x08089d6f in Dispatch ()
#11 0x08071025 in main ()
(gdb) c
Continuing.
Program received signal SIGINT, Interrupt.
0xb7b8513d in viaFlushPCI (buf=0x8239680) at via_accel.c:110
110 pVia->Chipset != VIA_VX800) {
(gdb) bt
#0 0xb7b8513d in viaFlushPCI (buf=0x8239680) at via_accel.c:110
#1 0xb7b81d69 in viaSubsequentSolidFillRect (pScrn=0x82382b8, x=0, y=0,
w=640, h=480) at via_accel.c:663
#2 0xb7a00334 in XAAFillSolidRects () from
/usr/lib/xorg/modules//libxaa.so
#3 0xb7a0d5f8 in XAAPaintWindow () from /usr/lib/xorg/modules//libxaa.so
#4 0x0817926d in ?? ()
#5 0x08174862 in ?? ()
#6 0x08103b1e in compPaintWindowBackground ()
#7 0x08139bd5 in miClearToBackground ()
#8 0x08085d3a in ProcClearToBackground ()
#9 0x081533bd in ?? ()
#10 0x08089d6f in Dispatch ()
#11 0x08071025 in main ()
(gdb) c
Continuing.
-%<-
but again it would completely lock if trying to exit the X Server.
I did not follow carefully the code, but my attempt to
"skip the busy loop" was probably pointless as it seens to be always
coming back to viaFlushPCI...
Paulo
hmm, I forgot to update a couple of places. I attach another patch, give
it a try, but it's probably better to start slowly and disable
acceleration at least for the beginning (Option "NoAccel").
Regards,
Xavier
Index: src/via_id.h
===================================================================
--- src/via_id.h (revision 563)
+++ src/via_id.h (working copy)
@@ -37,6 +37,7 @@
VIA_P4M900,
VIA_CX700,
VIA_P4M890,
+ VIA_VX800,
VIA_LAST
};
@@ -52,6 +53,7 @@
#define PCI_CHIP_VT3364 0x3371 /* P4M900 */
#define PCI_CHIP_VT3324 0x3157 /* CX700 */
#define PCI_CHIP_VT3327 0x3343 /* P4M890 */
+#define PCI_CHIP_VT1122 0x1122 /* VX800 */
/* There is some conflicting information about the two major revisions of
* the CLE266, often labelled Ax and Cx. The dividing line seems to be
Index: src/via_video.c
===================================================================
--- src/via_video.c (revision 563)
+++ src/via_video.c (working copy)
@@ -586,7 +586,7 @@
(pVia->Chipset == VIA_K8M800) || (pVia->Chipset == VIA_PM800) ||
(pVia->Chipset == VIA_VM800) || (pVia->Chipset == VIA_K8M890) ||
(pVia->Chipset == VIA_P4M900) || (pVia->Chipset == VIA_CX700) ||
- (pVia->Chipset == VIA_P4M890)) {
+ (pVia->Chipset == VIA_P4M890) || (pVia->Chipset == VIA_VX800)) {
num_new = viaSetupAdaptors(pScreen, &newAdaptors);
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
} else {
Index: src/via_mode.c
===================================================================
--- src/via_mode.c (revision 563)
+++ src/via_mode.c (working copy)
@@ -822,6 +822,8 @@
return ViaBandwidthTable[VIA_BW_CX700].Bandwidth[pVia->MemClk];
case VIA_P4M890:
return ViaBandwidthTable[VIA_BW_P4M890].Bandwidth[pVia->MemClk];
+ case VIA_VX800:
+ return ViaBandwidthTable[VIA_BW_VX800].Bandwidth[pVia->MemClk];
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"ViaBandwidthAllowed: Unknown Chipset.\n");
Index: src/via_mode.h
===================================================================
--- src/via_mode.h (revision 563)
+++ src/via_mode.h (working copy)
@@ -45,7 +45,8 @@
#define VIA_BW_P4M900 8
#define VIA_BW_CX700 9
#define VIA_BW_P4M890 10
-#define VIA_BW_ALL 11
+#define VIA_BW_VX800 11
+#define VIA_BW_ALL 12
/*
* 393216000 is for SDR133 in via_refresh.h
@@ -65,7 +66,8 @@
{ VIA_BW_K8M890, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, 922000000 } },
{ VIA_BW_P4M900, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, 922000000 } },
{ VIA_BW_CX700, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, VIA_BW_MIN } },
- { VIA_BW_P4M890, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, VIA_BW_MIN } }
+ { VIA_BW_P4M890, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, VIA_BW_MIN } },
+ { VIA_BW_VX800, { VIA_BW_MIN, VIA_BW_MIN, VIA_BW_MIN, 394000000, 461000000, 461000000, 461000000, 922000000, VIA_BW_MIN } }
};
/*
Index: src/via_driver.c
===================================================================
--- src/via_driver.c (revision 566)
+++ src/via_driver.c (working copy)
@@ -126,6 +126,7 @@
VIA_DEVICE_MATCH (PCI_CHIP_VT3364, 0 ),
VIA_DEVICE_MATCH (PCI_CHIP_VT3324, 0 ),
VIA_DEVICE_MATCH (PCI_CHIP_VT3327, 0 ),
+ VIA_DEVICE_MATCH (PCI_CHIP_VT1122, 0 ),
{ 0, 0, 0 },
};
@@ -161,6 +162,7 @@
{VIA_P4M900, "P4M900/VN896/CN896"},
{VIA_CX700, "CX700/VX700"},
{VIA_P4M890, "P4M890"},
+ {VIA_VX800, "VX800"},
{-1, NULL }
};
@@ -175,6 +177,7 @@
{VIA_P4M900, PCI_CHIP_VT3364, RES_SHARED_VGA},
{VIA_CX700, PCI_CHIP_VT3324, RES_SHARED_VGA},
{VIA_P4M890, PCI_CHIP_VT3327, RES_SHARED_VGA},
+ {VIA_VX800, PCI_CHIP_VT1122, RES_SHARED_VGA},
{-1, -1, RES_UNDEFINED}
};
@@ -846,6 +849,10 @@
case VIA_P4M890:
pVia->VideoEngine = VIDEO_ENGINE_CME;
break;
+ case VIA_VX800:
+ pVia->VideoEngine = VIDEO_ENGINE_CME;
+ pVia->agpEnable = FALSE;
+ break;
}
return TRUE;
@@ -1110,6 +1117,7 @@
case VIA_P4M890:
case VIA_P4M900:
case VIA_CX700:
+ case VIA_VX800:
#ifdef XSERVER_LIBPCIACCESS
pci_device_cfg_read_u8(vgaDevice, &videoRam, 0xA1);
#else
@@ -1610,10 +1618,11 @@
(pVia->Chipset == VIA_P4M890) ||
(pVia->Chipset == VIA_K8M890) ||
(pVia->Chipset == VIA_CX700) ||
+ (pVia->Chipset == VIA_VX800) ||
(pVia->Chipset == VIA_P4M900))) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Panel on K8M800, PM800, VM800, P4M890, K8M890, CX700 or "
- "P4M900 is currently not supported.\n");
+ "Panel on K8M800, PM800, VM800, P4M890, K8M890, CX700, "
+ "P4M900 or VX800 is currently not supported.\n");
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Using VBE to set modes to work around this.\n");
pVia->useVBEModes = TRUE;
Index: src/via_swov.c
===================================================================
--- src/via_swov.c (revision 563)
+++ src/via_swov.c (working copy)
@@ -280,6 +280,14 @@
HWDiff->dwHQVDisablePatch = VID_HWDIFF_FALSE;
HWDiff->dwNeedV1Prefetch = VID_HWDIFF_FALSE;
break;
+ case VIA_VX800:
+ HWDiff->dwThreeHQVBuffer = VID_HWDIFF_TRUE;
+ HWDiff->dwHQVFetchByteUnit = VID_HWDIFF_TRUE;
+ HWDiff->dwSupportTwoColorKey = VID_HWDIFF_FALSE;
+ HWDiff->dwHQVInitPatch = VID_HWDIFF_FALSE;
+ HWDiff->dwHQVDisablePatch = VID_HWDIFF_TRUE;
+ HWDiff->dwNeedV1Prefetch = VID_HWDIFF_FALSE;
+ break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"VIAVidHWDiffInit: Unhandled ChipSet.\n");
@@ -774,6 +782,7 @@
case PCI_CHIP_VT3364:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3327:
+ case PCI_CHIP_VT1122:
model = 0;
break;
case PCI_CHIP_CLE3122:
@@ -911,6 +920,7 @@
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
+ case PCI_CHIP_VT1122:
case PCI_CHIP_CLE3122:
VIDOutD(V1_ColorSpaceReg_2, col2);
VIDOutD(V1_ColorSpaceReg_1, col1);
@@ -939,6 +949,7 @@
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
+ case PCI_CHIP_VT1122:
return (VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_1_INUSE
| VIDEO_ACTIVE | VIDEO_SHOW);
case PCI_CHIP_CLE3122:
@@ -976,6 +987,7 @@
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
+ case PCI_CHIP_VT1122:
return V3_ENABLE | VIDEO_EXPIRE_NUM_VT3336;
case PCI_CHIP_CLE3122:
if (CLE266_REV_IS_CX(pVia->ChipRev))
@@ -1320,6 +1332,7 @@
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
+ case PCI_CHIP_VT1122:
SetFIFO_V3(pVia, 225, 200, 250);
break;
case PCI_CHIP_VT3204:
@@ -1351,6 +1364,7 @@
case PCI_CHIP_VT3336:
case PCI_CHIP_VT3324:
case PCI_CHIP_VT3364:
+ case PCI_CHIP_VT1122:
SetFIFO_V3(pVia, 225, 200, 250);
break;
case PCI_CHIP_VT3204:
@@ -1727,7 +1741,7 @@
* FIXME:
* Enable video on secondary
*/
- if ((pVia->Chipset == VIA_P4M900 || pVia->Chipset == VIA_VM800)
+ if ((pVia->Chipset == VIA_P4M900 || pVia->Chipset == VIA_VM800 || pVia->Chipset == VIA_VX800)
&& pVia->pBIOSInfo->PanelActive) {
/* V1_ON_SND_DISPLAY */
vidCtl |= 0x80000000;
Index: src/via_bandwidth.c
===================================================================
--- src/via_bandwidth.c (revision 563)
+++ src/via_bandwidth.c (working copy)
@@ -234,6 +234,12 @@
hwp->writeSeq(hwp, 0x18, 0x66);
hwp->writeSeq(hwp, 0x22, 0x1F);
break;
+ case VIA_VX800:
+ hwp->writeSeq(hwp, 0x16, 0x26);
+ hwp->writeSeq(hwp, 0x17, 0x5F);
+ hwp->writeSeq(hwp, 0x18, 0x66);
+ hwp->writeSeq(hwp, 0x22, 0x1F);
+ break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetPrimaryFIFO: "
"Chipset %d not implemented\n", pVia->Chipset);
@@ -385,6 +391,18 @@
else
ViaCrtcMask(hwp, 0x94, 0x20, 0x7F);
break;
+ case VIA_VX800:
+ ViaCrtcMask(hwp, 0x68, 0xA0, 0xF0);
+ ViaCrtcMask(hwp, 0x94, 0x00, 0x80);
+ ViaCrtcMask(hwp, 0x95, 0x00, 0x80);
+
+ ViaCrtcMask(hwp, 0x68, 0x04, 0x0F);
+ ViaCrtcMask(hwp, 0x95, 0x10, 0x70);
+
+ ViaCrtcMask(hwp, 0x92, 0x08, 0x0F);
+ ViaCrtcMask(hwp, 0x95, 0x00, 0x07);
+ ViaCrtcMask(hwp, 0x94, 0x10, 0x7F);
+ break;
default:
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ViaSetSecondaryFIFO: "
"Chipset %d not implemented\n", pVia->Chipset);
Index: src/via_accel.c
===================================================================
--- src/via_accel.c (revision 563)
+++ src/via_accel.c (working copy)
@@ -106,7 +106,8 @@
*/
if (pVia->Chipset != VIA_P4M890 &&
pVia->Chipset != VIA_K8M890 &&
- pVia->Chipset != VIA_P4M900) {
+ pVia->Chipset != VIA_P4M900 &&
+ pVia->Chipset != VIA_VX800) {
while (!(VIAGETREG(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY)
&& (loop++ < MAXLOOP)) ;
}
@@ -411,6 +412,7 @@
case VIA_P4M890:
case VIA_K8M890:
case VIA_P4M900:
+ case VIA_VX800:
while ((VIAGETREG(VIA_REG_STATUS) &
(VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY))
&& (loop++ < MAXLOOP)) ;
Index: src/via_xvmc.c
===================================================================
--- src/via_xvmc.c (revision 563)
+++ src/via_xvmc.c (working copy)
@@ -325,6 +325,7 @@
if ((pVia->Chipset == VIA_KM400) ||
(pVia->Chipset == VIA_CX700) ||
+ (pVia->Chipset == VIA_VX800) ||
(pVia->Chipset == VIA_K8M890) ||
(pVia->Chipset == VIA_P4M900)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
Index: src/via_id.c
===================================================================
--- src/via_id.c (revision 563)
+++ src/via_id.c (working copy)
@@ -198,6 +198,9 @@
{"MSI P4M890M-L/IL (MS-7255)", VIA_P4M890, 0x1462, 0x7255, VIA_DEVICE_CRT},
{"ASRock P4VM890", VIA_P4M890, 0x1849, 0x3343, VIA_DEVICE_CRT},
+ /*** VX800 ***/
+ {"Quanta OLPC", VIA_VX800, 0x152d, 0x0771, VIA_DEVICE_CRT | VIA_DEVICE_LCD},
+
/* keep this */
{NULL, VIA_UNKNOWN, 0x0000, 0x0000, VIA_DEVICE_NONE}
};
_______________________________________________
openchrome-users mailing list
[email protected]
http://wiki.openchrome.org/mailman/listinfo/openchrome-users
Main page:
http://www.openchrome.org
Wiki:
http://wiki.openchrome.org
User Forum:
http://wiki.openchrome.org/tikiwiki/tiki-view_forum.php?forumId=1